disconnect method

  1. @override
Future<void> disconnect({
  1. bool flush = false,
})

Closes the client connection If flush is true, the data will also be deleted

Implementation

@override
Future<void> disconnect({bool flush = false}) async {
  _logger.info('disconnect');
  if (isConnected) {
    _logger.info('Disconnecting');
    if (flush) {
      _logger.info('Flushing');
      await db!.flush();
    }
    await db!.disconnect();
    db = null;
  }
}