Connection
A connection to a specific database, used to execute statements and manage transactions.
Inheritors
Properties
Functions
Acquires a prepared statement for sql, reusing one from the connection's internal cache if available. The returned statement reports close() as a "release" — the underlying handle is reset and returned to the cache for the next call. Callers must use the standard .use { } pattern; the connection itself owns the real lifetime and physically closes all cached statements on Connection.close.
Best-effort asynchronous cancellation of any statement currently executing on this connection. Designed to be called from a thread OTHER than the one blocked inside a kdbc call — that is the point: higher-level code (e.g. a Kotlin coroutine cancellation handler) can interrupt a running query without waiting for it.
Driver-specific recovery after cancel has interrupted a blocking call. Invoked by the coroutine cancellation path on the thread that owned the blocking call, once that call has returned with an error.
Reports the connection's current auto-commit state. Default true matches the JDBC convention so callers don't need to special-case unknown drivers; native implementations override with the real value tracked by their kdbc_conn struct.
Creates a prepared statement for the given SQL. Set returnGeneratedKeys to retrieve auto-generated keys after execution.
Creates a callable statement for invoking stored procedures.
Releases a savepoint, freeing database resources.
Enables or disables auto-commit mode. When disabled, changes must be explicitly committed.
Creates a named savepoint within the current transaction.