Package-level declarations

Types

Link copied to clipboard
class BuilderException(message: String, cause: Throwable? = null) : RuntimeException

Exception thrown when a query cannot be built correctly due to invalid state or missing mandatory clauses (e.g., DELETE without WHERE).

Link copied to clipboard
Link copied to clipboard
class ConcurrencyException(val errorType: ConcurrencyErrorType, queryContext: QueryContext?, cause: Throwable?) : DatabaseException

Concurrency and transaction-related issues (e.g., deadlocks, timeouts).

Link copied to clipboard
class ConnectionException(message: String, queryContext: QueryContext? = null, cause: Throwable?) : DatabaseException

Infrastructure and connectivity issues.

Link copied to clipboard
class ConstraintViolationException(val messageEnum: ConstraintViolationExceptionMessage, val tableName: String? = null, val columnName: String? = null, val constraintName: String? = null, queryContext: QueryContext?, cause: Throwable?) : DatabaseException

Errors during SQL execution in the database related to data integrity constraints.

Link copied to clipboard
class ConversionException(val messageEnum: ConversionExceptionMessage, val value: Any? = null, val targetType: String? = null, val rowData: Map<String, Any?>? = null, val propertyName: String? = null, cause: Throwable? = null, queryContext: QueryContext? = null) : DatabaseException

Errors related to conversion, parsing, or mapping data between Postgres and Kotlin.

Link copied to clipboard
sealed class DatabaseException(message: String, cause: Throwable? = null, queryContext: QueryContext? = null, includeCauseInToString: Boolean = true) : RuntimeException

Base sealed exception for most Octavius Database errors. Only InitializationException and BuilderException are excluded as they are thrown and can't be inside DataResult

Link copied to clipboard
class InitializationException(val messageEnum: InitializationExceptionMessage, val details: String? = null, cause: Throwable? = null, val queryContext: QueryContext? = null) : RuntimeException

Exception thrown during the initialization phase of Octavius Database. This exception indicates a fatal configuration or infrastructure error and is intentionally excluded from the DatabaseException hierarchy to avoid being handled by regular query error logic.

Link copied to clipboard
data class QueryContext(val sql: String, val parameters: Map<String, Any?>, val dbSql: String? = null, val dbParameters: List<Any?>? = null, val transactionStepIndex: Int? = null)

Context of a database operation execution.

Link copied to clipboard
class StatementException(val messageEnum: StatementExceptionMessage, val detail: String? = null, queryContext: QueryContext?, cause: Throwable?) : DatabaseException
Link copied to clipboard
class StepDependencyException(val messageEnum: StepDependencyExceptionMessage, val referencedStepIndex: Int, val args: Any, cause: Throwable? = null, queryContext: QueryContext? = null) : DatabaseException

Thrown when a reference to a result from a previous step (TransactionValue.FromStep) is invalid and cannot be resolved.

Link copied to clipboard
class TypeRegistryException(val messageEnum: TypeRegistryExceptionMessage, val typeName: String, cause: Throwable? = null, queryContext: QueryContext? = null) : DatabaseException
Link copied to clipboard
class UnknownDatabaseException(message: String, queryContext: QueryContext? = null, cause: Throwable?) : DatabaseException

Functions

Link copied to clipboard
inline fun checkBuilder(value: Boolean, lazyMessage: () -> Any)

Throws a BuilderException with the result of calling lazyMessage if the value is false.

Link copied to clipboard
inline fun requireBuilder(value: Boolean, lazyMessage: () -> Any)

Throws a BuilderException with the result of calling lazyMessage if the value is false.