summaryrefslogtreecommitdiff
path: root/lib/query/insert.mli
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2026-11-21 11:23:41 +0100
committerSébastien Dailly <sebastien@dailly.me>2026-11-21 11:23:41 +0100
commitce13c93cf14cb71894481b0303a7058a72a6f4ce (patch)
treebd93186a65f6645cb4401f188d266d743cc2fde7 /lib/query/insert.mli
parent172a02b80d8dbdcfe09129d7fa76015bb5ec4d79 (diff)
Load values from the database
Diffstat (limited to 'lib/query/insert.mli')
-rw-r--r--lib/query/insert.mli15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/query/insert.mli b/lib/query/insert.mli
index a0ab6e9..d3e3de9 100644
--- a/lib/query/insert.mli
+++ b/lib/query/insert.mli
@@ -3,18 +3,17 @@
val insert :
Caqti_lwt.connection ->
Model.content ->
- ?parent:Model.content Value.t ->
- (string -> Value.value) ->
- Model.content Value.t Lwt.t
+ ?parent:Int64.t ->
+ (string -> Model.target Model.Data.any) ->
+ int64 Lwt.t
(** See [Query.insert] *)
val insert_list :
Caqti_lwt.connection ->
Model.list ->
- (string -> Value.value) ->
- Model.list Value.t Lwt.t
-(** Insert a row in the dedicated table of a static list, and return it as a
- value.
+ (string -> Model.target Model.Data.any) ->
+ 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
@@ -25,7 +24,7 @@ val insert_references :
Model.content ->
Int64.t ->
Model.Identifier.t ->
- Value.value ->
+ Model.target Model.Data.any ->
(Int64.t, _) Intf.data ->
unit Lwt.t
(** Insert a list of references for a content. This function is used during the