BaseDataRepository class abstract

Базовая реализация DataRepository, инкапсулирующая общую бизнес-логику и работу с журналом событий. Хранилище делегируется DataStorageAdapter, поэтому поверх класса легко собрать адаптеры под SQLite/Postgres/Firestore.

Implemented types
Implementers

Constructors

BaseDataRepository(IDataStorageAdapter storage, {DateTime clock()?, String idGenerator(String collection)?, DataChangeJournal? changeJournal, int? journalMaxEvents = defaultJournalMaxEvents, Duration? journalRetention = defaultJournalRetention, SchemaValidationEngine? schemaValidation})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage IDataStorageAdapter
final

Methods

bulkDelete(BulkDeleteRequest request) Future<int>
override
bulkUpsert(BulkUpsertRequest request) Future<List<DataRecord>>
override
create(CreateRecordRequest request) Future<DataRecord>
override
createCollectionIndex(CreateCollectionIndexRequest request) Future<CollectionIndex>
override
delete(DeleteRecordRequest request) Future<bool>
override
deleteCollection(DeleteCollectionRequest request) Future<bool>
override
deleteCollectionIndex(DeleteCollectionIndexRequest request) Future<bool>
override
dispose() Future<void>
override
exportDatabase(ExportDatabaseRequest request) Stream<Uint8List>
override
exportSnapshot(ExportSnapshotRequest request) Future<ExportSnapshotResponse>
override
get(GetRecordRequest request) Future<DataRecord?>
override
getSchema(GetSchemaRequest request) Future<GetSchemaResponse>
override
importDatabase({required Stream<Uint8List> payload, bool replaceExisting = true, int resumeAfterChunk = -1, void onChunkProcessed(int chunkIndex)?}) Future<ImportDatabaseResponse>
override
list(ListRecordsRequest request) Future<ListRecordsResponse>
override
listCollections() Future<List<String>>
override
listSchemas() Future<ListSchemasResponse>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(PatchRecordRequest request) Future<DataRecord>
override
override
setSchemaPolicy(SetSchemaPolicyRequest request) Future<SetSchemaPolicyResponse>
override
toString() String
A string representation of this object.
inherited
update(UpdateRecordRequest request) Future<DataRecord>
override
watch(WatchChangesRequest request) Stream<DataChangeEvent>
override

Operators

operator ==(Object other) bool
The equality operator.
inherited