diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-11-20 16:23:53 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-11-20 16:23:53 +0100 |
| commit | b05e2d2be7be28ee6c577671002797cf9abaf177 (patch) | |
| tree | 0474684d619721024f0a6cb132cf2f4d2e84c344 /lib/model/typ.ml | |
| parent | c4ca180fd7c2085e3ce3f8e32aa0c2cb724f4c53 (diff) | |
New module for working with Values
Diffstat (limited to 'lib/model/typ.ml')
| -rw-r--r-- | lib/model/typ.ml | 22 |
1 files changed, 0 insertions, 22 deletions
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 *) |
