WorkDbFactory class
Factory for creating WorkDB instances.
Supports polymorphic creation using dedicated input types for each implementation (IO, Web, Memory).
Each call to create returns a new independent instance.
Example:
final factory = WorkDbFactory();
// For desktop/server
final ioDb = factory.create(IoWorkDbFactoryInput(dataPath: './data'));
// For web
final webDb = factory.create(WebWorkDbFactoryInput());
// For testing
final memDb = factory.create(MemoryWorkDbFactoryInput());
// Multiple independent instances
final db1 = factory.create(IoWorkDbFactoryInput(dataPath: './data1'));
final db2 = factory.create(IoWorkDbFactoryInput(dataPath: './data2'));
// db1 and db2 are completely independent
- Implemented types
Constructors
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
-
create(
WorkDbFactoryInput input) → ClientWorkDb -
Creates a database instance based on the provided input type.
override
-
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