package sqlgg

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

Install

Dune Dependency

Authors

Maintainers

Sources

sqlgg-20231201.tar.gz
md5=0841965b140612b9b1fb066cc21f88cb
sha256=7fbee5972b8fa0488bf31bb482101c93c328f67ceef3e95af165d554736d78fe
sha512=5d14e03e02f62c72c57cc574fd9f637e99118556a739af16d71e8813a8cbd8c330e48d69b9577ef2e9d0227aee9d85664cb4907f479927b7431e0475d954fa1a

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
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_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_Bool_nullable : row -> int -> Types.Bool.t option
Sourceval get_column_Int_nullable : row -> int -> Types.Int.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 start_params : statement -> int -> params
Sourceval finish_params : params -> result
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_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 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 -> 'r) -> 'r 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 -> 'r) -> 'r

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

  • raises Oops

    on error

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

Execute non-query.

  • raises Oops

    on error

  • returns

    number of affected rows

OCaml

Innovation. Community. Security.