From b05e2d2be7be28ee6c577671002797cf9abaf177 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 20 Nov 2026 16:23:53 +0100 Subject: New module for working with Values --- lib/model/model.mli | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/model/model.mli') diff --git a/lib/model/model.mli b/lib/model/model.mli index f51386c..6cf2b11 100644 --- a/lib/model/model.mli +++ b/lib/model/model.mli @@ -39,7 +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, and the values carried by fields. + - {!Typ} — 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. @@ -97,9 +98,9 @@ module Typ = Typ stored in a dedicated table ["content.field"]. A {!Typ.reference} record carries the target of a reference field (a - {!target}) plus optional [constraints] restricting the allowed values. A - {!Typ.value} is the data provided for a field when inserting/updating: - {!Typ.None} (leave as is), {!Typ.V} (a single value) or {!Typ.Seq} (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 typ = ('db, target) Typ.t @@ -136,9 +137,6 @@ module Section = Section type section = target Section.t (** A section of {!content} *) -type value = target Typ.value -(** A value provided for a field when inserting/updating data *) - module Field = Field (** A field of a content. -- cgit v1.2.3