Typed scoped SQL sessions and transaction ownership for MoonBit
Dependencies
pub(all) suberror SqlError {
Closed
Saturated
CheckoutTimeout
InvalidConfig(String)
SessionReleased
SessionFailed
OperationInProgress
CommitOutcomeUnknown(Error)
CleanupFailed(Error?, Error)
AmbiguousColumn(String)
ColumnNotFound(String)
CombinedResultUnavailable
}pub struct Database[P, R, M, O] {
// private fields
}pub(all) struct Driver[C, P, R, M, O] {
acquire : async () -> C
release : async (C, Bool) -> Unit
close : () -> Unit
executor : Executor[C, P, R, M]
begin : async (C, O) -> Unit
commit : async (C) -> Unit
rollback : async (C) -> Unit
}pub struct Session[P, R, M] {
// private fields
}pub struct Status {
leased : Int
acquiring : Int
max_leases : Int
max_waiters : Int
closed : Bool
}Install
Download zipTyped scoped SQL sessions and transaction ownership for MoonBit
Dependencies