Parameter Make.Impl

include Sqlgg_traits.M_control_io
include Sqlgg_traits.M
type statement
type -'a connection
type params
type row
type result
type execute_response = {
  1. affected_rows : int64;
  2. insert_id : int64 option;
}
module Types : sig ... end

datatypes

type num = Types.Int.t
type text = Types.Text.t
type any = Types.Any.t
type datetime = Types.Datetime.t
exception Oops of string
val get_column_Bool : row -> int -> Types.Bool.t
val get_column_Int : row -> int -> Types.Int.t
val get_column_UInt64 : row -> int -> Unsigned.UInt64.t
val get_column_Text : row -> int -> Types.Text.t
val get_column_Any : row -> int -> Types.Any.t
val get_column_Float : row -> int -> Types.Float.t
val get_column_Decimal : row -> int -> Types.Decimal.t
val get_column_Datetime : row -> int -> Types.Datetime.t
val get_column_Json : row -> int -> Types.Json.t
val get_column_Json_path : row -> int -> Types.Json_path.t
val get_column_One_or_all : row -> int -> Types.One_or_all.t
val get_column_Bool_nullable : row -> int -> Types.Bool.t option
val get_column_Int_nullable : row -> int -> Types.Int.t option
val get_column_UInt64_nullable : row -> int -> Unsigned.UInt64.t option
val get_column_Text_nullable : row -> int -> Types.Text.t option
val get_column_Any_nullable : row -> int -> Types.Any.t option
val get_column_Float_nullable : row -> int -> Types.Float.t option
val get_column_Decimal_nullable : row -> int -> Types.Decimal.t option
val get_column_Datetime_nullable : row -> int -> Types.Datetime.t option
val get_column_Json_nullable : row -> int -> Types.Json.t option
val get_column_Json_path_nullable : row -> int -> Types.Json_path.t option
val get_column_One_or_all_nullable : row -> int -> Types.One_or_all.t option
val get_column_bool : row -> int -> bool
val get_column_bool_nullable : row -> int -> bool option
val get_column_int64 : row -> int -> int64
val get_column_int64_nullable : row -> int -> int64 option
val get_column_uint64 : row -> int -> Unsigned.UInt64.t
val get_column_uint64_nullable : row -> int -> Unsigned.UInt64.t option
val get_column_float : row -> int -> float
val get_column_float_nullable : row -> int -> float option
val get_column_decimal : row -> int -> float
val get_column_decimal_nullable : row -> int -> float option
val get_column_datetime : row -> int -> string
val get_column_datetime_nullable : row -> int -> string option
val get_column_string : row -> int -> string
val get_column_string_nullable : row -> int -> string option
val get_column_json : row -> int -> Sqlgg_trait_types.json
val get_column_json_nullable : row -> int -> Sqlgg_trait_types.json option
val get_column_json_path : row -> int -> Sqlgg_trait_types.json_path
val get_column_json_path_nullable : row -> int -> Sqlgg_trait_types.json_path option
val get_column_one_or_all : row -> int -> Sqlgg_trait_types.one_or_all
val get_column_one_or_all_nullable : row -> int -> Sqlgg_trait_types.one_or_all option
val start_params : statement -> int -> params
val set_param_null : params -> unit

set_param_* stmt index val. index is 0-based,

  • raises Oops

    on error

val set_param_Text : params -> Types.Text.t -> unit
val set_param_Any : params -> Types.Any.t -> unit
val set_param_Bool : params -> Types.Bool.t -> unit
val set_param_Int : params -> Types.Int.t -> unit
val set_param_UInt64 : params -> Unsigned.UInt64.t -> unit
val set_param_Float : params -> Types.Float.t -> unit
val set_param_Decimal : params -> Types.Decimal.t -> unit
val set_param_Datetime : params -> Types.Datetime.t -> unit
val set_param_Json : params -> Types.Json.t -> unit
val set_param_Json_path : params -> Types.Json_path.t -> unit
val set_param_One_or_all : params -> Types.One_or_all.t -> unit
val set_param_bool : params -> bool -> unit
val set_param_int64 : params -> int64 -> unit
val set_param_uint64 : params -> Unsigned.UInt64.t -> unit
val set_param_float : params -> float -> unit
val set_param_decimal : params -> float -> unit
val set_param_string : params -> string -> unit
val set_param_datetime : params -> float -> unit
val set_param_json : params -> Sqlgg_trait_types.json -> unit
val set_param_json_path : params -> Sqlgg_trait_types.json_path -> unit
val set_param_one_or_all : params -> Sqlgg_trait_types.one_or_all -> unit
module Make_enum (E : Sqlgg_traits.Enum) : sig ... end
include Sqlgg_traits.FNS with type params := params with type result := result with type 'a io_future := 'a with type 'a connection := 'a connection with type statement := statement with type row := row with type execute_response := execute_response
include Sqlgg_traits.FNS with type params := params with type result := result with type 'a io_future := 'a IO.future with type 'a connection := 'a connection with type statement := statement with type row := row with type execute_response := execute_response
val finish_params : params -> result IO.future
val no_params : statement -> result IO.future
val select : [> `RO ] connection -> string -> (statement -> result IO.future) -> (row -> unit) -> unit IO.future

Perform query (cardinality "any") and return results via callback for each row

  • raises Oops

    on error

val select_one_maybe : [> `RO ] connection -> string -> (statement -> result IO.future) -> (row -> 'b) -> 'b option IO.future

Perform query (cardinality "zero or one") and return first row if available

  • raises Oops

    on error

val select_one : [> `RO ] connection -> string -> (statement -> result IO.future) -> (row -> 'b) -> 'b IO.future

Perform query (cardinality "one") and return first row

  • raises Oops

    on error

val execute : [> `WR ] connection -> string -> (statement -> result IO.future) -> execute_response IO.future

Execute non-query.

  • raises Oops

    on error

val prepare : 'a connection -> string -> statement IO.future
val close_stmt : statement -> unit IO.future
val select_with_stmt : statement -> (statement -> result IO.future) -> (row -> unit) -> unit IO.future
val select_one_with_stmt : statement -> (statement -> result IO.future) -> (row -> 'a) -> 'a IO.future
val select_one_maybe_with_stmt : statement -> (statement -> result IO.future) -> (row -> 'a) -> 'a option IO.future
val execute_with_stmt : statement -> (statement -> result IO.future) -> execute_response IO.future