openDB method

Future<DB<DBConnection>?> openDB({
  1. Duration retryInterval = const Duration(seconds: 1),
  2. int maxRetries = 10,
  3. int maxConnections = 1,
})

Implementation

Future<DB?> openDB(
    {Duration retryInterval = const Duration(seconds: 1),
    int maxRetries = 10,
    int maxConnections = 1}) async {
  var dbType = software.trim().toLowerCase();

  var connProvider = await DBConnectionProvider.getProvider(
    dbType,
    credential,
    retryInterval: retryInterval,
    maxRetries: maxRetries,
    maxConnections: maxConnections,
  );

  if (connProvider == null) return null;

  return DB(connProvider);
}