Skip to content

//runtime/com.squareup.sqldelight.db

Package com.squareup.sqldelight.db

Types

Name Summary
AfterVersion [common]
Content
class AfterVersion(afterVersion: Int, block: () -> Unit)
More info
Represents a block of code block that should be executed during a migration after the migration has finished migrating to afterVersion.


AfterVersionWithDriver [common]
Content
class AfterVersionWithDriver(afterVersion: Int, block: (SqlDriver) -> Unit)
More info
Represents a block of code block that should be executed during a migration after the migration has finished migrating to afterVersion.


Closeable [common]
Content
interface Closeable
More info
A type that can be closed.


[js, native, jvm]
Content
[js, native]
interface Closeable
[jvm]
typealias Closeable = Closeable
More info



SqlCursor [common]
Content
interface SqlCursor : Closeable
More info
Represents a SQL result set which can be iterated through with next.


SqlDriver [common]
Content
interface SqlDriver : Closeable
More info
Maintains connections to an underlying SQL database and provides APIs for managing transactions and executing SQL statements.


SqlPreparedStatement [common]
Content
interface SqlPreparedStatement
More info
Represents a SQL statement that has been prepared by a driver to be executed.


Functions

Name Summary
migrateWithCallbacks [common]
Content
fun SqlDriver.Schema.migrateWithCallbacks(driver: SqlDriver, oldVersion: Int, newVersion: Int, vararg callbacks: AfterVersionWithDriver)
fun SqlDriver.Schema.migrateWithCallbacks(driver: SqlDriver, oldVersion: Int, newVersion: Int, vararg callbacks: AfterVersion)
More info
Run SqlDriver.Schema.migrate normally but execute callbacks during the migration whenever it finished upgrading to a version specified by AfterVersion.afterVersion.


toAfterVersionWithDriver [common]
Content
fun AfterVersion.toAfterVersionWithDriver(): AfterVersionWithDriver
More info
Wrap an AfterVersion as an AfterVersionWithDriver.


use [common]
Content
inline fun <T : Closeable?, R> T.use(body: (T) -> R): R
More info
Run body on the receiver and call Closeable.close before returning or throwing.


[js, native]
Content
[js, native]
inline fun <T : Closeable?, R> T.use(body: (T) -> R): R
More info