From bc78bea63b7c75e8a9d222dc86fb75ed293a2242 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sat, 21 Nov 2026 12:22:50 +0100 Subject: Renamed the module Typ into Types --- lib/value/value.mli | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lib/value/value.mli') diff --git a/lib/value/value.mli b/lib/value/value.mli index 9ebbca6..eb03965 100644 --- a/lib/value/value.mli +++ b/lib/value/value.mli @@ -9,7 +9,7 @@ type value = Model.target Model.Data.any val none : value (** [none]: the field is empty (or left as is, on update) *) -val single : ('db, 'ocaml, Model.target) Model.Typ.t * 'ocaml -> value +val single : ('db, 'ocaml, Model.target) Model.Types.t * 'ocaml -> value (** [single (typ, data)]: the value for the field, in its code representation ['ocaml] — a single value, or an [int64 Seq.t] for a multivalued reference — together with the type [typ] of the field *) @@ -35,20 +35,22 @@ val id : t -> int64 than [get v id_ref] when the raw [int64] is what is needed (e.g. to run a query on the row) *) -val id_ref : Model.target Model.Typ.monoreference Model.Typ.named -(** The pre-built {!Model.Typ.named} handle of the reserved field ["id"] +val id_ref : Model.target Model.Types.monoreference Model.Types.named +(** The pre-built {!Model.Types.named} handle of the reserved field ["id"] ({!Model.Identifier.id}) — an integer field present in every row, content or list. This is the key to read the primary key of any value. *) -val get : t -> ('db, 'ocaml, Model.target) Model.Typ.t Model.Typ.named -> 'ocaml +val get : + t -> ('db, 'ocaml, Model.target) Model.Types.t Model.Types.named -> 'ocaml (** Read a field of the value and return its data directly in its code representation ['ocaml] — e.g. [get v id_ref : int64 option] is the primary key of [v], and a multivalued reference field would yield an [int64 Seq.t]. The match between the requested named type and the readable field is proved - by {!Model.Typ.provably_equal} on name and type. The reserved field [id_ref] - is always readable; the other fields are read from the value's dictionary - (populated by {!load} or {!load'}) and raise [Not_found] when absent. *) + by {!Model.Types.provably_equal} on name and type. The reserved field + [id_ref] is always readable; the other fields are read from the value's + dictionary (populated by {!load} or {!load'}) and raise [Not_found] when + absent. *) val load : Caqti_lwt.connection -> Model.target -> Int64.t -> t Lwt.t (** [load db target id] builds the value for the row [id] of [target] — a -- cgit v1.2.3