package sihl
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=bfa7bde9af02bb83d5ca39d54797b05b43317f033d93d24ca86ca42ff8ef83a1
sha512=6bb8727f65116e8042aa1fb77b3c14851ce5238f7b412adadf0f8e5b52d5310e8f06056c96bf76a82ffd7096753f49b2b0482f41e18ee1ca94310b874fe81bf9
doc/sihl.database/Database/Service/Default/index.html
Module Service.Default
Source
include Core.Container.Service.Sig
Create a database connection pool. Raises Data_db_core.Exception
.
Create a database connection pool and attach the pool to an empty context.
Create a database connection pool and attach to provided context.
val query :
Core.Ctx.t ->
(Caqti_lwt.connection -> ('a, Caqti_error.t) Result.t Lwt.t) ->
'a Lwt.t
Run a database query.
The context has to contain a database connection or a database connection pool.
Run a database query on a single connection. Can be used to set session variables that are bound to the same connection.
Run a database query atomically on a connection.
The context has to contain a database connection or a database connection pool. Fetch a database connection from context if necessary to make sure, that every query runs on the same connection.
Disables foreign key checks if supported by the database.
Use very carefully, data might become inconsistent!