summaryrefslogtreecommitdiff
path: root/lib/query/insert.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-19 11:57:17 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-19 11:57:17 +0100
commitd1047791e9e25bc5a30ffc62f31c3d898843f042 (patch)
tree724936abe391c80630c36ec464aee386ff1782aa /lib/query/insert.mli
parent8708171877054c98aad45079d85d4e699420f2fe (diff)
Insert list data
Diffstat (limited to 'lib/query/insert.mli')
-rw-r--r--lib/query/insert.mli11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/query/insert.mli b/lib/query/insert.mli
index ef8c5c9..32251ac 100644
--- a/lib/query/insert.mli
+++ b/lib/query/insert.mli
@@ -8,6 +8,17 @@ val insert :
int64 Lwt.t
(** See [Query.insert] *)
+val insert_list :
+ Caqti_lwt.connection ->
+ Model.list ->
+ (string -> Model.value) ->
+ int64 Lwt.t
+(** Insert a row in the dedicated table of a static list, and return its id.
+
+ The [provider] is called with the name of each field of the list to get its
+ value, like [insert]. Multivalued fields are inserted in their dedicated
+ table, with the parent pointing to the inserted list row. *)
+
val insert_references :
Caqti_lwt.connection ->
Model.content ->