insertGetId method

  1. @override
Future<int> insertGetId(
  1. String query, [
  2. List bindings = const []
])
override

Implementation

@override
Future<int> insertGetId(String query, [List bindings = const []]) async {
  final statement = _insertDb!.prepare(query);
  await insertMutex.acquire();
  try {
    statement.execute(bindings);
    return _insertDb.lastInsertRowId;
  } finally {
    insertMutex.release();
  }
}