DBSQLiteAdapter constructor

DBSQLiteAdapter(
  1. String databasePath, {
  2. int? busyTimeout,
  3. int minConnections = 1,
  4. int maxConnections = 3,
  5. bool generateTables = false,
  6. bool checkTables = true,
  7. Object? populateTables,
  8. Object? populateSource,
  9. Object? populateSourceVariables,
  10. EntityRepositoryProvider? parentRepositoryProvider,
  11. String? workingPath,
  12. bool logSQL = false,
})

Implementation

DBSQLiteAdapter(
  String databasePath, {
  int? busyTimeout,
  int minConnections = 1,
  int maxConnections = 3,
  super.generateTables,
  super.checkTables,
  super.populateTables,
  super.populateSource,
  super.populateSourceVariables,
  super.parentRepositoryProvider,
  super.workingPath,
  super.logSQL,
}) : databasePath = databasePath,
     inMemory = _isMemoryPath(databasePath),
     busyTimeout = busyTimeout ?? 5000,
     super(
       'sqlite',
       minConnections,
       maxConnections,
       DBSQLAdapterCapability(
         dialect: const SQLDialect(
           'SQLite',
           elementQuote: '"',
           acceptsReturningSyntax: true,
           // SQLite rejects `RETURNING "alias".*`:
           // "RETURNING may not use TABLE.* wildcards".
           returningAcceptsTableWildcard: false,
           acceptsInsertDefaultValues: true,
           // `INSERT IGNORE` is MySQL-only; SQLite uses `ON CONFLICT`:
           acceptsInsertIgnore: false,
           acceptsInsertOnConflict: true,
           acceptsVarcharWithoutMaximumSize: true,
           // SQLite does NOT create an implicit index for a foreign key:
           foreignKeyCreatesImplicitIndex: false,
           createIndexIfNotExists: true,
           // SQLite can't parse an `OFFSET` without a preceding `LIMIT`,
           // and uses `LIMIT -1` as "no limit":
           offsetRequiresLimit: true,
           offsetMaxLimitValue: '-1',
         ),
         transactions: true,
         transactionAbort: true,
         tableSQL: true,
         // SQLite can't `ALTER TABLE ... ADD CONSTRAINT`:
         constraintSupport: false,
         // A `sqlite3` handle can't be shared with another isolate:
         multiIsolateSupport: false,
         connectivity: DBAdapterCapabilityConnectivity.none,
       ),
     ) {
  boot();

  parentRepositoryProvider?.notifyKnownEntityRepositoryProvider(this);
}