clearTables method

  1. @visibleForTesting
Future<void> clearTables(
  1. List<QualifiedTablename> tables
)

Implementation

@visibleForTesting
Future<void> clearTables(List<QualifiedTablename> tables) async {
  await adapter.runInTransaction([
    _setMetaStatement('lsn', null),
    _setMetaStatement('subscriptions', subscriptionManager.serialize()),
    Statement(builder.deferOrDisableFKsForTx),
    ..._disableTriggers(tables),
    ...tables.map((x) => Statement('DELETE FROM $x')),
    ..._enableTriggers(tables),
  ]);
}