OctaviusSessionOperations

Defines a set of core operations that can be executed on an active database session. These operations do not include explicit transaction lifecycle management (commit, rollback, auto-commit).

Inheritors

Properties

Link copied to clipboard
abstract val copy: CopyManager

Provides an API for performing PostgreSQL COPY operations.

Link copied to clipboard

Provides an API for managing PostgreSQL Large Objects.

Link copied to clipboard
abstract var networkTimeout: Int

The network timeout (in milliseconds) for operations executed on this session.

Link copied to clipboard

Handles asynchronous PostgreSQL notifications (LISTEN / NOTIFY mechanism).

Link copied to clipboard
abstract var readOnly: Boolean

Indicates whether this session is currently in read-only mode.

Link copied to clipboard

Provides a high-level API for executing operations within transaction scopes (e.g., required, nested). Automatically manages commits and rollbacks based on block execution outcomes.

Link copied to clipboard

The transaction isolation level for this session.

Link copied to clipboard

The current transaction state of this session (Idle, In Transaction, or Failed).

Link copied to clipboard
abstract val typeManager: TypeManager

Manages PostgreSQL types and their OIDs, providing functionality for registration and resolution.

Functions

Link copied to clipboard
abstract fun abort()

Manually aborts the connection, forcing the underlying connection pool (like HikariCP) to evict it instead of returning it to the pool.

Link copied to clipboard
abstract fun cancelQuery()

Attempts to cancel the currently executing query on this session.

Link copied to clipboard

Creates a query with named parameters (e.g., @name, @id) which will be translated into positional parameters under the hood.

Link copied to clipboard

Creates a native query from the provided SQL string using standard PostgreSQL positional parameters (e.g. $1, $2).

Link copied to clipboard
abstract fun getSearchPath(): List<String>

Retrieves the current search_path configured for this session.

Link copied to clipboard
abstract fun isValid(timeout: Int): Boolean

Checks if this session is still valid and the underlying connection is alive.

Link copied to clipboard
abstract fun reloadTypes()

Reloads the database types and updates internal OID mappings.