summaryrefslogtreecommitdiff
path: root/lib/model/model.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-21 12:22:50 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-21 12:22:50 +0100
commitbc78bea63b7c75e8a9d222dc86fb75ed293a2242 (patch)
tree6c864df4d57200c20c7f712ada20a6111ca31538 /lib/model/model.mli
parent9f2a57603dbfce428af36e82fb1c7cdc6e1ad0da (diff)
Renamed the module Typ into Types
Diffstat (limited to 'lib/model/model.mli')
-rw-r--r--lib/model/model.mli26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/model/model.mli b/lib/model/model.mli
index 0326eb2..29d6234 100644
--- a/lib/model/model.mli
+++ b/lib/model/model.mli
@@ -39,8 +39,8 @@
- {!Identifier} — the names of contents and fields, validated so that they
are always safe to embed as SQL identifiers.
- {!Content}, {!Section}, {!Field} — the structure of the model.
- - {!Typ} — the field types (the nature of the data; the data itself lives in
- the value package as [Value.value]).
+ - {!Types} — the field types (the nature of the data; the data itself lives
+ in the value package as [Value.value]).
- {!Reference} — a link from a reference field to its target content.
- {!DataList} — a static list declared in the configuration: referenceable,
but not editable by the user.
@@ -85,25 +85,25 @@ type content = target Content.t
(** A content : the element produced by the configuration loader and manipulated
by the query and rendering layers. *)
-module Typ = Typ
+module Types = Types
(** The type of a field, and the values a field can carry.
A field type is one of:
- - {!Typ.Text} — a string, stored as a nullable column;
- - {!Typ.Integer} — an integer, stored as a nullable column;
- - {!Typ.MonoReference} — a reference to a single target ({!target}), stored
- as a nullable foreign key for a content, or as a plain column for a static
- list;
- - {!Typ.MultiReference} — a reference to several targets of the same kind,
+ - {!Types.Text} — a string, stored as a nullable column;
+ - {!Types.Integer} — an integer, stored as a nullable column;
+ - {!Types.MonoReference} — a reference to a single target ({!target}),
+ stored as a nullable foreign key for a content, or as a plain column for a
+ static list;
+ - {!Types.MultiReference} — a reference to several targets of the same kind,
stored in a dedicated table ["content.field"].
- A {!Typ.reference} record carries the target of a reference field (a
+ A {!Types.reference} record carries the target of a reference field (a
{!target}) plus optional [constraints] restricting the allowed values. The
data provided for a field when inserting/updating is a [Value.value] (from
the value package): [None] (leave as is), [V] (a single value) or [Seq] (a
sequence of references, for multivalued fields). *)
-type ('db, 'ocaml) typ = ('db, 'ocaml, target) Typ.t
+type ('db, 'ocaml) typ = ('db, 'ocaml, target) Types.t
(** A field type descriptor ; ['db] is the database representation of the field
(e.g. [string option] for a text field, [int64] for a multivalued reference)
*)
@@ -116,7 +116,7 @@ module Reference = Reference
necessarily exists, and resolved once all contents are registered. This is
what allows contents to reference each other, including cyclically. *)
-type reference = target Typ.reference
+type reference = target Types.reference
(** A reference field target: a {!target}, plus optional constraints *)
module Data = Data
@@ -147,7 +147,7 @@ module Field = Field
(** A field of a content.
A field has a {!Identifier.t} name, a [label] as a list of
- [(language, text)] pairs, a {!Typ.field_ex} type, a [required] flag, and
+ [(language, text)] pairs, a {!Types.field_ex} type, a [required] flag, and
optionally a [placeholder], [validation] rules (a {!Dsl} expression plus a
per-language error message) and a [criteria] controlling when the field is
displayed. Build one with {!Field.create}. *)