package sihl-persistence

  1. Overview
  2. Docs
module Core = Sihl_core
val log_src : Logs.src
module Logs : Logs.LOG
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, 'b, [ `Many | `One | `Zero ]) Caqti_request.t * (int, 'c, [ `Many | `One | `Zero ]) Caqti_request.t * (string * int, 'd, [ `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 * ('c, 'd, [< `Many | `One | `Zero ]) Caqti_request.t * ('e * 'f, 'g, [< `Many | `One | `Zero ]) Caqti_request.t * ('h * 'i, 'j, [< `Many | `One | `Zero ]) Caqti_request.t) -> [< `Asc | `Desc ] -> 'k option -> 'l -> 'b list Lwt.t
type 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 -> 'b
val print_pool_usage : ('a, 'b) Caqti_lwt.Pool.t -> unit
val transaction : (Caqti_lwt.connection -> 'a Lwt.t) -> 'b Lwt.t
val query : (Caqti_lwt.connection -> 'a Lwt.t) -> 'b 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