DataResult
The outcome of a database operation: a value, or the failure that replaced it.
The result style - dbResult, transactionResult and asResult - returns one for the failures the database reports: a violated constraint, a deadlock, a routine's RAISE EXCEPTION, a timeout. A failure that means the calling code is wrong is thrown instead.
Type Parameters
The type of the value carried on success.
Inheritors
Types
Functions
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.
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.