rpc_data_postgres library

Classes

BaseDataRepository
Базовая реализация DataRepository, инкапсулирующая общую бизнес-логику и работу с журналом событий. Хранилище делегируется DataStorageAdapter, поэтому поверх класса легко собрать адаптеры под SQLite/Postgres/Firestore.
BulkDeleteRequest
BulkDeleteResponse
BulkUpsertRequest
BulkUpsertResponse
CollectionChange<T>
CollectionIndex
CollectionSchema
Schema definition persisted for a collection.
CollectionSchemaPolicy
Policy switches for per-collection schema enforcement.
CollectionSchemaRegistry
Abstract registry that stores active schemas.
CreateCollectionIndexRequest
CreateCollectionIndexResponse
CreateRecordRequest
CreateRecordResponse
DatabaseChunk
Chunked NDJSON payload for export/import streaming.
DataChangeEvent
DataChangeJournal
Persists and replays change events for DataRepository.watch cursors.
DataRecord
Тип команды для офлайн-синхронизации и command pattern. Неизменяемая запись данных.
DataRepositoryClient
IDataClient implementation that works directly with an IDataRepository without RPC plumbing. Useful for in-process setups and tests.
DataServiceCaller
DataServiceClient
Клиентская инкапсуляция. Хранит endpoint и caller и реализует интерфейс DataService.
DataServiceCollection<T>
Typed wrapper around a single IDataService collection.
DataServiceContractNames
DataServiceFactory
Утилиты для создания сервиса/клиента.
DataServiceResponder
DataServiceServer
Серверная обёртка: содержит endpoint, responder и репозиторий.
DeleteCollectionIndexRequest
DeleteCollectionIndexResponse
DeleteCollectionRequest
DeleteCollectionResponse
DeleteRecordRequest
DeleteRecordResponse
ExportDatabaseRequest
ExportSnapshotRequest
ExportSnapshotResponse
GetRecordRequest
GetRecordResponse
GetRecordsRequest
Reads several records of one collection by id.
GetRecordsResponse
Records that were found, in no guaranteed order.
GetSchemaRequest
GetSchemaResponse
ICollectionIndexStorageAdapter
IDataClient
High-level facade that encapsulates RPC plumbing for the data service.
IDataRepository
Абстракция репозитория данных.
IDataServiceCollection<T>
IDataServiceContract
Контракт сервиса данных с именем DataService.
IDataStorageAdapter
Адаптер хранилища, который можно реализовать поверх любого backend-а (in-memory, SQLite, Postgres и т.д.).
ImportDatabaseResponse
ImportProgress
Progress/summary emitted by bidirectional import.
InMemoryDataChangeJournal
In-memory implementation of DataChangeJournal. Primarily used by the unit tests and the InMemoryDataRepository helper.
InMemoryDataRepository
Готовый in-memory репозиторий, который можно заменить адаптером к SQLite или любому другому backend-у, не меняя остальной код сервиса данных.
InMemoryDataServiceEnvironment
Результат helper-а для быстрого развёртывания in-memory окружения.
InMemorySchemaRegistry
Simple in-memory registry used by tests and the in-memory adapter.
InMemoryStorageAdapter
In-memory адаптер, реализующий интерфейс DataStorageAdapter на обычных картах. Эту реализацию легко заменить на SQLite/Isar/Hive, не меняя бизнес-логику BaseDataRepository.
ListCollectionsRequest
ListCollectionsResponse
ListRecordsRequest
ListRecordsResponse
ListSchemasRequest
ListSchemasResponse
MigrationCapableRepository
Repository contract for running declarative migrations.
MigrationDefinition
Declarative migration definition stored in code/config.
MigrationPlan
Fluent builder to construct a consistent migration chain for a collection.
MigrationRunnerHelper
Helper to apply pending migrations in order, comparing active schema version with registered migrations.
PatchRecordRequest
PatchRecordResponse
PgTableNames
PostgresConnectionOptions
PostgresDataChangeJournal
PostgresDataRepository
Repository backed by PostgresDataStorageAdapter.
PostgresDataStorageAdapter
PostgreSQL-backed implementation of IDataStorageAdapter.
PostgresSchemaRegistry
QueryOptions
RangeFilter
RecordFilter
RecordPatch
RpcStreamIterator<T>
SchemaInfo
SchemaMigrationCheckpoint
SchemaMigrationError
SchemaMigrationOptions
Migration options to control batching and error policy.
SchemaMigrationResult
SchemaValidationConfig
Runtime configuration for schema validation.
SchemaValidationEngine
Wrapper that combines registry + validator to gate writes.
SchemaValidationError
Error shape returned by the validator.
SchemaValidator
Lightweight JSON Schema-like validator (subset) with predictable errors.
SearchRecordsRequest
SearchRecordsResponse
SetSchemaPolicyRequest
SetSchemaPolicyResponse
SortOrder
UpdateRecordRequest
UpdateRecordResponse
Versioned<T>
WatchChangesRequest

Enums

DataChangeType
Тип изменения записи в потоке изменений.

Constants

defaultStorageChunkSize → const int

Functions

decodeRecordPayload(String? payload) DataRecord?
encodeRecordPayload(DataRecord? record) String?
parseCursor(String cursor) int
Simple guard that validates a change cursor string can be interpreted as an integer sequence value. Persistent journals use monotonically increasing integers for ordering, so the helper is shared between implementations.

Typedefs

FromJson<T> = T Function(Map<String, dynamic> json)
PostgresIntegrityReporter = void Function(String message)
Reports an inconsistency PostgresDataStorageAdapter.ensureReady found in the metadata tables and worked around.
SchemaTransformer = Map<String, dynamic> Function(Map<String, dynamic> payload)
ToJson<T> = Map<String, dynamic> Function(T model)

Exceptions / Errors

ImportResumeException
Thrown on import failures to expose the last applied chunk index for resume.
RpcDataError
Базовый класс для ошибок сервиса данных.