3 (** optional name and start/end position in string *)
4 type param_id
= string option * (int * int) deriving
(Show
)
5 type param
= param_id
* Sql.Type.t deriving
(Show
)
6 type params
= param list deriving
(Show
)
8 let params_to_string ps
= Show.show
<params
>(ps
)
10 type insert_kind
= Values
| Assign deriving
(Show
)
12 (** inferred inserted values to complete sql statement *)
13 type inferred
= (insert_kind
* RA.Schema.t
) option deriving
(Show
)
15 type cardinality
= [`Zero_one
| `One
| `Nat
] deriving
(Show
)
17 let cardinality_to_string c
= Show.show
<cardinality
>(c
)
19 type kind
= | Select
of cardinality
(** possible number of rows *)
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
; }