sql: CREATE INDEX
[sqlgg.git] / src / stmt.ml
blobd3ba2cdf172cd9199a3169bbf0a6433e6e2a7087
1 (** Statement *)
3 open Printf
4 open ExtString
5 open ListMore
7 (** optional name and start/end position in string *)
8 type param_id = string option * (int * int) deriving (Show)
9 type param = param_id * Sql.Type.t deriving (Show)
10 type params = param list deriving (Show)
12 let params_to_string ps = Show.show<params>(ps)
14 type kind = | Select of bool (** true if result is single row *)
15 | Insert of RA.Schema.t option (** inserted *) * string (** table name *)
16 | Create of string
17 | CreateIndex of string
18 | Update of string option (** name for single-table UPDATEs *)
19 | Delete of string
20 | Alter of string
21 | Drop of string
22 | Other
23 deriving (Show)
25 type t = { schema : RA.Schema.t; params : params; kind : kind; props : Props.t; }