Package-level declarations

Types

Link copied to clipboard
class RowBuilder<E : Table>

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

Link copied to clipboard
class TransactionScopeImpl(database: ReadWriteDatabase, val depth: Int = 0, val savepointName: String = "") : TransactionScope

Functions

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

Inserts a list of pre-shaped rows into table in a single statement.

Link copied to clipboard

Starts a DELETE builder for table.

Link copied to clipboard
suspend fun ReadWriteDatabase.deleteAll(table: Table): Long

Deletes every row from table and returns the affected row count.

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

Starts a new form (SELECT —FROM table) against table.

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

Inserts a row into table built by builder and returns its rowid.

Link copied to clipboard

Returns a fluent InsertBuilder for table.

Link copied to clipboard
suspend fun <E : Table> Database.querySingle(table: E, where: () -> ConditionalExpression): QueryBuilder.ResultSet?

Returns the first row of table matching where, or null if none exists.

Link copied to clipboard

Starts an UPDATE against table.

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

Updates every row of table with the values produced by builder.

Link copied to clipboard

Starts a new upsert against table.