package caqti
Unified interface to relational database libraries
Install
Dune Dependency
Authors
Maintainers
Sources
caqti-v2.1.2.tbz
sha256=ba4dfd5ff94376b5e003f682410b7b3b392c0bbaa0253679fe7671c2e07e895b
sha512=0416807fba620429ee4d64f3a6991238112e0e10dfba9703dced46cf332fd22135a9873007d025441228ce66fb192bf730d4bc776dd2c1a973d7604ab6e789e0
doc/caqti.platform/Caqti_platform/Request_utils/index.html
Module Caqti_platform.Request_utils
Source
Internal request-related utilities.
Queries
linear_param_length templ
is the number of linear parameters expected by a query represented by templ
.
Source
val linear_param_order :
?env:(string -> Caqti_query.t) ->
Caqti_query.t ->
int list list * linear_param 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 thei
th incoming parameter.
- The second is a list of
Linear_param (i, t, v)
wherei
is the position of the linear parameter taking the place of a embedded value,t
is its field type, andv
is the value itself.
All positions are zero-based.
linear_query_string templ
is templ
where "?"
is substituted for parameters and quoted strings.
Parameter Encoding and Row Decoding
Source
type 'a field_encoder = {
write_value : 'b. uri:Uri.t -> 'b Caqti_type.Field.t -> 'b -> 'a -> 'a;
write_null : 'b. uri:Uri.t -> 'b Caqti_type.Field.t -> 'a -> 'a;
} constraint 'e = [> `Encode_rejected of Caqti_error.coding_error ]
Source
type 'a field_decoder = {
read_value : 'b. uri:Uri.t -> 'b Caqti_type.Field.t -> 'a -> 'b * 'a;
skip_null : int -> 'a -> 'a option;
} constraint 'e = [> `Decode_rejected of Caqti_error.coding_error ]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page