(** Operations on the values stored in the database (fetching, updating, …). A value is one row of a content or list table in the database. *) module Fields = Fields (** The fields of a value, each with its associated data *) module Data = Data (** The data carried by a field: {!Data.data}, parameterized over the type of the data held, built with the smart constructors ([Data.none], [Data.v], [Data.seq]); and {!Data.any}, the existential pack used when the held type is not known statically *) type value = Model.target Data.any (** The data of a field of a content or a list, whatever the type of the data held: an existential pack over {!Data.data} *) val none : value (** [none]: the field is empty (or left as is, on update) *) val single : ('a, Model.target) Model.Typ.t * 'a -> value (** [single (typ, data)]: a single value for the field, together with the type [typ] of the field *) val multi : (int64, Model.target) Model.Typ.t * int64 Seq.t -> value (** [multi (typ, ids)]: a sequence of references for a multivalued field *) type 'a t (** A value: a row of the table of the content or list ['a], identified by its [id]. The parameter ['a] is the content or the static list whose table holds the row: [Model.content] for contents ([Model.content Value.t]) and [Model.list] for lists ([Model.list Value.t]). The type is abstract: a value is built with [v] and inspected with [content] and [id]. *) val v : 'a -> int64 -> 'a t (** Build a value from its content or list and its row id *) val content : 'a t -> 'a (** The content or list the value belongs to *) val id : 'a t -> int64 (** The primary key of the value in its table *)