Package-level declarations
Types
The outcome of a database operation: a value, or the failure that replaced it.
Hands out queries and sessions, and runs transactions over them.
The only implementation of OctaviusClient, doing everything through its SessionProvider.
Carries a DataResult.Failure out of a transaction that rolls back only on a throw. Built without a stack trace, since it never reaches the caller.
Functions
Runs block and returns what it produced as a DataResult: a failure the application is expected to handle becomes DataResult.Failure, and one that means the calling code is wrong is still thrown.
Returns the carried value, or what onFailure makes of the whole DataResult.Failure - which it can return as it is, for an early exit:
Returns the carried value, or throws the carried failure.
Whether this failure says the calling code is wrong, so that the result style throws it rather than returning it. Decided by the exception's type, never by its reason.
Applies transform to the value of a DataResult.Success, and returns a DataResult.Failure as it stands.
Runs action on the failure if this is a DataResult.Failure, and returns this result either way.
Runs action on the carried value if this is a DataResult.Success, and returns this result either way.