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 insert_kind
= Values
| Assign deriving
(Show
)
16 (** inferred inserted values to complete sql statement *)
17 type inferred
= (insert_kind
* RA.Schema.t
) option deriving
(Show
)
19 type kind
= | Select
of bool (** true if result is single row *)
20 | Insert
of inferred
* string (** table *)
22 | CreateIndex
of string
23 | Update
of string option (** name for single-table UPDATEs *)
30 type t
= { schema
: RA.Schema.t
; params
: params
; kind
: kind
; props
: Props.t
; }