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/typ.ml | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'lib/model/typ.ml') diff --git a/lib/model/typ.ml b/lib/model/typ.ml index 6168c4c..173f08f 100644 --- a/lib/model/typ.ml +++ b/lib/model/typ.ml @@ -44,25 +44,3 @@ let eq : type a b c. (a, c) t -> (b, c) t -> (a, b) Type.eq option = | Text, Text -> Some Type.Equal | _ -> None -(** Represent the value in the database for a given field. - -Example for inserting data -[ - (* Function providing a value for each field to insert in the database *) - - let f : string -> Model.value = function - | "siret" -> V (Model.Typ.Text, Some "siret") - | "name" -> V (Model.Typ.Text, Some "name") - | _ -> None - - let* id = Query.insert db entity_content f in -] - -*) -type 't value = - | None (** None tell the field is empty in the database *) - | V : ('a option, 't) t * 'a option -> 't value - (** V is the value for the field. The field type is also reported in order - to give the compiler the nature of the data *) - | Seq : (int64, 't) t * int64 Seq.t -> 't value - (** Get a sequence of values for a multivaluated field *) -- cgit v1.2.3