SeedRecorder class
Runs seeders, records what they change, and puts it back.
seed in metro live and Seeder.seed use it. While a seeder's up()
runs, NyStorage and Backpack report each change to a recording held
in the current zone. The record of every seeded seeder is kept in
storage under recordKey, so it survives hot restarts.
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
-
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
Static Properties
Static Methods
-
downAll(
List< Seeder> seeders) → Future<List< SeedRun> > -
Runs each seeder's
down(), last seeder first, stopping at the first failure. -
forgetBackpackValues(
) → void - Forgets the Backpack values kept in memory, as a restart would.
-
list(
) → Future< List< Map< >String, Object?> > - Each registered seeder's name, description and when it was last seeded, followed by seeders that are still recorded but no longer registered.
-
nameFromClass(
String className) → String -
DemoUserSeeder,DemoUseranddemo-userall becomedemo_user. -
nameOf(
Seeder seeder) → String -
The name
seederruns by: its key in the registered seeders, otherwise its own Seeder.name, otherwise its class name in snake case withoutSeeder(DemoUserSeederisdemo_user). -
restore(
Seeder seeder) → Future< void> -
Puts back everything
seederchanged when it was seeded. -
runNamed(
List< String> names, {required String direction, bool fresh = false}) → Future<List< SeedRun> > -
Runs the seeders named
namesindirection:upordown. -
seedChildren(
List< Seeder> seeders) → Future<void> -
Runs
seedersfrom inside another seeder'sup(), each recorded as its own run. Throws when one fails, so the parent fails too. -
upAll(
List< Seeder> seeders, {bool fresh = false}) → Future<List< SeedRun> > -
Runs each seeder's
up()in order, stopping at the first failure.