tests: actually exit with error code on failure
[sqlgg.git] / lib / stmt.ml
blobe17049fb0b23153037a6a11ea2aa576f94479994
1 (** Statement *)
3 type insert_kind = Values | Assign [@@deriving show {with_path=false}]
5 (** inferred inserted values to complete sql statement *)
6 type inferred = (insert_kind * Sql.Schema.t) option [@@deriving show]
8 type cardinality = [`Zero_one | `One | `Nat] [@@deriving show]
10 let cardinality_to_string = show_cardinality
12 type kind = | Select of cardinality (** possible number of rows *)
13 | Insert of inferred * string (** table *)
14 | Create of string
15 | CreateIndex of string
16 | Update of string option (** name for single-table UPDATEs *)
17 | Delete of string
18 | Alter of string
19 | Drop of string
20 | Other
21 [@@deriving show {with_path=false}]
23 type t = { schema : Sql.Schema.t; params : Sql.params; kind : kind; props : Props.t; }