framework library

What the framework and its generated code are written against.

An application does not import this. A model's capabilities are members of the model -- Article.search, Article.semanticSearch, Article.syncPolicy, Article.changes -- and the machinery underneath them is the framework's own. It lives here so the generator can write against it and the framework's tests can reset it, and out of package:dartvel_core/dartvel.dart, which is what an application sees.

Naming one of these in application code means the surface is missing something, so the fix is to add the member to the model rather than to import this.

Classes

DVCacheRuntime
The cache's machinery, for the framework and its tests.
DVCapture
The capture log for one database.
DVCaptureBackfillJob
The job that copies one chunk of a model's rows to a consumer, and queues the next until the copy is done.
DVCaptureBackfillProgress
Where a backfill stands.
DVCaptureBatch
Changes handed to a destination together, in sequence order.
DVCaptureConfig
dartvel.capture, as declared.
DVCaptureConsumer
One destination's position in the log, and the delivery that moves it.
DVCapturedChange
One captured change to one record.
DVCaptureDelivery
The outcome of one delivery run.
DVCaptureDeliveryJob
The job that delivers a consumer's pending changes.
DVCaptureDestination
One destination the captured data models are delivered to.
DVCaptureLag
How far a consumer is behind what has been captured.
DVCapturePrivacyAdapter
Erasure for the capture log and the destinations it feeds.
DVCaptureRuntime
The change capture runtime of this process.
DVCaptureSchemaChange
A column change a destination applies before the rows that need it.
DVCaptureSink
A sync destination: a warehouse, a column store, files in object storage.
DVModelPageAccess
The policy questions a generated model page asks. The framework's, not an application's: the generated page and the page resolver ask them, and an application answers them by writing the model's policy.
DVModelSync
The model sync hub.
DVModelSyncTransport
Where sync events cross process boundaries.
DVMutation
One write made on the device, waiting to reach the server.
DVOffline
How a model behaves while the device is disconnected.
DVOfflineClock
The device's clock, corrected by what the server says the time is.
DVOfflineRemote
Where replayed mutations go.
DVOfflineReplay
Applies a batch of replayed mutations to the models that declared they work offline, and to no others.
DVOfflineReplayResult
What the route answers.
DVOfflineReply
What the replay route answered: its status and its JSON body.
DVOfflineStore
A model's local store and mutation log.
DVOfflineStorePrivacyAdapter
The erasure and export of one device's offline copy.
DVOfflineSync
Runs every offline data model's queue on this device.
DVPresenceTransport
Carries presence between processes, the way DVModelSyncTransport carries model changes. Without one, presence is per-process.
DVRecord
A stored record: its values, the version they are at, and whether it is soft-deleted.
DVRecordScope
A versioned table with optional history and soft delete.
DVRecordTable
DVRecordTableRemote
The server side of replay over a DVRecordTable: deduplicates by mutation id and resolves by the declared strategy and clock.
DVRemoteOutcome
What the server did with a replayed mutation.
DVReplayResult
The outcome of one replay.
DVSemanticIndex<T>
Semantic search over one model.
DVSnapshotDatabaseAdapter
The development database, kept in DVTableSnapshots so it survives the application closing.
DVTableSnapshots
Named snapshots that outlive the process holding them: one per table.
DVWarehouseSink
The reference store destination: one collection per model in any database Dartvel runs on -- a SQL table or a document collection -- holding each record's newest state.
DVWriteResult
The outcome of a write.

Enums

DVCaptureDestinationType
Where a destination's copies are written.
DVCaptureOp
What a captured change did to its record.
DVCaptureSchemaPhase
Whether a schema change adds columns at a destination or removes them.
DVSyncState
Where a record stands relative to the server.

Functions

dvLocalOfflineDatabase(String appId, {String? directory, String? os, Map<String, String>? environment, String? androidStateDirectory}) → Future<DVDatabaseAdapter>
Opens this device's store for appId's offline data models.
dvOfflineSendOverHttp({required Uri endpoint(), Map<String, String> headers()?}) → DVOfflineSend
Posts replay requests to endpoint as JSON, with the session headers the generated client sends on every call and a CSRF token, because a browser is one of the clients that replays and the route checks one.
dvOutcomeFromJson(Map<String, Object?> json) → DVRemoteOutcome
An outcome as it arrived back on the device.
dvOutcomeToJson(DVRemoteOutcome outcome, {required Set<String> sensitive}) → Map<String, Object?>
An outcome as the server answers, without the columns sensitive names.

Typedefs

DVOfflineSend = Future<DVOfflineReply> Function(Map<String, Object?> body)
Sends one replay request -- {model, mutations} -- to the server.

Exceptions / Errors

DVCaptureBehindRetentionError
DV-CDC-002: a consumer is behind the retention window and must backfill.
DVCaptureConfigError
DV-CDC-006, DV-CDC-007 or DV-CDC-008: dartvel.capture says something the framework cannot do.
DVCaptureDeliveryError
DV-CDC-001: a destination refused a batch; delivery is retrying.
DVCaptureSchemaError
DV-CDC-005: a destination's schema could not be evolved to match the source. Delivery stops before the change rather than sending rows the destination has no columns for.
DVOfflineQueueFullError
A write refused because the mutation log is at its bound (DV-OFFLINE-002).
DVOfflineStrategyError
A conflict strategy that cannot work offline was declared for an offline model (DV-HISTORY-002).