sqldelight-runtime / com.squareup.sqldelight.db

Package com.squareup.sqldelight.db

Types

Closeable
(JVM, js, native)

expect interface Closeable

A type that can be closed.

SqlCursor

interface SqlCursor : Closeable

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.

SqlDriver

interface SqlDriver : Closeable

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

SqlPreparedStatement

interface SqlPreparedStatement

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

Functions

use
(JVM, js, native)

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

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