pub struct SqliteSyncStore { /* private fields */ }Expand description
Shared owner of one bounded SQLite sync database.
Implementations§
Source§impl SqliteSyncStore
impl SqliteSyncStore
Sourcepub fn online_backup(
&self,
destination: impl AsRef<Path>,
) -> SqliteSyncResult<SqliteBackupReport>
pub fn online_backup( &self, destination: impl AsRef<Path>, ) -> SqliteSyncResult<SqliteBackupReport>
Creates an integrity-checked online backup and atomically publishes it.
Sourcepub fn restore_backup_to_new(
backup_path: impl AsRef<Path>,
destination: impl AsRef<Path>,
) -> SqliteSyncResult<SqliteBackupReport>
pub fn restore_backup_to_new( backup_path: impl AsRef<Path>, destination: impl AsRef<Path>, ) -> SqliteSyncResult<SqliteBackupReport>
Restores a verified backup into a new, previously absent database path.
Source§impl SqliteSyncStore
impl SqliteSyncStore
Sourcepub fn conflict_store(&self) -> SqliteSyncConflictStore
pub fn conflict_store(&self) -> SqliteSyncConflictStore
Returns a conflict store sharing this database and its integrity/backup boundary.
Source§impl SqliteSyncStore
impl SqliteSyncStore
Sourcepub fn pending_object_writes(
&self,
installation: &str,
limit: usize,
max_bytes: usize,
) -> SqliteSyncResult<Vec<ObjectWriteIntentV1>>
pub fn pending_object_writes( &self, installation: &str, limit: usize, max_bytes: usize, ) -> SqliteSyncResult<Vec<ObjectWriteIntentV1>>
Returns a FIFO bounded page of outstanding intents for one installation. Materialize idempotently in this order under application-owned object locks.
Sourcepub fn acknowledge_object_write(
&self,
installation: &str,
id: &str,
observed_sha256: &str,
) -> SqliteSyncResult<bool>
pub fn acknowledge_object_write( &self, installation: &str, id: &str, observed_sha256: &str, ) -> SqliteSyncResult<bool>
Removes only the installation’s oldest intent after the caller has synced and verified the actual materialized envelope. Same receipt replay returns false after removal; an ID must never be reused once an intent is completed. This records caller evidence, not an independent filesystem verification.
Source§impl SqliteSyncStore
impl SqliteSyncStore
Sourcepub fn open(config: SqliteSyncConfig) -> SqliteSyncResult<Self>
pub fn open(config: SqliteSyncConfig) -> SqliteSyncResult<Self>
Opens, migrates and integrity-checks one provider database.
Sourcepub fn health(&self) -> SqliteSyncResult<SqliteSyncHealth>
pub fn health(&self) -> SqliteSyncResult<SqliteSyncHealth>
Runs an integrity check and reports bounded database usage.
Sourcepub fn config(&self) -> &SqliteSyncConfig
pub fn config(&self) -> &SqliteSyncConfig
Returns the provider’s redacted configuration bounds.
Sourcepub fn replication_log(&self) -> SqliteReplicationLog
pub fn replication_log(&self) -> SqliteReplicationLog
Creates a replication-log handle backed by this database.
Sourcepub fn checkpoint_store(&self) -> SqliteSyncCheckpointStore
pub fn checkpoint_store(&self) -> SqliteSyncCheckpointStore
Creates a checkpoint-store handle backed by this database.
Sourcepub fn outbox(&self) -> SqliteSyncOutbox
pub fn outbox(&self) -> SqliteSyncOutbox
Creates an outbox handle backed by this database.
Sourcepub fn tombstone_store(&self) -> SqliteSyncTombstoneStore
pub fn tombstone_store(&self) -> SqliteSyncTombstoneStore
Creates an opaque tombstone-store handle backed by this database.
Source§impl SqliteSyncStore
impl SqliteSyncStore
Sourcepub fn transaction<T>(
&self,
action: impl FnOnce(&mut SqliteSyncWork<'_>) -> SqliteSyncResult<T>,
) -> SqliteSyncResult<T>
pub fn transaction<T>( &self, action: impl FnOnce(&mut SqliteSyncWork<'_>) -> SqliteSyncResult<T>, ) -> SqliteSyncResult<T>
Commits all operations only when the callback succeeds. An error or unwind drops the transaction and rolls back every operation. At most 1,024 operations may be submitted. The deployment owns callback execution bounds.
Source§impl SqliteSyncStore
impl SqliteSyncStore
Sourcepub fn opaque_objects_v1(&self) -> SqliteOpaqueObjectStoreV1
pub fn opaque_objects_v1(&self) -> SqliteOpaqueObjectStoreV1
Returns a handle to canonical objects in the same database as the sync state.