summaryrefslogtreecommitdiff
path: root/test/insert.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-20 18:47:26 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-20 18:47:26 +0100
commitfa4970bf1b74f3fa0b2f63cbd461d98c251dc0f0 (patch)
tree577a41415e67510f08f43fc48c794c36a10f6e80 /test/insert.ml
parentb05e2d2be7be28ee6c577671002797cf9abaf177 (diff)
Updated the model for representing ocaml types in the application type
Diffstat (limited to 'test/insert.ml')
-rw-r--r--test/insert.ml10
1 files changed, 7 insertions, 3 deletions
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