pub struct SqliteDb { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl ClientSideDb for SqliteDb
impl ClientSideDb for SqliteDb
async fn storage_info(&self) -> Result<ClientStorageInfo>
async fn save_login(&self, _info: LoginInfo) -> Result<()>
async fn get_saved_login(&self) -> Result<Option<LoginInfo>>
async fn remove_everything(&self) -> Result<()>
async fn get_json( &self, object_id: ObjectId, importance: Importance, ) -> Result<Value>
Source§async fn recreate<T: Object>(
&self,
object_id: ObjectId,
new_created_at: EventId,
object: Arc<T>,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Arc<T>>>
async fn recreate<T: Object>( &self, object_id: ObjectId, new_created_at: EventId, object: Arc<T>, updatedness: Option<Updatedness>, additional_importance: Importance, ) -> Result<Option<Arc<T>>>
Either create an object if it did not exist yet, or recreate it Read more
async fn client_query( &self, _type_id: TypeId, _query: Arc<Query>, ) -> Result<Vec<ObjectId>>
async fn remove(&self, _object_id: ObjectId) -> Result<()>
async fn remove_event<T: Object>( &self, _object_id: ObjectId, _event_id: EventId, ) -> Result<()>
async fn set_object_importance( &self, object_id: ObjectId, new_importance: Importance, ) -> Result<()>
async fn set_importance_from_queries( &self, object_id: ObjectId, new_importance_from_queries: Importance, ) -> Result<()>
async fn client_vacuum( &self, _notify_removals: impl 'static + CrdbSyncFn<ObjectId>, _notify_query_removals: impl 'static + CrdbSyncFn<QueryId>, ) -> Result<()>
async fn list_uploads(&self) -> Result<Vec<UploadId>>
async fn get_upload(&self, _upload_id: UploadId) -> Result<Option<Upload>>
async fn enqueue_upload( &self, _upload: Upload, _required_binaries: Vec<BinPtr>, ) -> Result<UploadId>
async fn upload_finished(&self, _upload_id: UploadId) -> Result<()>
async fn get_saved_objects(&self) -> Result<HashMap<ObjectId, SavedObjectMeta>>
async fn get_saved_queries(&self) -> Result<HashMap<QueryId, SavedQuery>>
async fn record_query( &self, _query_id: QueryId, _query: Arc<Query>, _type_id: TypeId, _importance: Importance, ) -> Result<()>
async fn set_query_importance( &self, query_id: QueryId, importance: Importance, objects_matching_query: Vec<ObjectId>, ) -> Result<()>
async fn forget_query( &self, _query_id: QueryId, _objects_to_unlock: Vec<ObjectId>, ) -> Result<()>
async fn update_queries( &self, _queries: &HashSet<QueryId>, _now_have_all_until: Updatedness, ) -> Result<()>
Source§impl Db for SqliteDb
impl Db for SqliteDb
Source§async fn reencode_old_versions<T: Object>(&self) -> usize
async fn reencode_old_versions<T: Object>(&self) -> usize
Returns the number of errors that happened while re-encoding
Source§async fn create<T: Object>(
&self,
object_id: ObjectId,
created_at: EventId,
object: Arc<T>,
updatedness: Option<Updatedness>,
importance: Importance,
) -> Result<Option<Arc<T>>>
async fn create<T: Object>( &self, object_id: ObjectId, created_at: EventId, object: Arc<T>, updatedness: Option<Updatedness>, importance: Importance, ) -> Result<Option<Arc<T>>>
Returns the new latest snapshot if it actually changed Read more
Source§async fn submit<T: Object>(
&self,
object: ObjectId,
event_id: EventId,
event: Arc<T::Event>,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Arc<T>>>
async fn submit<T: Object>( &self, object: ObjectId, event_id: EventId, event: Arc<T::Event>, updatedness: Option<Updatedness>, additional_importance: Importance, ) -> Result<Option<Arc<T>>>
Returns the new latest snapshot if it actually changed Read more
async fn get_latest<T: Object>( &self, object_id: ObjectId, importance: Importance, ) -> Result<Arc<T>>
async fn create_binary(&self, binary_id: BinPtr, data: Arc<[u8]>) -> Result<()>
async fn get_binary(&self, binary_id: BinPtr) -> Result<Option<Arc<[u8]>>>
async fn assert_invariants_generic(&self)
async fn assert_invariants_for<T: Object>(&self)
Auto Trait Implementations§
impl Freeze for SqliteDb
impl !RefUnwindSafe for SqliteDb
impl Send for SqliteDb
impl Sync for SqliteDb
impl Unpin for SqliteDb
impl !UnwindSafe for SqliteDb
Blanket Implementations§
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<D> CanDoCallbacks for Dwhere
D: Db,
impl<D> CanDoCallbacks for Dwhere
D: Db,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more