Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
module Type : sig ... end
Defines all supported SQL types.
module Expr : sig ... end
Provides an SQL E-DSL for writing well-typed SQL expressions.
module Schema : sig ... end
Provides an E-DSL for specifying SQL tables in OCaml.
module Query : sig ... end
Provides an E-DSL for specifying SQL queries in OCaml.
module Request : sig ... end
module StaticSchema : sig ... end
Provides a helper interface, primarily for prototyping/debugging, that declares a static table without any versioning.
module VersionedSchema : sig ... end
Provides an interface that declares a versioned schema.
val exec :
(module Caqti_lwt.CONNECTION) ->
(unit, [< `Zero ]) Request.t ->
(unit, [> Caqti_error.call_or_retrieve ]) Stdlib.result Lwt.t
exec db req
executes a unit SQL request req
on the SQL database db
.
val find :
(module Caqti_lwt.CONNECTION) ->
('a, [< `One ]) Request.t ->
('a, [> Caqti_error.call_or_retrieve ]) Stdlib.result Lwt.t
find db req
executes a singleton SQL request req
on the SQL database db
returning the result.
val find_opt :
(module Caqti_lwt.CONNECTION) ->
('a, [< `One | `Zero ]) Request.t ->
('a option, [> Caqti_error.call_or_retrieve ]) Stdlib.result Lwt.t
find_opt db req
executes a zero-or-one SQL request req
on the SQL database db
returning the result if it exists.
val collect_list :
(module Caqti_lwt.CONNECTION) ->
('a, [< `Many | `One | `Zero ]) Request.t ->
('a list, [> Caqti_error.call_or_retrieve ]) Stdlib.result Lwt.t
collect_list db req
executes a SQL request req
on the SQL database db
and collects the results into a list.