From fa4970bf1b74f3fa0b2f63cbd461d98c251dc0f0 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 20 Nov 2026 18:47:26 +0100 Subject: Updated the model for representing ocaml types in the application type --- test/insert.ml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test/insert.ml') diff --git a/test/insert.ml b/test/insert.ml index ae5748e..1b12596 100644 --- a/test/insert.ml +++ b/test/insert.ml @@ -42,7 +42,11 @@ let insert_and_get_result : Query.insert ?parent db content (fun v -> match List.assoc_opt v entry with Some v -> v | None -> Value.none) in - let id = Value.id inserted in + let id = + match Value.get inserted Value.id_ref with + | Some id -> id + | None -> assert false + in let content_id = Model.Identifier.to_string (Model.Content.id content) in let module Db = (val db) in let* json_result = Db.find (Common.content_as_json content) id in @@ -132,7 +136,7 @@ and reference_value : (fun ids -> Lwt.return ( key, - Value.multi + Value.single ( Model.Typ.MultiReference reference, List.to_seq (List.map ~f:Int64.of_int ids) ) )) (S.list S.int) @@ -160,7 +164,7 @@ and reference_value : in Lwt.return ( key, - Value.multi + Value.single (Model.Typ.MultiReference reference, List.to_seq ids) )) else let** props = properties db target in -- cgit v1.2.3