core-ktx / androidx.database.sqlite / android.database.sqlite.SQLiteDatabase / transaction

transaction

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

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

Parameters

exclusive - Run in EXCLUSIVE mode when true, IMMEDIATE mode otherwise.