mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 21:15:48 +00:00
Batch insert group receipts.
This commit is contained in:
@@ -59,8 +59,8 @@ class GroupReceiptTable(context: Context?, databaseHelper: SignalDatabase?) : Da
|
||||
}
|
||||
|
||||
val statements = SqlUtil.buildBulkInsert(TABLE_NAME, arrayOf(MMS_ID, RECIPIENT_ID, STATUS, TIMESTAMP), contentValues)
|
||||
for (statement in statements) {
|
||||
writableDatabase.execSQL(statement.where, statement.whereArgs)
|
||||
writableDatabase.withinTransaction { db ->
|
||||
statements.forEach { db.execSQL(it.where, it.whereArgs) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user