diff options
| author | Sébastien Dailly <sebastien@dailly.me> | 2026-11-19 08:47:29 +0100 |
|---|---|---|
| committer | Sébastien Dailly <sebastien@dailly.me> | 2026-11-19 08:47:29 +0100 |
| commit | a9628fda0fc027c54b5ed5313a0c41731d79e41f (patch) | |
| tree | 9240bc709d0f93336b20fb3d6b3b6cb2e8a35423 /lib/query/create.ml | |
| parent | 36e895119c80d52e0d3a3695a3cf3d93e41bcd3e (diff) | |
Create all the datatypes in a single time.
Use aliases for the type name for clarification
Diffstat (limited to 'lib/query/create.ml')
| -rw-r--r-- | lib/query/create.ml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/query/create.ml b/lib/query/create.ml index 05aec0f..a40e722 100644 --- a/lib/query/create.ml +++ b/lib/query/create.ml @@ -36,7 +36,7 @@ ADD FOREIGN KEY (best_a_id) REFERENCES answer(a_id); *) -let get_foreign_statement : Model.Identifier.t -> _ Model.Content.t -> string = +let get_foreign_statement : Model.Identifier.t -> Model.content -> string = fun property content -> "FOREIGN KEY(" ^ Model.Identifier.quote property @@ -49,9 +49,9 @@ let get_foreign_statement : Model.Identifier.t -> _ Model.Content.t -> string = (** Create the dedicated table required for multivaluated fields *) let create_external_reference_table : Caqti_lwt.connection -> - Model.Reference.t Model.Content.t -> + Model.content -> foreign list -> - Model.Reference.t Model.Field.t -> + Model.field -> foreign list Lwt.t = fun db content acc field -> match Model.Field.type_ field with @@ -98,9 +98,9 @@ let create_external_reference_table : (** Generate the create table for a content *) let rec create_table : Caqti_lwt.connection -> - foreign list * Model.Reference.t Model.Content.t list -> - _ Model.Content.t -> - (foreign list * Model.Reference.t Model.Content.t list) Lwt.t = + foreign list * Model.content list -> + Model.content -> + (foreign list * Model.content list) Lwt.t = fun db (alter_queries, created) content -> let module Identifier = Model.Identifier in (* The foreign keys are added at the end of the query, and need to be |
