As I mentioned in the comment, you can use Batch
. Here is the sample.
Batch batch = db.batch();
batch.insert('Test', {'name': 'item'});
batch.update('Test', {'name': 'new_item'}, where: 'name = ?', whereArgs: ['item']);
batch.delete('Test', where: 'name = ?', whereArgs: ['item']);
Now if you are looking for result (it will cost you some memory), you use
results = await batch.commit();
And if you are looking for fast performance, just ignore the result and use
await batch.commit(noResult: true);
Source
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…