OctaviusConnection

internal class OctaviusConnection(val stream: PgStream, val databaseKey: DatabaseKey, maxParameterWriterCapacity: Int?, initialParameterWriterCapacity: Int?, logParameterValues: Boolean) : Connection

Represents a connection to a database within the Octavius Framework. It implements the standard JDBC Connection interface but overrides certain behaviors to fit the framework's architecture.

Constructors

Link copied to clipboard
constructor(stream: PgStream, databaseKey: DatabaseKey, maxParameterWriterCapacity: Int?, initialParameterWriterCapacity: Int?, logParameterValues: Boolean)

Properties

Link copied to clipboard
open override var autoCommit: Boolean
Link copied to clipboard
open override var catalog: String
Link copied to clipboard
Link copied to clipboard
open override var clientInfo: Properties
Link copied to clipboard
internal val databaseKey: DatabaseKey
Link copied to clipboard
open override var holdability: Int
Link copied to clipboard
open override val isClosed: Boolean
Link copied to clipboard
Link copied to clipboard
open override var isReadOnly: Boolean
Link copied to clipboard
open override val metaData: DatabaseMetaData
Link copied to clipboard
open override val networkTimeout: Int
Link copied to clipboard
Link copied to clipboard
open override var schema: String
Link copied to clipboard

The transaction state as the server reported it on its last ReadyForQuery, a waiting BEGIN not counted.

Link copied to clipboard
internal val stream: PgStream
Link copied to clipboard
open override var transactionIsolation: Int
Link copied to clipboard

The transaction state as the session reports it: the server's, with the BEGIN still waiting counted in.

Link copied to clipboard
open override var typeMap: MutableMap<String, Class<*>>
Link copied to clipboard
open override val warnings: SQLWarning?

Functions

Link copied to clipboard
open override fun abort(executor: Executor?)
Link copied to clipboard
open fun beginRequest()
Link copied to clipboard

Asks the server to abandon whatever this connection is currently running.

Link copied to clipboard

Raises unless this connection is still usable, checking both what was asked of it and what happened to it — a connection closed by the caller and one whose stream broke underneath are different failures and are reported as different SQLSTATEs.

Link copied to clipboard
open override fun clearWarnings()
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun commit()

Commits, and leaves the next transaction to the next statement.

Link copied to clipboard
open override fun createArrayOf(typeName: String?, elements: Array<out Any>?): Array
Link copied to clipboard
open override fun createBlob(): Blob
Link copied to clipboard
open override fun createClob(): Clob
Link copied to clipboard
open override fun createNClob(): NClob
Link copied to clipboard
open override fun createSQLXML(): SQLXML
Link copied to clipboard
open override fun createStatement(): Statement
open override fun createStatement(resultSetType: Int, resultSetConcurrency: Int): Statement
open override fun createStatement(resultSetType: Int, resultSetConcurrency: Int, resultSetHoldability: Int): Statement
Link copied to clipboard
open override fun createStruct(typeName: String?, attributes: Array<out Any>?): Struct
Link copied to clipboard
internal fun deferTransactionTerms(terms: String)

Hands terms - SET TRANSACTION, SET LOCAL - to the transaction auto-commit was just turned off for, to go out with its BEGIN.

Link copied to clipboard
open fun endRequest()
Link copied to clipboard
open override fun getAutoCommit(): Boolean
Link copied to clipboard
open override fun getCatalog(): String
Link copied to clipboard
open override fun getClientInfo(): Properties
open override fun getClientInfo(name: String?): String
Link copied to clipboard
open override fun getHoldability(): Int
Link copied to clipboard
open override fun getMetaData(): DatabaseMetaData
Link copied to clipboard
open override fun getNetworkTimeout(): Int
Link copied to clipboard

Retrieves a new OctaviusSession from this Connection.

Link copied to clipboard
open override fun getSchema(): String
Link copied to clipboard

Retrieves the entries of the current search path, as the server reads the setting it last reported.

Link copied to clipboard
open override fun getTransactionIsolation(): Int
Link copied to clipboard

The schemas the server looks an unqualified type name up in, in its order - what type names resolve against.

Link copied to clipboard
open override fun getTypeMap(): MutableMap<String, Class<*>>
Link copied to clipboard
open override fun getWarnings(): SQLWarning?
Link copied to clipboard
open override fun isClosed(): Boolean
Link copied to clipboard
open override fun isReadOnly(): Boolean
Link copied to clipboard
open override fun isValid(timeout: Int): Boolean
Link copied to clipboard
open override fun isWrapperFor(iface: Class<*>): Boolean
Link copied to clipboard
open override fun nativeSQL(sql: String?): String
Link copied to clipboard
open override fun prepareCall(sql: String?): CallableStatement
open override fun prepareCall(sql: String?, resultSetType: Int, resultSetConcurrency: Int): CallableStatement
open override fun prepareCall(sql: String?, resultSetType: Int, resultSetConcurrency: Int, resultSetHoldability: Int): CallableStatement
Link copied to clipboard
open override fun prepareStatement(sql: String?): PreparedStatement
open override fun prepareStatement(sql: String?, columnNames: Array<out String>?): PreparedStatement
open override fun prepareStatement(sql: String?, autoGeneratedKeys: Int): PreparedStatement
open override fun prepareStatement(sql: String?, columnIndexes: IntArray?): PreparedStatement
open override fun prepareStatement(sql: String?, resultSetType: Int, resultSetConcurrency: Int): PreparedStatement
open override fun prepareStatement(sql: String?, resultSetType: Int, resultSetConcurrency: Int, resultSetHoldability: Int): PreparedStatement
Link copied to clipboard
open override fun releaseSavepoint(savepoint: Savepoint?)
Link copied to clipboard
open override fun rollback()

Rolls back, on the same terms as commit.

open override fun rollback(savepoint: Savepoint?)
Link copied to clipboard
open override fun setAutoCommit(autoCommit: Boolean)

Switches auto-commit, sending nothing that is not needed.

Link copied to clipboard
open override fun setCatalog(catalog: String?): Nothing
Link copied to clipboard
open override fun setClientInfo(properties: Properties?): Nothing
open override fun setClientInfo(name: String?, value: String?): Nothing
Link copied to clipboard
open override fun setHoldability(holdability: Int): Nothing
Link copied to clipboard
open override fun setNetworkTimeout(executor: Executor?, milliseconds: Int)
Link copied to clipboard
open override fun setReadOnly(readOnly: Boolean)
Link copied to clipboard
open override fun setSavepoint(): Savepoint
open override fun setSavepoint(name: String?): Savepoint
Link copied to clipboard
open override fun setSchema(schema: String?): Nothing
Link copied to clipboard
open fun setShardingKey(shardingKey: ShardingKey?)
open fun setShardingKey(shardingKey: ShardingKey?, superShardingKey: ShardingKey?)
Link copied to clipboard
open fun setShardingKeyIfValid(shardingKey: ShardingKey?, timeout: Int): Boolean
open fun setShardingKeyIfValid(shardingKey: ShardingKey?, superShardingKey: ShardingKey?, timeout: Int): Boolean
Link copied to clipboard
open override fun setTransactionIsolation(level: Int)
Link copied to clipboard
open override fun setTypeMap(map: MutableMap<String, Class<*>>?): Nothing
Link copied to clipboard
open override fun <T> unwrap(iface: Class<T>): T
Link copied to clipboard
inline fun <T : Any> Connection.unwrap(): T

Unwraps this Connection to an instance of the specified type T.