package caqti
Unified interface to relational database libraries
Install
Dune Dependency
Authors
Maintainers
Sources
caqti-v2.2.4.tbz
sha256=b8ea432820154ec095132c4f7b244b06cd8553e0b2035185b844d9c4f30af8bb
sha512=b7e3ad8e6a9b587db2d517e15cd42df2945148f9223b2fa6f4bc2bcdd2709d53549cca4b65e54511d22466e4c9aa7f0b9c17305a07505519d8bf81d95de629b8
doc/caqti.platform/Caqti_platform/Request_utils/index.html
Module Caqti_platform.Request_utils
Source
Internal request-related utilities.
Queries
Source
type linear_param =
| Linear_param : int * 'a Caqti_template.Field_type.t * 'a -> linear_param
linear_param_length templ
is the number of linear parameters expected by a query represented by templ
.
Source
val linear_param_order :
?subst:Caqti_template.Query.subst ->
Caqti_template.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.
Source
val linear_query_string :
?subst:Caqti_template.Query.subst ->
Caqti_template.Query.t ->
string
linear_query_string templ
is templ
where "?"
is substituted for parameters and quoted strings.
Parameter Encoding and Row Decoding
Source
val raise_encode_missing :
uri:Uri.t ->
field_type:'a Caqti_template.Field_type.t ->
unit ->
'counit
Source
val raise_encode_rejected :
uri:Uri.t ->
typ:'a Caqti_template.Row_type.t ->
Caqti_error.msg ->
'counit
Source
val raise_encode_failed :
uri:Uri.t ->
typ:'a Caqti_template.Row_type.t ->
Caqti_error.msg ->
'counit
Source
val raise_decode_missing :
uri:Uri.t ->
field_type:'a Caqti_template.Field_type.t ->
unit ->
'counit
Source
val raise_decode_rejected :
uri:Uri.t ->
typ:'a Caqti_template.Row_type.t ->
Caqti_error.msg ->
'counit
Source
type 'a field_encoder = {
write_value : 'b. uri:Uri.t -> 'b Caqti_template.Field_type.t -> 'b -> 'a -> 'a;
write_null : 'b. uri:Uri.t -> 'b Caqti_template.Field_type.t -> 'a -> 'a;
} constraint 'e = [> `Encode_rejected of Caqti_error.coding_error ]
Source
val encode_param :
uri:Uri.t ->
'a field_encoder ->
'b Caqti_template.Row_type.t ->
'b ->
'a ->
'a
Source
type 'a field_decoder = {
read_value : 'b. uri:Uri.t -> 'b Caqti_template.Field_type.t -> 'a -> 'b * 'a;
skip_null : int -> 'a -> 'a option;
} constraint 'e = [> `Decode_rejected of Caqti_error.coding_error ]
Source
val decode_row :
uri:Uri.t ->
'a field_decoder ->
'b Caqti_template.Row_type.t ->
'a ->
'b * 'a
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page