Package app.cash.sqldelight.db

Types

Link copied to clipboard
class AfterVersion(afterVersion: Int, block: (SqlDriver) -> Unit)

Represents a block of code block that should be executed during a migration after the migration has finished migrating to afterVersion.

Link copied to clipboard
expect interface Closeable

A type that can be closed.

actual interface Closeable
actual typealias Closeable = Closeable
actual interface Closeable
Link copied to clipboard
class OptimisticLockException(message: String?, cause: Throwable?)
Link copied to clipboard
interface QueryResult<T>
Link copied to clipboard
interface SqlCursor

Represents a SQL result set which can be iterated through with next. Initially the cursor will not point to any row, and calling next once will iterate to the first row.

Link copied to clipboard
interface SqlDriver : Closeable

Maintains connections to an underlying SQL database and provides APIs for managing transactions and executing SQL statements.

Link copied to clipboard
interface SqlPreparedStatement

Represents a SQL statement that has been prepared by a driver to be executed.

Link copied to clipboard
interface SqlSchema

API for creating and migrating a SQL database.

Functions

Link copied to clipboard
fun SqlSchema.migrateWithCallbacks(driver: SqlDriver, oldVersion: Int, newVersion: Int, vararg callbacks: AfterVersion)

Run SqlSchema.migrate normally but execute callbacks during the migration whenever it finished upgrading to a version specified by AfterVersion.afterVersion.

Link copied to clipboard
expect inline fun <T : Closeable?, R> T.use(body: (T) -> R): R

Run body on the receiver and call Closeable.close before returning or throwing.

actual inline fun <T : Closeable?, R> T.use(body: (T) -> R): R
actual inline fun <T : Closeable?, R> T.use(body: (T) -> R): R