androidx.sqlite.db

Interfaces

SupportSQLiteDatabase

A database abstraction which removes the framework dependency and allows swapping underlying sql versions.

SupportSQLiteOpenHelper

An interface to map the behavior of android.database.sqlite.SQLiteOpenHelper.

SupportSQLiteOpenHelper.Factory

Factory class to create instances of SupportSQLiteOpenHelper using Configuration.

SupportSQLiteProgram

An interface to map the behavior of android.database.sqlite.SQLiteProgram.

SupportSQLiteQuery

A query with typed bindings.

SupportSQLiteStatement

An interface to map the behavior of android.database.sqlite.SQLiteStatement.

Classes

SimpleSQLiteQuery

A basic implementation of SupportSQLiteQuery which receives a query and its args and binds args based on the passed in Object type.

SupportSQLiteOpenHelper.Callback

Creates a new Callback to get database lifecycle events.

SupportSQLiteOpenHelper.Configuration

The configuration to create an SQLite open helper object using Factory.

SupportSQLiteOpenHelper.Configuration.Builder

Builder class for Configuration.

SupportSQLiteQueryBuilder

A simple query builder to create SQL SELECT queries.

Extension functions summary

inline T
<T : Any?> SupportSQLiteDatabase.transaction(
    exclusive: Boolean,
    body: SupportSQLiteDatabase.() -> T
)

Run body in a transaction marking it as successful if it completes without exception.

Extension functions

transaction

inline fun <T : Any?> SupportSQLiteDatabase.transaction(
    exclusive: Boolean = true,
    body: SupportSQLiteDatabase.() -> T
): T

Run body in a transaction marking it as successful if it completes without exception.

Parameters
exclusive: Boolean = true

Run in EXCLUSIVE mode when true, IMMEDIATE mode otherwise.