pub struct DatabaseHelper { /* private fields */ }
Expand description
Database Indexes
Implementations§
Source§impl DatabaseHelper
impl DatabaseHelper
Sourcepub async fn bulk_import(&self, events: BTreeSet<Event>) -> BTreeSet<Event>
pub async fn bulk_import(&self, events: BTreeSet<Event>) -> BTreeSet<Event>
Bulk import
Take a set of Event, index them and return only the ones that must be stored into the database
Sourcepub async fn index_event(&self, event: &Event) -> DatabaseEventResult
pub async fn index_event(&self, event: &Event) -> DatabaseEventResult
Sourcepub fn fast_query<'a>(
&self,
txn: &'a QueryTransaction,
filter: Filter,
) -> Box<dyn Iterator<Item = &'a Event> + 'a>
pub fn fast_query<'a>( &self, txn: &'a QueryTransaction, filter: Filter, ) -> Box<dyn Iterator<Item = &'a Event> + 'a>
Query
Sourcepub async fn negentropy_items(
&self,
filter: Filter,
) -> Vec<(EventId, Timestamp)>
pub async fn negentropy_items( &self, filter: Filter, ) -> Vec<(EventId, Timestamp)>
Get negentropy items
Sourcepub async fn has_event_id_been_deleted(&self, event_id: &EventId) -> bool
pub async fn has_event_id_been_deleted(&self, event_id: &EventId) -> bool
Check if an event with EventId
has been deleted
Sourcepub async fn has_coordinate_been_deleted<'a>(
&self,
coordinate: &'a CoordinateBorrow<'a>,
timestamp: &Timestamp,
) -> bool
pub async fn has_coordinate_been_deleted<'a>( &self, coordinate: &'a CoordinateBorrow<'a>, timestamp: &Timestamp, ) -> bool
Check if event with Coordinate
has been deleted before Timestamp
Trait Implementations§
Source§impl Clone for DatabaseHelper
impl Clone for DatabaseHelper
Source§fn clone(&self) -> DatabaseHelper
fn clone(&self) -> DatabaseHelper
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for DatabaseHelper
impl Debug for DatabaseHelper
Source§impl Default for DatabaseHelper
impl Default for DatabaseHelper
Source§fn default() -> DatabaseHelper
fn default() -> DatabaseHelper
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DatabaseHelper
impl !RefUnwindSafe for DatabaseHelper
impl Send for DatabaseHelper
impl Sync for DatabaseHelper
impl Unpin for DatabaseHelper
impl !UnwindSafe for DatabaseHelper
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