Package com.squareup.sqldelight.db

Types

AfterVersion
Link copied to clipboard
common
class AfterVersion(afterVersion: Int, block: () -> Unit)
Represents a block of code block that should be executed during a migration after the migration has finished migrating to afterVersion.
AfterVersionWithDriver
Link copied to clipboard
common
class AfterVersionWithDriver(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.
Closeable
Link copied to clipboard
common
interface Closeable
A type that can be closed.
interface Closeable
interface Closeable
typealias Closeable = Closeable
SqlCursor
Link copied to clipboard
common
interface SqlCursor : Closeable
Represents a SQL result set which can be iterated through with next.
SqlDriver
Link copied to clipboard
common
interface SqlDriver : Closeable
Maintains connections to an underlying SQL database and provides APIs for managing transactions and executing SQL statements.
SqlPreparedStatement
Link copied to clipboard
common
interface SqlPreparedStatement
Represents a SQL statement that has been prepared by a driver to be executed.

Functions

migrateWithCallbacks
Link copied to clipboard
common
fun SqlDriver.Schema.migrateWithCallbacks(driver: SqlDriver, oldVersion: Int, newVersion: Int, vararg callbacks: AfterVersionWithDriver)
Run SqlDriver.Schema.migrate normally but execute callbacks during the migration whenever it finished upgrading to a version specified by AfterVersion.afterVersion.
fun SqlDriver.Schema.migrateWithCallbacks(driver: SqlDriver, oldVersion: Int, newVersion: Int, vararg callbacks: AfterVersion)
Run SqlDriver.Schema.migrate normally but execute callbacks during the migration whenever it finished upgrading to a version specified by AfterVersion.afterVersion.
toAfterVersionWithDriver
Link copied to clipboard
common
use
Link copied to clipboard
common
inline fun <T : Closeable?, R> T.use(body: (T) -> R): R
Run body on the receiver and call Closeable.close before returning or throwing.
inline fun <T : Closeable?, R> T.use(body: (T) -> R): R
inline fun <T : Closeable?, R> T.use(body: (T) -> R): R