start method

  1. @override
FutureOr<bool> start()
override

The start operation.

Implementation

@override
FutureOr<bool> start() {
  var config = dbConfig;

  if (memory) {
    config['memory'] = true;
    config['path'] = sqliteMemoryPath;
  } else {
    var dir = _tempDir ??= Directory.systemTemp.createTempSync(
      'bones_api_test_sqlite_',
    );
    config['memory'] = false;
    config['path'] = '${dir.path}/test.db';
  }

  _log.info('** STARTED> $this');

  return true;
}