package sqlgg
SQL Guided (code) Generator
Install
Dune Dependency
Authors
Maintainers
Sources
sqlgg-20200521.tar.gz
md5=b9e861726ce73364e303f0cc1d5ec049
sha256=b9bfd29dc5c880c324ed77ec333053317fd0806f5a64b573b5031ee7fc227deb
sha512=5f73a65b5cf5c17788a75f64b3def21a9d8e53b32a876a4fee4570317a20b48ca69879e9dadaa399d7e57f2e9d262850650bcb031fd90f6bf21abdf8d99ce1a6
doc/src/sqlgg.lib/stmt.ml.html
Source file stmt.ml
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 30 31 32 33 34 35 36 37 38 39 40 41
(** Statement *) open ExtLib type insert_kind = Values | Assign [@@deriving show {with_path=false}] (** inferred inserted values to complete sql statement *) type inferred = (insert_kind * Sql.Schema.t) option [@@deriving show] (** possible number of rows in query result *) type cardinality = [`Zero_one | `One | `Nat] [@@deriving show] let cardinality_to_string = show_cardinality type kind = | Select of cardinality | Insert of inferred * Sql.table_name | Create of Sql.table_name | CreateIndex of string | Update of Sql.table_name option (** name for single-table UPDATEs *) | Delete of Sql.table_name | Alter of Sql.table_name list | Drop of Sql.table_name | CreateRoutine of string | Other [@@deriving show {with_path=false}] type category = DDL | DQL | DML | DCL | TCL | OTHER [@@deriving show {with_path=false}, enum] let all_categories = List.init (max_category - min_category) (fun i -> Option.get @@ category_of_enum @@ min_category + i) let category_of_stmt_kind = function | Select _ -> DQL | Insert _ | Update _ | Delete _ -> DML | Create _ | CreateIndex _ | CreateRoutine _ | Alter _ | Drop _ -> DDL | Other -> OTHER
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>