SqliteDatabase.withFactory constructor
SqliteDatabase.withFactory(
- AbstractDefaultSqliteOpenFactory<
CommonDatabase> openFactory, { - int maxReaders = SqliteDatabase.defaultMaxReaders,
Advanced: Open a database with a specified factory.
The factory is used to open each database connection in background isolates.
Use when control is required over the opening process. Examples include:
- Specifying the path to
libsqlite.so
on Linux. - Running additional per-connection PRAGMA statements on each connection.
- Creating custom SQLite functions.
- Creating temporary views or triggers.
Implementation
factory SqliteDatabase.withFactory(
AbstractDefaultSqliteOpenFactory openFactory,
{int maxReaders = SqliteDatabase.defaultMaxReaders}) {
return SqliteDatabaseImpl.withFactory(openFactory, maxReaders: maxReaders);
}