pub struct SqliteDb { /* private fields */ }Implementations§
Trait Implementations§
Source§impl ClientSideDb for SqliteDb
impl ClientSideDb for SqliteDb
async fn storage_info(&self) -> Result<ClientStorageInfo, Error>
async fn save_login(&self, _info: LoginInfo) -> Result<(), Error>
async fn get_saved_login(&self) -> Result<Option<LoginInfo>, Error>
async fn remove_everything(&self) -> Result<(), Error>
async fn get_json( &self, object_id: ObjectId, importance: Importance, ) -> Result<Value, Error>
Source§async fn recreate<T>(
&self,
object_id: ObjectId,
new_created_at: EventId,
object: Arc<T>,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Arc<T>>, Error>where
T: Object,
async fn recreate<T>(
&self,
object_id: ObjectId,
new_created_at: EventId,
object: Arc<T>,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Arc<T>>, Error>where
T: Object,
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>, Error>
async fn remove(&self, _object_id: ObjectId) -> Result<(), Error>
async fn remove_event<T>(
&self,
_object_id: ObjectId,
_event_id: EventId,
) -> Result<(), Error>where
T: Object,
async fn set_object_importance( &self, object_id: ObjectId, new_importance: Importance, ) -> Result<(), Error>
async fn set_importance_from_queries( &self, object_id: ObjectId, new_importance_from_queries: Importance, ) -> Result<(), Error>
async fn client_vacuum( &self, _notify_removals: impl CrdbSyncFn<ObjectId> + 'static, _notify_query_removals: impl CrdbSyncFn<QueryId> + 'static, ) -> Result<(), Error>
async fn list_uploads(&self) -> Result<Vec<UploadId>, Error>
async fn get_upload( &self, _upload_id: UploadId, ) -> Result<Option<Upload>, Error>
async fn enqueue_upload( &self, _upload: Upload, _required_binaries: Vec<BinPtr>, ) -> Result<UploadId, Error>
async fn upload_finished(&self, _upload_id: UploadId) -> Result<(), Error>
async fn get_saved_objects( &self, ) -> Result<HashMap<ObjectId, SavedObjectMeta>, Error>
async fn get_saved_queries(&self) -> Result<HashMap<QueryId, SavedQuery>, Error>
async fn record_query( &self, _query_id: QueryId, _query: Arc<Query>, _type_id: TypeId, _importance: Importance, ) -> Result<(), Error>
async fn set_query_importance( &self, query_id: QueryId, importance: Importance, objects_matching_query: Vec<ObjectId>, ) -> Result<(), Error>
async fn forget_query( &self, _query_id: QueryId, _objects_to_unlock: Vec<ObjectId>, ) -> Result<(), Error>
async fn update_queries( &self, _queries: &HashSet<QueryId>, _now_have_all_until: Updatedness, ) -> Result<(), Error>
Source§impl Db for SqliteDb
impl Db for SqliteDb
Source§async fn reencode_old_versions<T>(&self) -> usizewhere
T: Object,
async fn reencode_old_versions<T>(&self) -> usizewhere
T: Object,
Returns the number of errors that happened while re-encoding
Source§async fn create<T>(
&self,
object_id: ObjectId,
created_at: EventId,
object: Arc<T>,
updatedness: Option<Updatedness>,
importance: Importance,
) -> Result<Option<Arc<T>>, Error>where
T: Object,
async fn create<T>(
&self,
object_id: ObjectId,
created_at: EventId,
object: Arc<T>,
updatedness: Option<Updatedness>,
importance: Importance,
) -> Result<Option<Arc<T>>, Error>where
T: Object,
Returns the new latest snapshot if it actually changed Read more
Source§async fn submit<T>(
&self,
object: ObjectId,
event_id: EventId,
event: Arc<<T as Object>::Event>,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Arc<T>>, Error>where
T: Object,
async fn submit<T>(
&self,
object: ObjectId,
event_id: EventId,
event: Arc<<T as Object>::Event>,
updatedness: Option<Updatedness>,
additional_importance: Importance,
) -> Result<Option<Arc<T>>, Error>where
T: Object,
Returns the new latest snapshot if it actually changed Read more
async fn get_latest<T>(
&self,
object_id: ObjectId,
importance: Importance,
) -> Result<Arc<T>, Error>where
T: Object,
async fn create_binary( &self, binary_id: BinPtr, data: Arc<[u8]>, ) -> Result<(), Error>
async fn get_binary( &self, binary_id: BinPtr, ) -> Result<Option<Arc<[u8]>>, Error>
async fn assert_invariants_generic(&self)
async fn assert_invariants_for<T>(&self)where
T: Object,
Auto Trait Implementations§
impl Freeze for SqliteDb
impl !RefUnwindSafe for SqliteDb
impl Send for SqliteDb
impl Sync for SqliteDb
impl Unpin for SqliteDb
impl UnsafeUnpin 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