added noResult param to batch.commit to speed it up
This commit is contained in:
parent
15e4513b0f
commit
0e740eba16
1 changed files with 5 additions and 1 deletions
|
@ -1,8 +1,12 @@
|
|||
import 'dart:async';
|
||||
import 'dart:core';
|
||||
|
||||
import 'package:ohthatsa/pages/practice/PracticeAnswer.dart';
|
||||
import 'package:ohthatsa/pages/practice/PracticeType.dart';
|
||||
import 'package:sqflite/sqflite.dart';
|
||||
import 'package:path/path.dart';
|
||||
|
||||
|
||||
class PracticeDatabase {
|
||||
static _onCreate(Database database, int version) async {
|
||||
String types = PracticeType.values.map((type) => "'${type.toString().split(".").last}'").join(", ");
|
||||
|
@ -48,6 +52,6 @@ class PracticeDatabase {
|
|||
answer.sessionId = sessionId;
|
||||
batch.insert("PracticeAnswer", answer.toMap());
|
||||
});
|
||||
await batch.commit();
|
||||
await batch.commit(noResult: true);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue