summaryrefslogtreecommitdiff
path: root/lib/model/typ.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/model/typ.ml')
-rw-r--r--lib/model/typ.ml10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/model/typ.ml b/lib/model/typ.ml
index 2770885..d736be0 100644
--- a/lib/model/typ.ml
+++ b/lib/model/typ.ml
@@ -12,7 +12,7 @@ type ('db, 't) t =
| Text : (string option, 't) t
| Integer : (int64 option, 't) t
| MonoReference : 't reference -> (int64 option, 't) t
- | MultiReference : 't reference -> (int64 option, 't) t
+ | MultiReference : 't reference -> (int64, 't) t
(** Multireferences properties allows only one kind of content.
They are not encoded in the content table but in another table *)
@@ -28,8 +28,8 @@ let map : type a. ('ref1 -> 'ref2) -> (a, 'ref1) t -> (a, 'ref2) t =
let default_value : type a. (a, _) t -> a = function
| Integer -> None
| Text -> None
- | MultiReference _ -> None
| MonoReference _ -> None
+ | MultiReference _ -> raise Not_found
let eq : type a b c. (a, c) t -> (b, c) t -> (a, b) Type.eq option =
fun t1 t2 ->
@@ -56,7 +56,9 @@ Example for inserting data
*)
type 't value =
- | V : ('a option, 't) t * 'a -> '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 *)
- | None (** None tell the field is empty in the database *)
+ | Seq : (int64, 't) t * int64 Seq.t -> 't value
+ (** Get a sequence of values for a multivaluated field *)