package sihl

  1. Overview
  2. Docs
include module type of struct include Sihl_persistence.Database end
val log_src : Logs.src
val pool_ref : (Caqti_lwt.connection, Caqti_error.t) Caqti_lwt.Pool.t option Stdlib.ref
val prepare_requests : string -> string -> string -> 'a Caqti_type.t -> (int, 'a, [ `Many | `One | `Zero ]) Caqti_request.t * (int, 'a, [ `Many | `One | `Zero ]) Caqti_request.t * (string * int, 'a, [ `Many | `One | `Zero ]) Caqti_request.t * (string * int, 'a, [ `Many | `One | `Zero ]) Caqti_request.t
val run_request : (module Caqti_lwt.CONNECTION) -> (('a, 'b, [< `Many | `One | `Zero ]) Caqti_request.t * ('a, 'b, [< `Many | `One | `Zero ]) Caqti_request.t * ('c * 'a, 'b, [< `Many | `One | `Zero ]) Caqti_request.t * ('c * 'a, 'b, [< `Many | `One | `Zero ]) Caqti_request.t) -> [< `Asc | `Desc ] -> 'c option -> 'a -> 'b list Lwt.t
type config = Sihl_persistence.Database.config = {
  1. url : string;
  2. pool_size : int option;
}
val config : string -> int option -> config
val schema : (string, string -> int option -> config, config) Conformist.t
val raise_error : ('a, [< Caqti_error.t ]) Stdlib.result -> 'a
val print_pool_usage : ('a, 'b) Caqti_lwt.Pool.t -> unit
val fetch_pool : unit -> (Caqti_lwt.connection, Caqti_error.t) Caqti_lwt.Pool.t
val transaction : (Caqti_lwt.connection -> 'a Lwt.t) -> 'a Lwt.t
val query : (Caqti_lwt.connection -> 'a Lwt.t) -> 'a Lwt.t
val used_database : unit -> Sihl_contract.Database.database_type option
val start : unit -> unit Lwt.t
val stop : unit -> unit Lwt.t
val register : unit -> Core.Container.Service.t
module Setup : sig ... end
OCaml

Innovation. Community. Security.