connectToDb method
Implementation
Future<Db?> connectToDb({
bool force = false,
}) async {
if (_dbConnected && !force) {
throw DbAlreadyConnectedException();
}
DbConnect dbConnect = DbConnect(_app);
db = await dbConnect.connectAllProvidedDBs(
setMemoryController: _setMemoryController,
setMongoDb: _setMongoDb,
);
_dbConnected = true;
return db;
}