Package-level declarations

Types

Link copied to clipboard

Builds a row of column-value pairs for SQL INSERT or UPDATE operations.

Link copied to clipboard

Default implementation of TransactionScope that delegates SQL execution to a DatabaseOperations.

Functions

Link copied to clipboard
suspend fun <T, E : Table<T>> DatabaseOperations.batchInsert(table: E, rows: List<Map<String, *>>): Long

Batch-inserts a list of pre-built row maps into table using a single parameterised statement. This is the only Map-based row entry point kept in the public API — it exists for the case where the source data is already in Map form (e.g. JSON-parsed, or transferred from another table) and you want one round-trip instead of N. For ordinary row construction, prefer the typed insert DSL.

Link copied to clipboard

Returns a DeleteBuilder targeting table.

Link copied to clipboard
suspend fun DatabaseOperations.deleteAll(table: Table<*>): Long

Deletes all rows from table and returns the number of affected rows.

Link copied to clipboard
suspend fun <T, E : Table<T>> DatabaseOperations.deleteWhere(table: E, condition: () -> ConditionalExpression): Long

Deletes rows from table matching where and returns the affected row count.

Link copied to clipboard
fun <T, E : Table<T>> DatabaseOperations.form(table: E): FormBuilder<T, E>

Alias for query.

Link copied to clipboard
suspend fun <T, E : Table<T>> DatabaseOperations.insert(table: E, builder: RowBuilder.() -> Unit): Long

Inserts a row built by builder into table and returns the row-id.

Link copied to clipboard
fun <T, E : Table<T>> DatabaseOperations.query(table: E): FormBuilder<T, E>

Starts a query builder for table.

Link copied to clipboard

Queries a single result row matching where from table, or null if none found.

Link copied to clipboard
suspend fun <T> DatabaseOperations.suspendTransaction(block: suspend TransactionScope.() -> T): T

Executes block inside a suspend transaction. Rolls back on any exception or cancellation.

Link copied to clipboard

Returns an UpdateBuilder targeting table.

Link copied to clipboard
suspend fun DatabaseOperations.updateAll(table: Table<*>, builder: RowBuilder.() -> Unit): Long

Updates all rows in table with values from builder and returns the affected row count.

Link copied to clipboard

Starts an UPSERT builder for table — insert a row, or update the existing row on conflict. The conflict target must be set with UpsertBuilder.onConflict before calling UpsertBuilder.execute.