-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add role to specific actor and target role set * add transitional dependency module for targets * refactor guardian, add transistency, add recursive and/or effects * add parent type to dependency registration * refacture structure and rename components * use specific spec types * consistent api, rename variables, update doc
- Loading branch information
Showing
29 changed files
with
1,513 additions
and
1,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
exception Exception of string | ||
|
||
type connection_type = | ||
| SinglePool of string | ||
| MultiPools of (string * string) list | ||
|
||
module type ConfigSig = sig | ||
val database : connection_type | ||
val database_pool_size : int | ||
end | ||
|
||
module DefaultConfig : ConfigSig | ||
|
||
module type Sig = sig | ||
val initialize : unit -> unit | ||
|
||
val fetch_pool | ||
: ?ctx:(string * string) list | ||
-> unit | ||
-> (Caqti_lwt.connection, Caqti_error.t) Caqti_lwt.Pool.t | ||
|
||
val add_pool : ?pool_size:int -> string -> string -> unit | ||
|
||
val find | ||
: ?ctx:(string * string) list | ||
-> ('a, 'b, [< `One ]) Caqti_request.t | ||
-> 'a | ||
-> 'b Lwt.t | ||
|
||
val find_opt | ||
: ?ctx:(string * string) list | ||
-> ('a, 'b, [< `One | `Zero ]) Caqti_request.t | ||
-> 'a | ||
-> 'b option Lwt.t | ||
|
||
val collect | ||
: ?ctx:(string * string) list | ||
-> ('a, 'b, [< `Many | `One | `Zero ]) Caqti_request.t | ||
-> 'a | ||
-> 'b list Lwt.t | ||
|
||
val exec | ||
: ?ctx:(string * string) list | ||
-> ('a, unit, [< `Zero ]) Caqti_request.t | ||
-> 'a | ||
-> unit Lwt.t | ||
end | ||
|
||
module Make : functor (Config : ConfigSig) -> sig | ||
include Sig | ||
|
||
val transaction | ||
: ?ctx:(string * string) list | ||
-> (Caqti_lwt.connection -> 'a) | ||
-> 'a Lwt.t | ||
|
||
val transaction' | ||
: ?ctx:(string * string) list | ||
-> (Caqti_lwt.connection -> ('a, [< Caqti_error.t ]) result) | ||
-> 'a Lwt.t | ||
|
||
val query | ||
: ?ctx:(string * string) list | ||
-> (Caqti_lwt.connection -> 'a Lwt.t) | ||
-> 'a Lwt.t | ||
|
||
val query' | ||
: ?ctx:(string * string) list | ||
-> (Caqti_lwt.connection -> ('a, [< Caqti_error.t ]) result Lwt.t) | ||
-> 'a Lwt.t | ||
end | ||
[@@warning "-67"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
module Pools = Database_pools | ||
module MariaDb = Mariadb_backend | ||
module Sqlite = Sqlite3_backend |
Oops, something went wrong.