# androidx.sqlite.db

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteDatabase` | A database abstraction which removes the framework dependency and allows swapping underlying sql versions. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper` | An interface to map the behavior of `https://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html`. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper.Factory` | Factory class to create instances of `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper` using `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper.Configuration`. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteProgram` | An interface to map the behavior of `https://developer.android.com/reference/android/database/sqlite/SQLiteProgram.html`. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteQuery` | A query with typed bindings. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteStatement` | An interface to map the behavior of `https://developer.android.com/reference/android/database/sqlite/SQLiteStatement.html`. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SimpleSQLiteQuery` | A basic implementation of `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteQuery` which receives a query and its args and binds args based on the passed in Object type. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper.Callback` | Creates a new Callback to get database lifecycle events. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper.Configuration` | The configuration to create an SQLite open helper object using `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper.Factory`. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper.Configuration.Builder` | Builder class for `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteOpenHelper.Configuration`. |
| `https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteQueryBuilder` | A simple query builder to create SQL SELECT queries. |

## Extension functions summary

|---|---|
| `inline T` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteDatabase.https://developer.android.com/reference/kotlin/androidx/sqlite/db/package-summary#(androidx.sqlite.db.SupportSQLiteDatabase).transaction(kotlin.Boolean,kotlin.Function1)( exclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, body: https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteDatabase.() -> T )` Run `https://developer.android.com/reference/kotlin/androidx/sqlite/db/package-summary#(androidx.sqlite.db.SupportSQLiteDatabase).transaction(kotlin.Boolean,kotlin.Function1)` in a transaction marking it as successful if it completes without exception. |

## Extension functions

### SupportSQLiteDatabase.transaction

Artifact: [androidx.sqlite:sqlite](https://developer.android.com/jetpack/androidx/releases/sqlite) [View Source](https://cs.android.com/search?q=file:androidx/sqlite/db/SupportSQLiteDatabaseExt.android.kt+function:transaction) Added in [2.7.0](https://developer.android.com/jetpack/androidx/releases/sqlite#2.7.0)

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

Run `https://developer.android.com/reference/kotlin/androidx/sqlite/db/package-summary#(androidx.sqlite.db.SupportSQLiteDatabase).transaction(kotlin.Boolean,kotlin.Function1)` in a transaction marking it as successful if it completes without exception.

| Parameters |
|---|---|
| `exclusive: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = true` | Run in `EXCLUSIVE` mode when true, `IMMEDIATE` mode otherwise. |
| `body: https://developer.android.com/reference/kotlin/androidx/sqlite/db/SupportSQLiteDatabase.() -> T` | Lambda to be run in the transaction. |