fix paths
[sqlgg.git] / src / stmt.ml
blob4f403d684f205c9ec62f80ae00fd190db461dccc
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
15 | Insert of RA.Schema.t option (** inserted *) * string (** table name *)
16 | Create of string
17 | Update of string option (* name for single-table UPDATEs *)
18 | Delete of string
19 | Alter of string
20 | Drop of string
21 | Other
22 deriving (Show)
24 type t = { schema : RA.Schema.t; params : params; kind : kind; props : Props.t; }