package caqti
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=d688bd22f6fde5be5a755900545fade0d5fdce6dbcb0b85770d02dad87c41e7c
md5=d18745a703da336054c0d27e78f8be8a
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.