package caqti
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4c84a16d983d0fed2786f536a3fa4d8fa113b8b30b4deea4a74772582d5489b2
md5=42a2e2d3b73d7fbaecc618549aad2865
doc/caqti.v1/Caqti1_query/index.html
Module Caqti1_querySource
(v1) One-shot and prepared queries.
The exception to raise in a callback passed to the various query functions below, to indicate that a query language is unsupported.
The type of one-shot queries.
type prepared_query = private {pq_index : int;(*A relatively small integer unique to each query, made available to backends for efficient caching of language dependent data.
*)pq_name : string;(*A name to use for the prepared query.
*)pq_encode : Caqti_driver_info.t -> string;(*The SQL for each query language.
*)
}The type of prepared queries.
type query = | Oneshot of oneshot_query(*A one-shot query.
*)| Prepared of prepared_query(*A prepared query.
*)
The type of queries accepted by the CONNECTION API.
Create a one-shot family of query strings indexed by full query language descriptors.
Create a one-shot family of query strings indexed by language tags.
Create a one-shot query string indiscriminately passed to any backend.
Create a one-shot query string expected to work with any SQL dialect.
val oneshot_sql_p :
?env:(Caqti_driver_info.dialect_tag -> string -> string) ->
string ->
queryCreate a one-shot query string expected to work with any SQL dialect after conversion of parameters.
Create a prepared statement dispatching on the full query language descriptor.
Create a prepared statement dispatching on the language tag.
Create a prepared statement accepted by any backend. This only makes sense if backend are known to be restricted to a set sharing a common query string. Consider using prepare_sql or oneshot instead.
Create a prepared statement expected to work with any SQL dialect.
val prepare_sql_p :
?name:string ->
?env:(Caqti_driver_info.dialect_tag -> string -> string) ->
string ->
queryCreate a prepared statement expected to work with any SQL dialect after conversion of parameters.
An informative analogue of query, used for error reporting. For prepared queries, the first constructor argument is the name of the query.
make_query_info backend query extracts the query string from query as seen by backend, for use in logging and error reporting.