Inline the withinTransaction() function.
This commit is contained in:
parent
011a36c8f3
commit
2b1bbdda15
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ import androidx.sqlite.db.SupportSQLiteQueryBuilder
|
|||
*
|
||||
* @return The value returned by [block] if any
|
||||
*/
|
||||
fun <T : SupportSQLiteDatabase, R> T.withinTransaction(block: (T) -> R): R {
|
||||
inline fun <T : SupportSQLiteDatabase, R> T.withinTransaction(block: (T) -> R): R {
|
||||
beginTransaction()
|
||||
try {
|
||||
val toReturn = block(this)
|
||||
|
|
Loading…
Add table
Reference in a new issue