package caqti
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Unified interface to relational database libraries
Install
dune-project
Dependency
Authors
Maintainers
Sources
caqti-v3.1.0.tbz
sha256=43cfd7d41627be269449d1f17c4962876d2b383d12fe8c0574e0e07aa3d95243
sha512=b46dcf9e7c012aeefa80f143c840c80d7acd6bb30cd1657486d1adfe345d3570078667caeed728865905c9afd73083ffb1b6983cad7f7ef30e35550506c94c22
doc/caqti.platform/Caqti_platform/Request_utils/index.html
Module Caqti_platform.Request_utilsSource
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 listlinear_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
iis a list of linear parameter positions to which to bind theith incoming parameter.
- The second is a list of
Linear_param (i, t, v)whereiis the position of the linear parameter taking the place of a embedded value,tis its field type, andvis the value itself.
All positions are zero-based.
Source
val linear_query_string :
annotate:bool ->
?subst:Caqti.Template.Query.subst ->
Caqti.Template.Query.t ->
stringlinear_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 ->
'counitSource
val raise_encode_rejected :
uri:Uri.t ->
typ:'a Caqti.Template.Row_type.t ->
Caqti.Error.msg ->
'counitSource
val raise_encode_failed :
uri:Uri.t ->
typ:'a Caqti.Template.Row_type.t ->
Caqti.Error.msg ->
'counitSource
val raise_decode_missing :
uri:Uri.t ->
field_type:'a Caqti.Template.Field_type.t ->
unit ->
'counitSource
val raise_decode_rejected :
uri:Uri.t ->
typ:'a Caqti.Template.Row_type.t ->
Caqti.Error.msg ->
'counitSource
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 ->
'aSource
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