todo -1
[sqlgg.git] / stmt.ml
blob5642db6317c39de8174a49cd0f6c60a32d985aba
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_type = Sql.Type.t option deriving (Show)
10 type param = param_id * param_type deriving (Show)
11 type params = param list deriving (Show)
13 let params_to_string ps = Show.show<params>(ps)
15 type kind = | Select
16 | Insert of RA.Schema.t option (** inserted *) * string (** table name *)
17 | Create of string
18 | Update of string
19 | Delete of string
20 | Alter of string
21 | Drop of string
22 deriving (Show)
24 type t = { schema : RA.Schema.t; params : params; kind : kind; props : Props.t; }