package sihl

  1. Overview
  2. Docs
include module type of struct include Sihl_persistence.Database end
val log_src : Logs.src
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 ]) result -> 'a
val print_pool_usage : ('a, 'b) Caqti_lwt.Pool.t -> unit
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.