Module type Rel_sql.DIALECT

SQL satements in a given dialect.

This does not always try to abstract SQL per se but rather what we want to do with the SQL. For example DIALECT.schema_changes: in SQLite most ALTER TABLE statements are unsupported so the returned statement implement the sequence of operations that allow to mimic them in bulk.

val kind : string

kind is the kind of dialect. Usually the name of the database management system.

Inserts

val insert_into : ?or_action:insert_or_action -> ?schema:Rel.Schema.name -> ?ignore:'r Rel.Col.def list -> 'r Rel.Table.t -> 'r -> unit Stmt.t
val insert_into_cols : ?schema:Rel.Schema.name -> ?ignore:'r Rel.Col.def list -> 'r Rel.Table.t -> 'r Rel.Col.value list -> unit Stmt.t
val update : ?schema:Rel.Schema.name -> 'r Rel.Table.t -> set:'r Rel.Col.value list -> where:'r Rel.Col.value list -> unit Stmt.t
val delete_from : ?schema:string -> 'r Rel.Table.t -> where:'r Rel.Col.value list -> unit Stmt.t

Data definition statements

val create_table : ?schema:Rel.Schema.name -> ?if_not_exists:unit -> 'r Rel.Table.t -> unit Stmt.t
val drop_table : ?schema:Rel.Schema.name -> ?if_exists:unit -> 'r Rel.Table.t -> unit Stmt.t
val create_index : ?schema:Rel.Schema.name -> ?if_not_exists:unit -> 'r Rel.Table.t -> 'r Rel.Table.Index.t -> unit Stmt.t
val drop_index : ?schema:Rel.Schema.name -> ?if_exists:unit -> 'r Rel.Table.t -> 'r Rel.Table.Index.t -> unit Stmt.t
val schema_changes : ?schema:Rel.Schema.name -> Rel.Schema.change list -> bool * unit Stmt.t list