SchemaState class
: thin wrapper around the
d_rocket_schema_state table. The wrapper
is created by AutoMigrator and is not
exported from the package barrel — application
code interacts with it indirectly via
Db.pendingSchemaDiff() and the
Db.open(autoMigrate: true) flag.
Constructors
- SchemaState({required AsyncQueryProvider provider})
-
Creates a SchemaState backed by
provider. The provider is expected to be the same connection that handles the user's data writes (so the snapshot read/write participates in the caller's transaction).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → Future< void> -
: clears the stored snapshot.
Used by tests and by the
debugResetAutoMigrationStatetest-only helper. Not exported from the barrel. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
) → Future< SchemaSnapshot?> -
: returns the last applied snapshot,
or
nullif no auto-migration has ever been recorded (i.e. fresh install, or a runtime upgrade from a 1.1.x install that did not have the auto-migration system at all). -
toString(
) → String -
A string representation of this object.
inherited
-
write(
SchemaSnapshot snapshot) → Future< void> -
: persists
snapshotas the new last-applied snapshot. Theid = 1row is overwritten (INSERT OR REPLACE).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited