InMemoryImageRepository class
An in-memory IImageRepository — one row per image, tagged with its owner.
Records are kept as their JSON rows, so this reference persists exactly the
wire form the model round-trips. Nothing here stores the bytes: an
ImageRecord names where the file is (storedPath), and that is all the
catalog knows about pictures.
- Implemented types
- Mixed-in types
Constructors
- InMemoryImageRepository()
- Creates an empty InMemoryImageRepository.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
rows
→ Map<
String, Map< String, dynamic> > -
The rows, keyed by record id.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
table
→ InMemoryTable<
ImageRecord> -
The rows behind this repository — what a transaction snapshots.
final
Methods
-
create(
{required ImageRecord image}) → TaskEither< DomainFailure, ImageRecord> -
Create a new image record.
override
-
delete(
{required String id}) → TaskEither< DomainFailure, void> -
Delete an image record by id.
override
-
fetchAll(
) → TaskEither< DomainFailure, List< ImageRecord> > -
Fetch all image records.
override
-
fetchById(
{required String id}) → TaskEither< DomainFailure, ImageRecord> -
Fetch a single image record by id.
override
-
fetchByOwner(
{required ImageOwner owner, required String ownerId}) → TaskEither< DomainFailure, List< ImageRecord> > -
Fetch images for a single owner entity.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
replaceAll(
Map< String, Map< rows) → voidString, dynamic> > -
Replaces every row — how a rollback restores a snapshot.
inherited
-
snapshot(
) → Map< String, Map< String, dynamic> > -
A copy of every row — what a transaction keeps to undo itself.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited