blob: 24e059126701f184af0648c88d7eb56ee0ab05d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
val insert :
Caqti_lwt.connection ->
Model.Reference.t Model.Content.t ->
?parent:int64 ->
(string -> Model.Reference.t Model.Typ.value) ->
int64 Lwt.t
(** Insert a new element and return the ID.
[insert db content ~parent provider] will create the content in the
database.
The parent is required if the content is a subcontent. Not providing the
parameter will raise the error [TypeMismatch].
For each field in the content, the function [provider] will be called with
the name for this property. The value returned shall match the expected type
for this property, the exception [TypeMismatch] is raised otherwise.
This is a low-level function: there is no representation for the content
itself, and no functionnals controls are realized. *)
val create : Caqti_lwt.connection -> Configuration.Ast.setting -> unit Lwt.t
val update :
Caqti_lwt.connection ->
Int64.t ->
Model.Reference.t Model.Content.t ->
(string -> Model.Reference.t Model.Typ.value) ->
unit Lwt.t
|