Expand description
Owned SQLite writes and concurrent application reads.
Database serializes writes, sync bookkeeping, changeset capture and
apply on its owned connection. store::StoreReads owns a bounded pool of
read-only connections for application queries, with one transaction per
operation and separate bounded workers for processing owned query results.
Hosts open coven with Coven::builder and run app SQL through
CovenHandle::write or CovenHandle::read.
Re-exports§
pub use test_support::synthetic_store;pub use test_support::DatabaseImageTest;pub use test_support::OutboxAttempt;pub use test_support::RetainedRegistrationTamper;pub use test_support::ScopedRoutingStateForTest;pub use store::device_join_journal;pub use store::device_join_journal::DeviceJoinJournalError;pub use store::PayloadStoreError;pub use store::activated_merge_membership_remote_objects;pub use store::DeviceJoinBootstrapActivation;pub use store::DeviceJoinBootstrapCommit;pub use store::DeviceJoinBootstrapPlan;pub use store::DeviceJoinBootstrapRowData;pub use store::MembershipAuthorityBytes;pub use store::PreparedMergeMaterialization;pub use store::PreparedMergeMaterializationPackage;pub use store::ResolvedDeviceJoinBootstrap;pub use store::VerifiedAcknowledgedStoreSnapshot;pub use store::VerifiedReplayBaselineRetirementProof;pub use store::VerifiedStoreSnapshotAuthority;pub use store::audience_moves_by_row;pub use store::local_blob_cleanup_intents;pub use store::AudienceBlobMoveStaging;pub use store::PostUpload;pub use store::StagedAudienceBlobRollback;pub use store::projection_table_names;pub use store::AdvancedReplayBaseline;pub use store::BlobTransitionRoot;pub use store::BlobUploadDrainPermit;pub use store::BlockedWriteDiscard;pub use store::CandidateCleanupObject;pub use store::CircleAckPublicationInput;pub use store::CreatedSnapshot;pub use store::DeviceJoinJournalStore;pub use store::DurableStoreReclaimObject;pub use store::DurableStoreReclaimOperation;pub use store::HostWriteBlobTransaction;pub use store::HostWriteError;pub use store::HostWriteOperation;pub use store::IncomingTimestampPolicy;pub use store::InstalledReplayBaseline;pub use store::LocalBlobCleanup;pub use store::MakeRemoteAdmission;pub use store::MaterializedLocalBlob;pub use store::MergeCandidateAbandonmentPreparation;pub use store::ObservedStorePublication;pub use store::OutboxEntry;pub use store::OutboxFailure;pub use store::OutboxFailureKind;pub use store::OutboxOperation;pub use store::OutboxUploadState;pub use store::OwnStreamAuthorship;pub use store::OwnedVerifiedMergeMaterialization;pub use store::PreparedCircleObjects;pub use store::ReclaimCommitActivation;pub use store::ReclaimedStorePackage;pub use store::RetainedAudiencePackage;pub use store::RetainedMergeHistoryCheckpoint;pub use store::RetainedMergeMaterializationKey;pub use store::RetainedPackageApplication;pub use store::RetainedReplayAuthority;pub use store::RetainedReplayBaseline;pub use store::RetainedReplayGenesisAuthority;pub use store::SnapshotBlobAudience;pub use store::SnapshotBlobFact;pub use store::SnapshotDatabaseImage;pub use store::SnapshotImageError;pub use store::SnapshotImageOperationError;pub use store::SnapshotPublicationPermit;pub use store::StoreDatabase;pub use store::StoreReclaimJournalError;pub use store::StoreRowWrites;pub use store::StoreWritePreparation;pub use store::StuckReclaimOperation;pub use store::TableSchema;pub use store::ValidatedChangeset;pub use store::VerifiedMergeMaterialization;pub use store::VerifiedMergeMembershipObjects;pub use store::WinningRow;pub use store::GENERATION_ZERO;pub use store::resolve_and_apply_changeset;pub use store::ApplyResult;pub use store::AuthorExclusionLocatorTamper;pub use store::BlobFileFailure;pub use store::BlobFileFailures;pub use store::SqlContext;pub use store::SqlReadContext;pub use store::WriteBatch;pub use store::CloudOutboxSnapshot;pub use store::MakeRemoteProgress;pub use store::QueuedDelete;pub use store::QueuedMakeRemote;pub use store::QueuedUpload;pub use store::QueuedUploadPhase;pub use rusqlite;
Modules§
Structs§
- Activated
Store Ack - An acknowledgement a device has activated, and the commit that activated it.
- Audience
Move - Audience
Partition - Author
Exclusion Activation Locator - Blob
Activation - The exact commit coordinate that first made a blob locator authoritative.
- Blob
Decls - The blob declarations for a database handle, resolved from the declared set + the live schema at open. A synced table absent from this map carries no blob.
- Blocked
Merge Candidate - A candidate whose activation is blocked: the commit and head it would have activated, each named by the reference that identifies it.
- Circle
Partition Control - Cloud
Outbox Records - Coven
Schema Manifest - Database
- A cloneable handle to one owned database. The connection capability retains both the worker and its matching database context; this handle has no second path to either.
- Database
Test Table - Durable
Circle Snapshot Publication - Durable
Device Registration - Durable
Founder Graph - Durable
Founder Membership - Durable
Founder Membership Journal - Durable
Membership Mutation - Durable
Prepared Protocol Object - Durable
Snapshot Publication - Exact
Protocol Object - One loaded protocol object: its typed value, its canonical plaintext, and the bytes that go to storage.
- External
Blob - An external user-owned file a blob id resolves to, read back from a
local_blob_refsrow. The blob’s plaintext lives atpath(an absolute file Coven references but does not own);sizeis its registered plaintext length, combined with the row’s signed content hash to validate the exact file. - Foreign
KeyEdge - Founder
Membership Refs - Gates
- The gate model for a database handle, computed from the live schema at open.
- Initial
Store Membership Authority - Migration
- One ordered step in the host’s synced-schema ladder.
- Migration
Context - Host SQL inside one schema-migration transaction.
- Outbound
Store Ack - Owner
Recovery Publication - The exact Owner-recovery commit and announcement staged before either is published. A retry reopens these same stored bytes instead of resealing the semantic objects into different exact identities.
- Prepared
Audience Blob - Prepared
Audience Objects - Prepared
Audience Package - Prepared
Circle Operation Row - Prepared
External Blob - A user-owned file whose plaintext size and SHA-256 digest Coven read in one pass. Its content facts stay private and can only be consumed by external blob registration.
- Prepared
Merge Abandonment Candidates - Prepared
Protocol Object - Prepared
Remote Object - Prepared
Snapshot Blob - Prepared
Store Write - Prepared
Store Write Commit - Prepared
Store Write Partitions - Publication
Blob - Exact row facts captured with a durable Store write for one blob-bearing row.
- Published
Circle Snapshot - Published
Store Ack - Published
Store Snapshot - Routing
Changes - Staged
Blob Rollback Failure - A staged audience-move blob file that could not be rolled back, and why. Names the file so a host learns which staged bytes are left on disk.
- Staged
Blob Rollback Failures - Every staged file that could not be rolled back, in the order attempted.
- Staged
Circle Install - One Circle image selected against the restoring identity’s re-resolved access. Coverage references imported from the Store snapshot are removed as a set before these locally verified images are installed.
- Store
Audience Transitions - Store
Batch Completion - Store
Batch Local Cleanup - Store
Owner Anchor - Store
Write Base - Store
Write Blob Fact - Store
Write Blob Facts - Store
Write Remote Blob - Sync
Routing Contract - Terminal
Candidate Cleanup Verification - Verified
Snapshot Bootstrap Install
Enums§
- Blob
Decl Error - Why building the blob-declaration model failed.
- Changeset
Error - Changeset
Identity Error - Circle
Control Failure - Circle
Partition Control Error - Complete
Prepared Store Write Outcome - Coven
Migration Error - Coven
Migration Policy - Create
Table Schema Error - DbError
- An error from the owned database.
- Foreign
KeySchema Error - Gate
Error - Local
Device Registration State - Make
Remote Intent State - Materialization
Hold - Membership
Mutation Activation - Merge
Abandonment State - Migration
Error - Why running the synced-schema ladder failed. Carried as its own arm of
OpenErrorat theDatabase::openboundary — not flattened into aDbErrorstring — so the variants stay typed for the engine’s own tests, the snapshot bootstrap gate, and hosts matchingMigrationError::SchemaTooNewto prompt an app update. - Migration
Step - How a migration applies its change to the synced schema.
- Open
Error - Why opening the database failed. Splits a migration-ladder failure from every
other open-time database error so the
MigrationErrora host acts on —MigrationError::SchemaTooNew, whose remedy is “update the app” — stays matchable at the open boundary instead of being flattened into aDbErrorstring. - Outbound
Store AckActivation - Outbox
Identity - Staged
Blob Rollback Reason - Store
Write Blob Move Destination - Store
Write Routing - Stored
Blob Reference State - Sync
Routing Contract Error - Terminal
Candidate Authority
Constants§
- COVEN_
INITIALIZED_ STATE_ KEY - COVEN_
INITIALIZED_ STATE_ VALUE - COVEN_
SCHEMA_ MANIFEST_ STATE_ KEY - LOCAL_
DEVICE_ ID_ STATE_ KEY - STORE_
DEVICE_ GENESIS_ STATE_ KEY - SYNC_
ROUTING_ CONTRACT_ STATE_ KEY - SYNC_
ROUTING_ HASH_ STATE_ KEY
Functions§
- candidate_
graph_ exact_ objects - expected_
coven_ schema_ manifest - from_
tables_ call_ count - gate_
from_ tables_ call_ count - is_
reserved_ table_ name - Whether
nameis a table coven owns for sync bookkeeping. Hosts may not declare these as synced tables. - is_
routing_ table - outbox_
identity - parse_
circle_ operation_ row - Rebuild one operation from the three places it is stored.
- parse_
store_ reclaim_ operation - prepare_
external_ blob - Stream a user-owned file once and prepare its opaque content identity for
registration.
progressreceives the cumulative bytes consumed after each read. - quote_
ident - Quote an SQL identifier (table/column name), doubling any embedded quote, so a trusted-but-unbindable name interpolates safely. Identifiers cannot be passed as bound parameters; this is the safe interpolation path for them.
- remote_
audience_ to_ db - reset_
from_ tables_ call_ count - reset_
gate_ from_ tables_ call_ count - rewrite_
create_ into_ schema - Qualify a
CREATE TABLE <name> ...statement so it builds the table inside the attached schemaalias, replacing only the table-name token. - row_
to_ outbox_ entry - snapshot_
generation_ as_ i64 - store_
audience_ transitions - store_
reclaim_ journal_ error - store_
snapshot_ first_ slot - supported_
version - The top synced-schema version this binary supports: the count of registered
migrations.
run_migrationsvalidates the set is1..=Ncontiguous, so the count is the highest version (and0for an empty ladder — no synced schema). The snapshot bootstrap gate compares an incoming snapshot’s version against this before adopting the image, so it lives beside the ladder rather than being re-derived at each bootstrap call site. - validate_
prepared_ audience_ blob_ graph - validate_
snapshot_ author - validate_
snapshot_ image - value_
ref_ to_ string - Render a changeset/column [
ValueRef] as an ownedString, orNonefor SQL NULL. Mirrorssqlite3_value_text: text and blob bytes become a string (lossy on invalid UTF-8), and integers/reals their decimal text — so the_updated_atrow-arbitration comparison and blob-plan column reads see the same strings the raw FFI path (gate.rs) produces. - verify_
snapshot_ blob_ spools - walk_
changeset - Walk a changeset and return every row change with its column values.
- walk_
old_ changeset