Package-level declarations

Types

Link copied to clipboard
class BadStatementException(val messageEnum: BadStatementExceptionMessage, val errorPosition: Int? = null, queryContext: QueryContext? = null, cause: Throwable?) : FatalDatabaseException

Exception thrown when a query is semantically or syntactically invalid.

Link copied to clipboard

Messages for BadStatementException categorized by their root cause.

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

Exception thrown when there are infrastructure or 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

Exception thrown when a database operation violates data integrity constraints.

Link copied to clipboard

Messages for ConstraintViolationException representing specific database integrity rules.

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

Base exception for recoverable database errors that are returned within io.github.octaviusframework.db.api.DataResult.

Link copied to clipboard
class DataOperationException(val messageEnum: DataOperationExceptionMessage, queryContext: QueryContext? = null, cause: Throwable? = null) : DatabaseException

Exception thrown during data operations that are syntactically correct but fail due to data content, result expectations, or permission issues.

Link copied to clipboard

Messages for DataOperationException related to data retrieval and permissions.

Link copied to clipboard
abstract class FatalDatabaseException(message: String, queryContext: QueryContext?, cause: Throwable?) : OctaviusException

Base class for non-recoverable database errors that are thrown immediately instead of being wrapped in io.github.octaviusframework.db.api.DataResult.

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

Exception thrown during the initialization phase of Octavius Database.

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

Base exception for all errors in Octavius Database.

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 StepDependencyException(val messageEnum: StepDependencyExceptionMessage, val referencedStepIndex: Int, val args: Any, cause: Throwable? = null) : FatalDatabaseException

Exception thrown when a reference to a result from a previous transaction step is invalid and cannot be resolved.

Link copied to clipboard

Exception thrown for concurrency-related issues and transaction lifecycle failures.

Link copied to clipboard

Messages for TransactionException covering concurrency and transaction lifecycle errors.

Link copied to clipboard
class TypeMappingException(val messageEnum: TypeMappingExceptionMessage, val value: Any? = null, val targetType: String? = null, val rowData: Map<String, Any?>? = null, val propertyName: String? = null, cause: Throwable? = null) : FatalDatabaseException

Exception thrown when data cannot be mapped between the database and Kotlin objects.

Link copied to clipboard

Messages for TypeMappingException occurring during conversion between Kotlin and PostgreSQL types.

Link copied to clipboard
class TypeRegistryException(val messageEnum: TypeRegistryExceptionMessage, val typeName: String, val oid: Int? = null, val expectedCategory: String? = null, val details: String? = null, cause: Throwable? = null, queryContext: QueryContext? = null) : FatalDatabaseException

Exception thrown when there is a mismatch or missing definition in the type registry.

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

Exception thrown when an error occurs in the database that is not recognized or categorized into a more specific DatabaseException subtype.

Functions

Link copied to clipboard
fun checkStatement(value: Boolean, messageEnum: BadStatementExceptionMessage = BadStatementExceptionMessage.MISSING_CLAUSE, details: () -> String)
Link copied to clipboard
inline fun requireStatement(value: Boolean, messageEnum: BadStatementExceptionMessage = BadStatementExceptionMessage.MISSING_CLAUSE, details: () -> String)