package sihl

  1. Overview
  2. Docs
The modular functional web framework

Install

Dune Dependency

Authors

Maintainers

Sources

sihl-queue-0.1.6.tbz
sha256=574c73c97ea0bc57144853b28df6125855a040ef0378f3bf180b4331dde93f9d
sha512=92c474ed3b6609395799f77259fc424af37dcad53095773ca2f2cdd4757a1607a5b53b6594cd7b6ddabeb40ebba67bb9544ff0f31dc228c87cfe015afa520aaa

doc/sihl.database/Database/Service/index.html

Module Database.ServiceSource

Sourceval fetch_pool : unit -> (Caqti_lwt.connection, Caqti_error.t) Caqti_lwt.Pool.t

Creates and returns a database connection pool. Re-uses an already created pool. Raises Data_db_core.Exception.

Sourceval 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.

Sourceval atomic : Core.Ctx.t -> (Core.Ctx.t -> 'a Lwt.t) -> 'a Lwt.t

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.

Sourceval with_disabled_fk_check : Core.Ctx.t -> (Core.Ctx.t -> 'a Lwt.t) -> 'a Lwt.t

Disables foreign key checks if supported by the database.

Use very carefully, data might become inconsistent!

OCaml

Innovation. Community. Security.