prepare release 0.4.1
[sqlgg.git] / lib / stmt.ml
blob57b906c83de3e89ea5516c2f281670ee067712a8
1 (** Statement *)
3 type insert_kind = Values | Assign deriving(Show)
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 c = Show.show<cardinality>(c)
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)
23 type t = { schema : Sql.Schema.t; params : Sql.params; kind : kind; props : Props.t; }