remove locally used scripts
[sqlgg.git] / impl / sqlgg_traits.ml
bloba84c6e9c6018ed432836d79eb8ff15ea85112ef5
1 (** *)
3 module type M = sig
5 type statement
6 type connection
8 (** datatypes *)
9 type num = int64
10 type text = string
11 type any = text
13 exception Oops of string
15 val get_column_Int : statement -> int -> num
16 val get_column_Text : statement -> int -> text
17 val get_column_Any : statement -> int -> any
19 (** [set_param_* stmt index val]. [index] is 0-based,
20 @raise Oops on error *)
21 val set_param_null : statement -> int -> unit
22 val set_param_Text : statement -> int -> text -> unit
23 val set_param_Any : statement -> int -> any -> unit
24 val set_param_Int : statement -> int -> num -> unit
26 (**
27 Perform query and return results via callback for each row
28 @raise Oops on error
30 val select : connection -> string -> (statement -> unit) -> (statement -> unit) -> unit
32 (**
33 Perform query and return first row if available
34 @raise Oops on error
36 val select1 : connection -> string -> (statement -> unit) -> (statement -> 'b) -> 'b option
38 (** Execute non-query.
39 @raise Oops on error
40 @return true if successful
42 val execute : connection -> string -> (statement -> unit) -> bool
44 end