sqldelight-runtime / com.squareup.sqldelight.db / Closeable

Closeable

expect interface Closeable

Platform and version requirements: JVM, js, native

A type that can be closed.

Functions

close
(js, native)

abstract fun close(): Unit

Close any resources backed by this object.

Extension 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.

Inheritors

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.