Functions

Link copied to clipboard
abstract fun asStep(): StepBuilderMethods

Converts this builder to a StepBuilder that enables lazy execution within a transaction. Returns a wrapper with terminal methods that create TransactionStep instead of executing the query.

Link copied to clipboard
abstract fun asStream(fetchSize: Int = 100): StreamingTerminalMethods

Switches the builder to streaming mode, optimal for large datasets. Requires using streaming-specific terminal methods like forEachRow(). REQUIRES ACTIVE TRANSACTION. This method must be called inside a DataAccess.transaction { ... } block. Otherwise, PostgreSQL will ignore fetchSize and load everything into RAM.

Link copied to clipboard
abstract fun async(scope: CoroutineScope, ioDispatcher: CoroutineDispatcher = Dispatchers.IO): AsyncTerminalMethods

Switches the builder to asynchronous mode. Requires providing a CoroutineScope in which operations will be launched.

Link copied to clipboard
abstract fun copy(): T

Creates and returns a deep copy of this builder. Returns the concrete builder type (e.g., SelectQueryBuilder), maintaining API fluency.