package caqti

  1. Overview
  2. Docs
Unified interface to relational database libraries

Install

Dune Dependency

Authors

Maintainers

Sources

caqti-v1.8.0.tbz
sha256=2630233f335f910290e24b318ac7f6e712b3109fb55581b2b8c324127a9a4b12
sha512=9ce23cbc02b9d6c856a8db0713dbb1aa393aa43bc1d565121420636f7f6fa1ed64c7269e98cfeb92b5e9c8e23e42e2e8e1705b5fe978abd3c3f0cc3259d32b98

doc/caqti/Caqti_driver_lib/index.html

Module Caqti_driver_libSource

Internal: Library for Drivers

Sourceval linear_param_length : ?env:(string -> Caqti_query.t) -> Caqti_query.t -> int

linear_param_length templ is the number of linear parameters expected by a query represented by templ.

Sourceval linear_param_order : ?env:(string -> Caqti_query.t) -> Caqti_query.t -> int list list * (int * string) list

linear_param_order templ describes the parameter bindings expected for templ after linearizing parameters and lifting quoted strings out of the query:

  • The first is a list where item number i is a list of linear parameter positions to which to bind the ith incoming parameter.
  • The second is a list of pairs where the first component is the position of the linear parameter taking the place of a quoted string, and the second component is the quoted string to bind to this parameter.

All positions are zero-based.

Sourceval linear_query_string : ?env:(string -> Caqti_query.t) -> Caqti_query.t -> string

linear_query_string templ is templ where "?" is substituted for parameters and quoted strings.

Sourcetype ('a, 'e) field_encoder = {
  1. write_value : 'b. uri:Uri.t -> 'b Caqti_type.Field.t -> 'b -> 'a -> ('a, 'e) result;
  2. write_null : 'b. uri:Uri.t -> 'b Caqti_type.Field.t -> 'a -> ('a, 'e) result;
} constraint 'e = [> `Encode_rejected of Caqti_error.coding_error ]
Sourceval encode_param : uri:Uri.t -> ('a, 'e) field_encoder -> 'b Caqti_type.t -> 'b -> 'a -> ('a, 'e) result
Sourcetype ('a, 'e) field_decoder = {
  1. read_value : 'b. uri:Uri.t -> 'b Caqti_type.Field.t -> 'a -> ('b * 'a, 'e) result;
  2. skip_null : int -> 'a -> 'a option;
} constraint 'e = [> `Decode_rejected of Caqti_error.coding_error ]
Sourceval decode_row : uri:Uri.t -> ('a, 'e) field_decoder -> 'b Caqti_type.t -> 'a -> ('b * 'a, 'e) result
OCaml

Innovation. Community. Security.