SqliteDatabase constructor

SqliteDatabase({
  1. required dynamic path,
  2. int maxReaders = SqliteDatabase.defaultMaxReaders,
  3. SqliteOptions options = const SqliteOptions.defaults(),
})

Open a SqliteDatabase.

Only a single SqliteDatabase per path should be opened at a time.

A connection pool is used by default, allowing multiple concurrent read transactions, and a single concurrent write transaction. Write transactions do not block read transactions, and read transactions will see the state from the last committed write transaction.

A maximum of maxReaders concurrent read transactions are allowed.

Implementation

factory SqliteDatabase(
    {required path,
    int maxReaders = SqliteDatabase.defaultMaxReaders,
    SqliteOptions options = const SqliteOptions.defaults()}) {
  return SqliteDatabaseImpl(
      path: path, maxReaders: maxReaders, options: options);
}