SdbOpenDatabaseOptions class abstract
Options for opening a Sdb database.
Constructors
- SdbOpenDatabaseOptions({int? version, SdbDatabaseSchema? schema, SdbOnVersionChangeCallback? onVersionChange, SdbCodec? codec, SdbVersionChangeAction? versionChangeAction, SdbOnVersionChangeRequestCallback? onVersionChangeRequest, SdbBlockedAction? blockedAction, SdbOnBlockedCallback? onBlocked})
-
Options for opening a Sdb database.
factory
Properties
- blockedAction → SdbBlockedAction?
-
What the open does on its own while blocked by another connection that
keeps the database open at a lower version and does not close on
versionchange(a tab of an older version of the app): SdbBlockedAction.alert when null. It happens right after onBlocked. The open keeps waiting and completes once that connection closes. Never for io and memory databases.no setter - codec → SdbCodec?
-
Codec used
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- onBlocked → SdbOnBlockedCallback?
-
Called when the open is blocked, before blockedAction: tell the user
to close the other tabs your own way (with SdbBlockedAction.none).
no setter
- onVersionChange → SdbOnVersionChangeCallback?
-
provide onVersionChange to handle schema changes or initialization
manually, this is called after automatic schema change
no setter
- onVersionChangeRequest → SdbOnVersionChangeRequestCallback?
-
Called when another connection opens the database at a higher version
or deletes it, before versionChangeAction (save what must be, tell
the user a newer version runs elsewhere). Synchronous, do not await
anything to delay the close.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schema → SdbDatabaseSchema?
-
The schema of the database.
no setter
- version → int?
-
The version of the database.
no setter
- versionChangeAction → SdbVersionChangeAction?
-
What the database does on its own when another connection (another
tab, an iframe, or this page) opens it at a higher version or deletes
it, the IndexedDB
versionchangeevent: SdbVersionChangeAction.close when null. It happens right after onVersionChangeRequest, inside the browser event, so that the other connection proceeds instead of staying blocked. Only the browser fires the event; io and memory databases never see it.no setter
Methods
-
copyWith(
{int? version, SdbDatabaseSchema? schema, SdbOnVersionChangeCallback? onVersionChange, SdbCodec? codec, SdbVersionChangeAction? versionChangeAction, SdbOnVersionChangeRequestCallback? onVersionChangeRequest, SdbBlockedAction? blockedAction, SdbOnBlockedCallback? onBlocked}) → SdbOpenDatabaseOptions - Copy with new values.
-
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