Skip to main content

DieselSqliteStore

Struct DieselSqliteStore 

Source
pub struct DieselSqliteStore { /* private fields */ }

Implementations§

Source§

impl DieselSqliteStore

Source

pub fn open(path: &str) -> Result<DieselSqliteStore, SyncularError>

Source

pub fn open_with_schema( path: &str, app_schema: AppSchema, ) -> Result<DieselSqliteStore, SyncularError>

Source

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

Source

pub fn app_schema_state(&mut self) -> Result<AppSchemaState, SyncularError>

Source

pub fn runtime_pragma_report( &mut self, ) -> Result<SqliteRuntimePragmaReport, SyncularError>

Source

pub fn list_table_json( &mut self, table: &str, ) -> Result<Vec<Value>, SyncularError>

Source

pub fn read_row_json( &mut self, table: &str, row_id: &str, ) -> Result<Option<Value>, SyncularError>

Source

pub fn record_command_history( &mut self, mutation_scope: &str, entries: &[CommandHistoryEntry], receipt: &MutationReceipt, ) -> Result<CommandHistoryRecord, SyncularError>

Source

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, SyncularError>

Source

pub fn latest_command_history( &mut self, state: CommandHistoryState, ) -> Result<Option<CommandHistoryRecord>, SyncularError>

Source

pub fn mark_command_history( &mut self, id: &str, state: CommandHistoryState, receipt: &MutationReceipt, ) -> Result<(), SyncularError>

Source

pub fn read<'query, Q, Row>( &mut self, query: Q, ) -> Result<Vec<Row>, SyncularError>
where Q: LoadQuery<'query, SqliteConnection, Row>,

Source

pub fn apply_local_operation( &mut self, operation: SyncOperation, local_row: Option<Value>, ) -> Result<String, SyncularError>

Source

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, SyncularError>

Source

pub fn apply_syncular_mutations( &mut self, mutations: Vec<PendingSyncularMutation>, ) -> Result<MutationReceipt, SyncularError>

Source

pub fn apply_syncular_mutations_with_active_auth_lease( &mut self, actor_id: Option<&str>, now_ms_value: i64, mutations: Vec<PendingSyncularMutation>, ) -> Result<MutationReceipt, SyncularError>

Source

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

Source

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

Source

pub fn active_auth_leases( &mut self, actor_id: Option<&str>, now_ms_value: i64, ) -> Result<Vec<AuthLeaseRecord>, SyncularError>

Source

pub fn set_outbox_auth_lease( &mut self, client_commit_id: &str, provenance: Option<&AuthLeaseProvenance>, ) -> Result<(), SyncularError>

Source

pub fn store_blob_bytes( &mut self, data: &[u8], mime_type: &str, enqueue_upload: bool, ) -> Result<BlobRef, SyncularError>

Source

pub fn store_blob_body( &mut self, blob: &BlobRef, data: &[u8], enqueue_upload: bool, ) -> Result<(), SyncularError>

Source

pub fn cache_blob_bytes( &mut self, blob: &BlobRef, data: &[u8], ) -> Result<(), SyncularError>

Source

pub fn read_cached_blob( &mut self, hash: &str, ) -> Result<Option<Vec<u8>>, SyncularError>

Source

pub fn is_blob_local(&mut self, hash: &str) -> Result<bool, SyncularError>

Source

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

Source

pub fn pending_blob_uploads( &mut self, limit: i64, retry_now: bool, ) -> Result<Vec<PendingBlobUploadRow>, SyncularError>

Source

pub fn mark_blob_uploading( &mut self, hash: &str, attempt_count: i32, ) -> Result<(), SyncularError>

Source

pub fn mark_blob_upload_error( &mut self, hash: &str, status: &str, error: &str, next_attempt_at: i64, ) -> Result<(), SyncularError>

Source

pub fn delete_blob_upload(&mut self, hash: &str) -> Result<(), SyncularError>

Source

pub fn blob_upload_queue_stats( &mut self, ) -> Result<BlobUploadQueueStats, SyncularError>

Source

pub fn blob_cache_stats(&mut self) -> Result<BlobCacheStats, SyncularError>

Source

pub fn crdt_health_summary( &mut self, ) -> Result<CrdtHealthSummary, SyncularError>

Source

pub fn apply_crdt_field_yjs_update( &mut self, field: &CrdtField, update: YjsUpdateEnvelope, max_pending_updates: i64, ) -> Result<String, SyncularError>

Source

pub fn crdt_document_snapshot( &mut self, field: &CrdtField, ) -> Result<CrdtDocumentSnapshot, SyncularError>

Source

pub fn crdt_update_log( &mut self, field: &CrdtField, limit: i64, ) -> Result<Vec<CrdtUpdateLogEntry>, SyncularError>

Source

pub fn compact_crdt_document( &mut self, field: &CrdtField, ) -> Result<CrdtDocumentSnapshot, SyncularError>

Source

pub fn prune_blob_cache(&mut self, max_bytes: i64) -> Result<i64, SyncularError>

Source

pub fn prune_crdt_update_log( &mut self, cutoff: i64, ) -> Result<i64, SyncularError>

Source

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

Source

pub fn encrypted_crdt_stream_stats( &mut self, partition_id: &str, stream_id: &str, ) -> Result<EncryptedCrdtStreamStats, SyncularError>

Source

pub fn prune_encrypted_crdt_updates(&mut self) -> Result<i64, SyncularError>

Source

pub fn prune_encrypted_crdt_checkpoints( &mut self, keep_per_stream: i64, ) -> Result<i64, SyncularError>

Source

pub fn compact_storage( &mut self, options: &StorageCompactionOptions, ) -> Result<StorageCompactionReport, SyncularError>

Source

pub fn compact_storage_json( &mut self, options_json: Option<&str>, ) -> Result<String, SyncularError>

Trait Implementations§

Source§

impl SyncStateStore for DieselSqliteStore

Source§

impl SyncStore for DieselSqliteStore

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AggregateExpressionMethods for T

Source§

fn aggregate_distinct(self) -> Self::Output
where Self: DistinctDsl,

DISTINCT modifier for aggregate functions Read more
Source§

fn aggregate_all(self) -> Self::Output
where Self: AllDsl,

ALL modifier for aggregate functions Read more
Source§

fn aggregate_filter<P>(self, f: P) -> Self::Output
where P: AsExpression<Bool>, Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,

Add an aggregate function filter Read more
Source§

fn aggregate_order<O>(self, o: O) -> Self::Output
where Self: OrderAggregateDsl<O>,

Add an aggregate function order Read more
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

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
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WindowExpressionMethods for T

Source§

fn over(self) -> Self::Output
where Self: OverDsl,

Turn a function call into a window function call Read more
Source§

fn window_filter<P>(self, f: P) -> Self::Output
where P: AsExpression<Bool>, Self: FilterDsl<<P as AsExpression<Bool>>::Expression>,

Add a filter to the current window function Read more
Source§

fn partition_by<E>(self, expr: E) -> Self::Output
where Self: PartitionByDsl<E>,

Add a partition clause to the current window function Read more
Source§

fn window_order<E>(self, expr: E) -> Self::Output
where Self: OrderWindowDsl<E>,

Add a order clause to the current window function Read more
Source§

fn frame_by<E>(self, expr: E) -> Self::Output
where Self: FrameDsl<E>,

Add a frame clause to the current window function Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more