destroyAll method

  1. @override
Future<int> destroyAll()
override

Method destroyAll deletes all entries on database

Implementation

@override
Future<int> destroyAll() async {
  final builder = SqlBuilder.delete(schema.table!, whereArgs: []);

  final completer = Completer<dynamic>()
    ..complete(database!.rawDelete(builder.sql, builder.arguments));

  if (isLogger!) Logger.destroy(type, completer.future, builder);

  return await completer.future;
}