Repodb.Pool.Make

repodb · API reference

Parameters

module D : Driver.S

Signature

type nonrec t = D.connection t
type conn = D.connection
val create : 
  max_size:int ->
  conninfo:string ->
  ?validate:(D.connection -> bool) ->
  unit ->
  D.connection t
val acquire : 'a t -> ('a, pool_error) result
val acquire_blocking : ?timeoutf:float -> 'a t -> ('a, pool_error) result
val release : 'a t -> 'a -> unit
val with_connection : 'a t -> ('a -> 'b) -> ('b, pool_error) result
val with_connection_blocking : 
  ?timeoutf:float ->
  'a t ->
  ('a -> 'b) ->
  ('b, pool_error) result
val drain : 'a t -> unit
val shutdown : 'a t -> unit
val stats : 'a t -> stats
val size : 'a t -> int
val available : 'a t -> int
val in_use : 'a t -> int
val is_closed : 'a t -> bool
module Multi : sig ... end