Repodb.Cqrs.Make

repodb · API reference

Parameters

module D : Driver.S

Signature

type nonrec t = D.connection t
val create : D.connection config -> D.connection t
val with_read : 'a t -> ('a -> 'b) -> ('b, Pool.pool_error) result
val with_write : 'a t -> ('a -> 'b) -> ('b, Pool.pool_error) result
val with_primary : 'a t -> ('a -> 'b) -> ('b, Pool.pool_error) result
val with_replica : 'a t -> ('a -> 'b) -> ('b, Pool.pool_error) result
val transaction : 
  D.connection t ->
  (D.connection -> ('a, Error.db_error) result) ->
  ('a, Error.db_error) result
val has_replicas : 'a t -> bool
val count_healthy_replicas : 'a t -> int
val mark_replica_healthy : 'a t -> int -> unit
val mark_replica_unhealthy : 'a t -> int -> unit
val stats : 'a t -> stats
val shutdown : 'a t -> unit
val route_query_type : Query.query_type -> intent