123456789101112131415161718192021222324252627282930313233343536373839404142434445(** Statement *)openExtLibtypeinsert_kind=Values|Assign[@@derivingshow{with_path=false}](** inferred inserted values to complete sql statement *)typeinferred=(insert_kind*Sql.schema)option[@@derivingshow](** possible number of rows in query result *)typecardinality=[`Zero_one|`One|`Nat][@@derivingshow]letcardinality_to_string=show_cardinalitytypekind=|Selectofcardinality|Insertofinferred*Sql.table_name|CreateofSql.table_name|CreateIndexofstring|UpdateofSql.table_nameoption(** name for single-table UPDATEs *)|DeleteofSql.table_namelist|AlterofSql.table_namelist|DropofSql.table_name|CreateRoutineofSql.table_name(** namespaced function name *)|CreateTypeofstring|DropTypeofstring|Other[@@derivingshow{with_path=false}]typecategory=DDL|DQL|DML|DCL|TCL|OTHER[@@derivingshow{with_path=false},enum]letall_categories=List.init(max_category-min_category)(funi->Option.get@@category_of_enum@@min_category+i)letcategory_of_stmt_kind=function|Select_->DQL|Insert_|Update_|Delete_->DML|Create_|CreateIndex_|CreateRoutine_|Alter_|Drop_|CreateType_|DropType_->DDL|Other->OTHER