Skip to main content

SyncStoreTx

Trait SyncStoreTx 

Source
pub trait SyncStoreTx {
Show 29 methods // Required methods fn pending_outbox( &mut self, limit: i64, ) -> Result<Vec<OutboxCommit>, SyncularError>; fn requeue_stale_outbox(&mut self) -> Result<(), SyncularError>; fn mark_outbox_sending(&mut self, row_id: &str) -> Result<(), SyncularError>; fn mark_outbox_acked( &mut self, row_id: &str, response: &PushCommitResponse, ) -> Result<(), SyncularError>; fn mark_outbox_failed( &mut self, row_id: &str, error: &str, response: &PushCommitResponse, ) -> Result<(), SyncularError>; fn mark_outbox_retry( &mut self, row_id: &str, error: &str, next_attempt_at: i64, failed: bool, ) -> Result<(), SyncularError>; fn insert_conflict( &mut self, outbox: &OutboxCommit, result: &OperationResult, ) -> Result<(), SyncularError>; fn subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<Option<SubscriptionState>, SyncularError>; fn upsert_subscription_state( &mut self, state: &SubscriptionState, ) -> Result<(), SyncularError>; fn delete_subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<(), SyncularError>; fn clear_table_for_scopes( &mut self, table: &str, scopes: &Map<String, Value>, ) -> Result<(), SyncularError>; fn upsert_row( &mut self, table: &str, row: &Value, fallback_version: Option<i64>, ) -> Result<(), SyncularError>; fn apply_change(&mut self, change: &SyncChange) -> Result<(), SyncularError>; // Provided methods fn mark_pushed_operation_server_versions( &mut self, _outbox: &OutboxCommit, _response: &PushCommitResponse, ) -> Result<(), SyncularError> { ... } fn upsert_auth_lease( &mut self, _lease: &AuthLeaseRecord, ) -> Result<(), SyncularError> { ... } fn auth_lease( &mut self, _lease_id: &str, ) -> Result<Option<AuthLeaseRecord>, SyncularError> { ... } fn active_auth_leases( &mut self, _actor_id: Option<&str>, _now_ms: i64, ) -> Result<Vec<AuthLeaseRecord>, SyncularError> { ... } fn set_outbox_auth_lease( &mut self, _client_commit_id: &str, _provenance: Option<&AuthLeaseProvenance>, ) -> Result<(), SyncularError> { ... } fn subscription_states( &mut self, _state_id: &str, ) -> Result<Vec<SubscriptionState>, SyncularError> { ... } fn verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<Option<VerifiedRoot>, SyncularError> { ... } fn verified_roots( &mut self, _state_id: &str, ) -> Result<Vec<VerifiedRoot>, SyncularError> { ... } fn upsert_verified_root( &mut self, _root: &VerifiedRoot, ) -> Result<(), SyncularError> { ... } fn delete_verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<(), SyncularError> { ... } fn crdt_state_vector_hints( &mut self, _table: &str, _scopes: &Map<String, Value>, _limit: i64, ) -> Result<Vec<CrdtStateVectorHint>, SyncularError> { ... } fn clear_synced_rows_for_scopes( &mut self, _table: &str, _scopes: &Map<String, Value>, ) -> Result<i64, SyncularError> { ... } fn clear_table_for_scopes_preserving_local_crdt( &mut self, table: &str, scopes: &Map<String, Value>, ) -> Result<(), SyncularError> { ... } fn current_row_json( &mut self, _table: &str, _row_id: &str, ) -> Result<Option<Value>, SyncularError> { ... } fn upsert_rows( &mut self, table: &str, rows: &[Value], fallback_version: Option<i64>, ) -> Result<(), SyncularError> { ... } fn upsert_snapshot_chunk_rows( &mut self, table: &str, rows: &SnapshotChunkRows, fallback_version: Option<i64>, ) -> Result<(), SyncularError> { ... }
}

Required Methods§

Source

fn pending_outbox( &mut self, limit: i64, ) -> Result<Vec<OutboxCommit>, SyncularError>

Source

fn requeue_stale_outbox(&mut self) -> Result<(), SyncularError>

Source

fn mark_outbox_sending(&mut self, row_id: &str) -> Result<(), SyncularError>

Source

fn mark_outbox_acked( &mut self, row_id: &str, response: &PushCommitResponse, ) -> Result<(), SyncularError>

Source

fn mark_outbox_failed( &mut self, row_id: &str, error: &str, response: &PushCommitResponse, ) -> Result<(), SyncularError>

Source

fn mark_outbox_retry( &mut self, row_id: &str, error: &str, next_attempt_at: i64, failed: bool, ) -> Result<(), SyncularError>

Source

fn insert_conflict( &mut self, outbox: &OutboxCommit, result: &OperationResult, ) -> Result<(), SyncularError>

Source

fn subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<Option<SubscriptionState>, SyncularError>

Source

fn upsert_subscription_state( &mut self, state: &SubscriptionState, ) -> Result<(), SyncularError>

Source

fn delete_subscription_state( &mut self, state_id: &str, subscription_id: &str, ) -> Result<(), SyncularError>

Source

fn clear_table_for_scopes( &mut self, table: &str, scopes: &Map<String, Value>, ) -> Result<(), SyncularError>

Source

fn upsert_row( &mut self, table: &str, row: &Value, fallback_version: Option<i64>, ) -> Result<(), SyncularError>

Source

fn apply_change(&mut self, change: &SyncChange) -> Result<(), SyncularError>

Provided Methods§

Source

fn mark_pushed_operation_server_versions( &mut self, _outbox: &OutboxCommit, _response: &PushCommitResponse, ) -> Result<(), SyncularError>

Source

fn upsert_auth_lease( &mut self, _lease: &AuthLeaseRecord, ) -> Result<(), SyncularError>

Source

fn auth_lease( &mut self, _lease_id: &str, ) -> Result<Option<AuthLeaseRecord>, SyncularError>

Source

fn active_auth_leases( &mut self, _actor_id: Option<&str>, _now_ms: i64, ) -> Result<Vec<AuthLeaseRecord>, SyncularError>

Source

fn set_outbox_auth_lease( &mut self, _client_commit_id: &str, _provenance: Option<&AuthLeaseProvenance>, ) -> Result<(), SyncularError>

Source

fn subscription_states( &mut self, _state_id: &str, ) -> Result<Vec<SubscriptionState>, SyncularError>

Source

fn verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<Option<VerifiedRoot>, SyncularError>

Source

fn verified_roots( &mut self, _state_id: &str, ) -> Result<Vec<VerifiedRoot>, SyncularError>

Source

fn upsert_verified_root( &mut self, _root: &VerifiedRoot, ) -> Result<(), SyncularError>

Source

fn delete_verified_root( &mut self, _state_id: &str, _subscription_id: &str, ) -> Result<(), SyncularError>

Source

fn crdt_state_vector_hints( &mut self, _table: &str, _scopes: &Map<String, Value>, _limit: i64, ) -> Result<Vec<CrdtStateVectorHint>, SyncularError>

Source

fn clear_synced_rows_for_scopes( &mut self, _table: &str, _scopes: &Map<String, Value>, ) -> Result<i64, SyncularError>

Source

fn clear_table_for_scopes_preserving_local_crdt( &mut self, table: &str, scopes: &Map<String, Value>, ) -> Result<(), SyncularError>

Source

fn current_row_json( &mut self, _table: &str, _row_id: &str, ) -> Result<Option<Value>, SyncularError>

Source

fn upsert_rows( &mut self, table: &str, rows: &[Value], fallback_version: Option<i64>, ) -> Result<(), SyncularError>

Source

fn upsert_snapshot_chunk_rows( &mut self, table: &str, rows: &SnapshotChunkRows, fallback_version: Option<i64>, ) -> Result<(), SyncularError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§