package sqlgg

  1. Overview
  2. Docs
SQL Guided (code) Generator

Install

dune-project
 Dependency

Authors

Maintainers

Sources

sqlgg-20260721.tbz
sha256=40d7699187951dd2f17d885c4f4f04124930bf7dc1119d4cca322c5f0cb42d8e
sha512=e7c90683cddcff3ca0ba9de9e40c2c4c69923ea62e2647f1a70083e42ed00b7cab53f8a14d1a965ee4465966bc02fa75fa7cb42e485beae1a9c26bdc252c3665

doc/sqlgg.traits/Sqlgg_traits/module-type-M/index.html

Module type Sqlgg_traits.MSource

Sourcetype statement
Sourcetype -'a connection
Sourcetype params
Sourcetype row
Sourcetype result
Sourcetype execute_response = {
  1. affected_rows : int64;
  2. insert_id : int64 option;
}
Sourcemodule Types : sig ... end

datatypes

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

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

  • raises Oops

    on error

Sourceval set_param_Text : params -> Types.Text.t -> unit
Sourceval set_param_Any : params -> Types.Any.t -> unit
Sourceval set_param_Bool : params -> Types.Bool.t -> unit
Sourceval set_param_Int : params -> Types.Int.t -> unit
Sourceval set_param_UInt64 : params -> Unsigned.UInt64.t -> unit
Sourceval set_param_Float : params -> Types.Float.t -> unit
Sourceval set_param_Decimal : params -> Types.Decimal.t -> unit
Sourceval set_param_Datetime : params -> Types.Datetime.t -> unit
Sourceval set_param_Json : params -> Types.Json.t -> unit
Sourceval set_param_Json_path : params -> Types.Json_path.t -> unit
Sourceval set_param_One_or_all : params -> Types.One_or_all.t -> unit
Sourceval set_param_bool : params -> bool -> unit
Sourceval set_param_int64 : params -> int64 -> unit
Sourceval set_param_uint64 : params -> Unsigned.UInt64.t -> unit
Sourceval set_param_float : params -> float -> unit
Sourceval set_param_decimal : params -> float -> unit
Sourceval set_param_string : params -> string -> unit
Sourceval set_param_datetime : params -> float -> unit
Sourceval set_param_json : params -> Sqlgg_trait_types.json -> unit
Sourceval set_param_json_path : params -> Sqlgg_trait_types.json_path -> unit
Sourceval set_param_one_or_all : params -> Sqlgg_trait_types.one_or_all -> unit
Sourcemodule Make_enum (E : Enum) : sig ... end
include 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
Sourceval finish_params : params -> result
Sourceval no_params : statement -> result
Sourceval select : [> `RO ] connection -> string -> (statement -> result) -> (row -> unit) -> unit

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

  • raises Oops

    on error

Sourceval select_one_maybe : [> `RO ] connection -> string -> (statement -> result) -> (row -> 'b) -> 'b option

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

  • raises Oops

    on error

Sourceval select_one : [> `RO ] connection -> string -> (statement -> result) -> (row -> 'b) -> 'b

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

  • raises Oops

    on error

Sourceval execute : [> `WR ] connection -> string -> (statement -> result) -> execute_response

Execute non-query.

  • raises Oops

    on error