# SupportSQLiteDatabaseKt

Added in 2.7.0

*** ** * ** ***


```
public final class SupportSQLiteDatabaseKt
```

<br />

*** ** * ** ***

## Summary

| ### Public methods |
|---|---|
| `static final @https://developer.android.com/reference/androidx/annotation/NonNull T` | `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabaseKt#(androidx.sqlite.db.SupportSQLiteDatabase).transaction(kotlin.Boolean,kotlin.Function1)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabase receiver, boolean exclusive, @https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabase, @https://developer.android.com/reference/androidx/annotation/NonNull T> body )` Run `https://developer.android.com/reference/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. |

## Public methods

### 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)

```
public static final @NonNull T <T extends Object> transaction(
    @NonNull SupportSQLiteDatabase receiver,
    boolean exclusive,
    @NonNull Function1<@NonNull SupportSQLiteDatabase, @NonNull T> body
)
```

Run `https://developer.android.com/reference/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 |
|---|---|
| `boolean exclusive` | Run in `EXCLUSIVE` mode when true, `IMMEDIATE` mode otherwise. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/sqlite/db/SupportSQLiteDatabase, @https://developer.android.com/reference/androidx/annotation/NonNull T> body` | Lambda to be run in the transaction. |