SqliteOptions class final

Chooses an in-memory, native-file, or browser-persistent SQLite database.

Use SqliteOptions.memory on any platform and SqliteOptions.persistent for shared application configuration across native and browser deployments.

Constructors

SqliteOptions.file(String path, {SqliteJournal? journal = SqliteJournal.wal, Duration busyTimeout = const Duration(seconds: 5)})
A native file. Web callers should use SqliteOptions.persistent.
const
SqliteOptions.memory({Duration busyTimeout = const Duration(seconds: 5), SqliteWebOptions web = const SqliteWebOptions()})
Creates an isolated database discarded when its driver closes.
const
SqliteOptions.persistent(String name, {String? nativePath, SqliteJournal? journal = SqliteJournal.wal, Duration busyTimeout = const Duration(seconds: 5), SqliteWebOptions web = const SqliteWebOptions()})
OPFS on Web; nativePath on native platforms.
const
SqliteOptions.readOnly(String path, {Duration busyTimeout = const Duration(seconds: 5)})
Opens an existing native file without changing its journal mode.
const

Properties

busyTimeout Duration
Native wait time for a locked database before returning SQLite BUSY.
final
hashCode int
The hash code for this object.
no setterinherited
journal SqliteJournal?
Requested native journal mode; null preserves the existing mode.
final
name String?
Browser persistence name; must contain only letters, digits, _, -, ..
final
path String
Native file path. Persistent browser databases use name instead.
final
readOnly bool
Whether a native file is opened without write access.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
web SqliteWebOptions
Browser worker and asset configuration.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited