Session class
A live recording of mutations against a Database. Construct via Database.beginSession. Sessions stay attached and recording until close is called.
Constructors
- Session()
Properties
-
changes
→ List<
Change> -
Snapshot of captured changes in order.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
True after close. Closed sessions ignore further mutations and
still let callers read changes / produce a changeset.
no setter
- isEnabled → bool
-
Whether the session is currently capturing changes.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
attach(
String table) → void - Attach a specific table to the session. If never called, the session records mutations on every table (the default).
-
changeset(
) → Uint8List - Serialize captured changes to a portable byte blob suitable for passing to Database.applyChangeset.
-
clear(
) → void - Drop everything captured so far.
-
close(
) → void - Stop recording. Idempotent.
-
disable(
) → void - Pause recording without losing already-captured changes.
-
enable(
) → void - Resume recording.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordInternal(
Change c) → void - Internal hook called by the Database when a mutation lands. Not part of the public API but kept package-visible for the engine.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited