diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-11-22 13:58:16 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-11-22 13:58:16 +0100 |
| commit | 056fcabaeec238a7aa927df39a90acea028b1aa0 (patch) | |
| tree | 3246359561eb2375e85da4537e05a083a1348467 /test/common.ml | |
| parent | bc78bea63b7c75e8a9d222dc86fb75ed293a2242 (diff) | |
Added an option for loading a value content without the multivaluated fields (allow single query)main
Diffstat (limited to 'test/common.ml')
| -rw-r--r-- | test/common.ml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/common.ml b/test/common.ml index 7b486b4..f3fe83a 100644 --- a/test/common.ml +++ b/test/common.ml @@ -205,14 +205,16 @@ let provider_for : Model.content -> Int64.t -> string -> Value.value = (List.of_seq (Model.Content.fields content)) row field_name -(** Render a [(named, data)] pair as a single line, whatever the field type *) +(** Render a [(name, typ), data] triple as a single line, whatever the field + type *) let show_field : 'db 'ocaml. - ('db, 'ocaml, Model.target) Model.Types.t Model.Types.named -> + Model.Identifier.t -> + ('db, 'ocaml, Model.target) Model.Types.t -> 'ocaml -> string = - fun named data -> - let name = Model.Identifier.to_string (Model.Types.name named) in + fun field_name typ data -> + let name = Model.Identifier.to_string field_name in let show : type db ocaml. (db, ocaml, Model.target) Model.Types.t -> ocaml -> string = fun typ data -> @@ -235,7 +237,7 @@ let show_field : ^ String.concat "," (List.map Int64.to_string targets) ^ "]" in - show (Model.Types.typ named) data + show typ data (** Read a configuration from the standard input and run [f] with a fresh in-memory database created from it *) |
