pub struct DieselSqliteStore { /* private fields */ }Implementations§
Source§impl DieselSqliteStore
impl DieselSqliteStore
pub fn open(path: &str) -> Result<Self>
pub fn open_with_schema(path: &str, app_schema: AppSchema) -> Result<Self>
pub fn ensure_schema(&mut self) -> Result<()>
pub fn app_schema_state(&mut self) -> Result<AppSchemaState>
pub fn runtime_pragma_report(&mut self) -> Result<SqliteRuntimePragmaReport>
pub fn list_table_json(&mut self, table: &str) -> Result<Vec<Value>>
pub fn read_row_json( &mut self, table: &str, row_id: &str, ) -> Result<Option<Value>>
pub fn record_command_history( &mut self, mutation_scope: &str, entries: &[CommandHistoryEntry], receipt: &MutationReceipt, ) -> Result<CommandHistoryRecord>
pub fn apply_syncular_mutations_with_command_history( &mut self, mutation_scope: &str, actor_id: Option<&str>, now_ms_value: i64, mutations: Vec<PendingSyncularMutation>, ) -> Result<MutationReceipt>
pub fn latest_command_history( &mut self, state: CommandHistoryState, ) -> Result<Option<CommandHistoryRecord>>
pub fn mark_command_history( &mut self, id: &str, state: CommandHistoryState, receipt: &MutationReceipt, ) -> Result<()>
pub fn read<'query, Q, Row>(&mut self, query: Q) -> Result<Vec<Row>>where
Q: LoadQuery<'query, SqliteConnection, Row>,
pub fn apply_local_operation( &mut self, operation: SyncOperation, local_row: Option<Value>, ) -> Result<String>
pub fn apply_local_operation_with_active_auth_lease( &mut self, actor_id: Option<&str>, now_ms_value: i64, operation: SyncOperation, local_row: Option<Value>, ) -> Result<String>
pub fn apply_syncular_mutations( &mut self, mutations: Vec<PendingSyncularMutation>, ) -> Result<MutationReceipt>
pub fn apply_syncular_mutations_with_active_auth_lease( &mut self, actor_id: Option<&str>, now_ms_value: i64, mutations: Vec<PendingSyncularMutation>, ) -> Result<MutationReceipt>
pub fn upsert_auth_lease(&mut self, lease: &AuthLeaseRecord) -> Result<()>
pub fn auth_lease(&mut self, lease_id: &str) -> Result<Option<AuthLeaseRecord>>
pub fn active_auth_leases( &mut self, actor_id: Option<&str>, now_ms_value: i64, ) -> Result<Vec<AuthLeaseRecord>>
pub fn set_outbox_auth_lease( &mut self, client_commit_id: &str, provenance: Option<&AuthLeaseProvenance>, ) -> Result<()>
pub fn store_blob_bytes( &mut self, data: &[u8], mime_type: &str, enqueue_upload: bool, ) -> Result<BlobRef>
pub fn store_blob_body( &mut self, blob: &BlobRef, data: &[u8], enqueue_upload: bool, ) -> Result<()>
pub fn cache_blob_bytes(&mut self, blob: &BlobRef, data: &[u8]) -> Result<()>
pub fn read_cached_blob(&mut self, hash: &str) -> Result<Option<Vec<u8>>>
pub fn is_blob_local(&mut self, hash: &str) -> Result<bool>
pub fn requeue_stale_blob_uploads(&mut self) -> Result<()>
pub fn pending_blob_uploads( &mut self, limit: i64, retry_now: bool, ) -> Result<Vec<PendingBlobUploadRow>>
pub fn mark_blob_uploading( &mut self, hash: &str, attempt_count: i32, ) -> Result<()>
pub fn mark_blob_upload_error( &mut self, hash: &str, status: &str, error: &str, next_attempt_at: i64, ) -> Result<()>
pub fn delete_blob_upload(&mut self, hash: &str) -> Result<()>
pub fn blob_upload_queue_stats(&mut self) -> Result<BlobUploadQueueStats>
pub fn blob_cache_stats(&mut self) -> Result<BlobCacheStats>
pub fn crdt_health_summary(&mut self) -> Result<CrdtHealthSummary>
pub fn apply_crdt_field_yjs_update( &mut self, field: &CrdtField, update: YjsUpdateEnvelope, max_pending_updates: i64, ) -> Result<String>
pub fn crdt_document_snapshot( &mut self, field: &CrdtField, ) -> Result<CrdtDocumentSnapshot>
pub fn crdt_update_log( &mut self, field: &CrdtField, limit: i64, ) -> Result<Vec<CrdtUpdateLogEntry>>
pub fn compact_crdt_document( &mut self, field: &CrdtField, ) -> Result<CrdtDocumentSnapshot>
pub fn prune_blob_cache(&mut self, max_bytes: i64) -> Result<i64>
pub fn prune_crdt_update_log(&mut self, cutoff: i64) -> Result<i64>
pub fn clear_blob_cache(&mut self) -> Result<()>
pub fn encrypted_crdt_stream_stats( &mut self, partition_id: &str, stream_id: &str, ) -> Result<EncryptedCrdtStreamStats>
pub fn prune_encrypted_crdt_updates(&mut self) -> Result<i64>
pub fn prune_encrypted_crdt_checkpoints( &mut self, keep_per_stream: i64, ) -> Result<i64>
pub fn compact_storage( &mut self, options: &StorageCompactionOptions, ) -> Result<StorageCompactionReport>
pub fn compact_storage_json( &mut self, options_json: Option<&str>, ) -> Result<String>
Trait Implementations§
Source§impl SyncStateStore for DieselSqliteStore
impl SyncStateStore for DieselSqliteStore
fn applied_migrations(&mut self) -> Result<Vec<AppliedMigration>>
fn app_schema_state( &mut self, _current_schema_version: i32, ) -> Result<AppSchemaState>
fn outbox_summaries(&mut self) -> Result<Vec<OutboxSummary>>
fn next_outbox_retry_at(&mut self) -> Result<Option<i64>>
fn next_blob_upload_retry_at(&mut self) -> Result<Option<i64>>
fn conflict_summaries(&mut self) -> Result<Vec<ConflictSummary>>
fn blob_health_summary(&mut self) -> Result<Option<BlobHealthSummary>>
fn crdt_health_summary(&mut self) -> Result<Option<CrdtHealthSummary>>
fn scoped_rows_health_summary( &mut self, subscriptions: &[SubscriptionSpec], ) -> Result<Option<ScopedRowsHealthSummary>>
fn clear_orphaned_synced_rows( &mut self, subscriptions: &[SubscriptionSpec], tables: &[String], ) -> Result<ScopedRowsHealthSummary>
fn resolve_conflict( &mut self, id_value: &str, resolution_value: &str, ) -> Result<()>
fn retry_conflict_keep_local(&mut self, id_value: &str) -> Result<String>
Source§impl SyncStore for DieselSqliteStore
impl SyncStore for DieselSqliteStore
type Tx<'a> = DieselSqliteTx<'a>
fn transaction<T>( &mut self, f: impl FnOnce(&mut Self::Tx<'_>) -> Result<T>, ) -> Result<T>
fn supports_sqlite_snapshot_artifacts(&self) -> bool
fn decode_sqlite_snapshot_artifact_rows( &self, table: &str, artifact_bytes: &[u8], ) -> Result<Vec<Value>>
Auto Trait Implementations§
impl Freeze for DieselSqliteStore
impl !RefUnwindSafe for DieselSqliteStore
impl Send for DieselSqliteStore
impl !Sync for DieselSqliteStore
impl Unpin for DieselSqliteStore
impl UnsafeUnpin for DieselSqliteStore
impl !UnwindSafe for DieselSqliteStore
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Add an aggregate function filter Read more
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Add an aggregate function order Read more
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
Source§fn over(self) -> Self::Outputwhere
Self: OverDsl,
fn over(self) -> Self::Outputwhere
Self: OverDsl,
Turn a function call into a window function call Read more
Source§fn window_filter<P>(self, f: P) -> Self::Output
fn window_filter<P>(self, f: P) -> Self::Output
Add a filter to the current window function Read more
Source§fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
Source§fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more