dropDatabase method

  1. @override
Future<bool> dropDatabase(
  1. String name
)
override

Drops a database with the given name. Throws if database doesn't exist.

Implementation

@override
Future<bool> dropDatabase(String name) async {
  final sql = 'DROP DATABASE ${_quote(name)}';

  if (_transactionDepth > 0) {
    throw StateError('Cannot drop database within a transaction');
  }

  await executeRaw(sql);
  return true;
}