androidx.sqlite


Interfaces

SQLiteConnection

SQLite connection definition.

Cmn
android
JS
SQLiteDriver

An interface to open database connections.

Cmn
android
JS
SQLiteStatement

SQLite statement definition.

Cmn
android
JS

Exceptions

SQLiteException

An exception that indicates that something has gone wrong and a error code was produced.

Cmn
android
N
JS

Type aliases

SQLiteException

An exception that indicates that something has gone wrong and a error code was produced.

android

Constants summary

const Int

The data type for a BLOB value, i.e. binary data.

Cmn
const Int

The data type for a 64-bit IEEE floating point number.

Cmn
const Int

The data type for a 64-bit signed integer.

Cmn
const Int

The data type for a NULL value.

Cmn
const Int

The data type for a String.

Cmn

Top-level functions summary

Nothing
throwSQLiteException(errorCode: Int, errorMsg: String?)

Throws a SQLiteException with its message formed by the given errorCode amd errorMsg.

Cmn

Extension functions summary

Unit

Executes a single SQL statement that returns no values.

android
suspend Unit

Executes a single SQL statement asynchronously that returns no values.

Cmn
android
JS
suspend SQLiteConnection

Opens a new database connection.

Cmn
android
JS
suspend SQLiteStatement

Prepares a new SQL statement asynchronously.

Cmn
android
JS
suspend Boolean

Executes the statement asynchronously and evaluates the next result row if available.

Cmn
android
JS

Constants

SQLITE_DATA_BLOB

const val SQLITE_DATA_BLOB = 4: Int

The data type for a BLOB value, i.e. binary data.

SQLITE_DATA_FLOAT

const val SQLITE_DATA_FLOAT = 2: Int

The data type for a 64-bit IEEE floating point number.

SQLITE_DATA_INTEGER

const val SQLITE_DATA_INTEGER = 1: Int

The data type for a 64-bit signed integer.

SQLITE_DATA_NULL

const val SQLITE_DATA_NULL = 5: Int

The data type for a NULL value.

SQLITE_DATA_TEXT

const val SQLITE_DATA_TEXT = 3: Int

The data type for a String.

Top-level functions

throwSQLiteException

fun throwSQLiteException(errorCode: Int, errorMsg: String?): Nothing

Throws a SQLiteException with its message formed by the given errorCode amd errorMsg.

Extension functions

execSQL

fun SQLiteConnection.execSQL(sql: String): Unit

Executes a single SQL statement that returns no values.

executeSQL

suspend fun SQLiteConnection.executeSQL(sql: String): Unit

Executes a single SQL statement asynchronously that returns no values.

On web targets this function is asynchronous while for non-web it is synchronous.

open

suspend fun SQLiteDriver.open(fileName: String): SQLiteConnection

Opens a new database connection.

On web targets this function is asynchronous while for non-web it is synchronous.

prepare

suspend fun SQLiteConnection.prepare(sql: String): SQLiteStatement

Prepares a new SQL statement asynchronously.

On web targets this function is asynchronous while for non-web it is synchronous.

step

suspend fun SQLiteStatement.step(): Boolean

Executes the statement asynchronously and evaluates the next result row if available.

On web targets this function is asynchronous while for non-web it is synchronous.