package caqti-lwt

  1. Overview
  2. Docs

Module Caqti_lwtSource

Prerequisities for connecting to databases using Lwt

This module contains most of the prerequisite types and modules. Functions to establish database connections are provided by the caqti-lwt.unix and caqti-mirage libraries. Pool instances are also found there due to additional OS dependencies.

Sourcemodule Stream : Caqti_stream_sig.S with type 'a fiber := 'a Lwt.t
Sourcemodule Switch : Caqti_switch_sig.S with type 'a fiber := 'a Lwt.t
Sourcemodule type CONNECTION = Caqti_connection_sig.S with type 'a fiber := 'a Lwt.t and type ('a, 'e) stream := ('a, 'e) Stream.t
Sourcetype connection = (module CONNECTION)
Sourceval or_fail : ('a, [< Caqti_error.t ]) result -> 'a Lwt.t

Converts an error to an Lwt future failed with a Caqti_error.Exn exception holding the error.

OCaml

Innovation. Community. Security.