Struct nostr_sqlite::SQLiteDatabase
source · pub struct SQLiteDatabase { /* private fields */ }
Expand description
SQLite Nostr Database
Implementations§
Trait Implementations§
source§impl Clone for SQLiteDatabase
impl Clone for SQLiteDatabase
source§fn clone(&self) -> SQLiteDatabase
fn clone(&self) -> SQLiteDatabase
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 SQLiteDatabase
impl Debug for SQLiteDatabase
source§impl NostrDatabase for SQLiteDatabase
impl NostrDatabase for SQLiteDatabase
source§fn backend(&self) -> Backend
fn backend(&self) -> Backend
Name of the backend database used (ex. rocksdb, lmdb, sqlite, indexeddb, …)
source§fn save_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 Event
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_event<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 Event
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
source§fn bulk_import<'life0, 'async_trait>(
&'life0 self,
events: BTreeSet<Event>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn bulk_import<'life0, 'async_trait>(
&'life0 self,
events: BTreeSet<Event>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bulk import events into database Read more
source§fn has_event_already_been_saved<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_event_already_been_saved<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if
Event
has already been savedsource§fn has_event_already_been_seen<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_event_already_been_seen<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if
EventId
has already been seensource§fn has_event_id_been_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_event_id_been_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
event_id: &'life1 EventId
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if
EventId
has been deletedsource§fn has_coordinate_been_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
coordinate: &'life1 Coordinate,
timestamp: Timestamp
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn has_coordinate_been_deleted<'life0, 'life1, 'async_trait>(
&'life0 self,
coordinate: &'life1 Coordinate,
timestamp: Timestamp
) -> Pin<Box<dyn Future<Output = Result<bool, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Check if event with
Coordinate
has been deleted before Timestamp
source§fn event_id_seen<'life0, 'async_trait>(
&'life0 self,
event_id: EventId,
relay_url: Url
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn event_id_seen<'life0, 'async_trait>(
&'life0 self,
event_id: EventId,
relay_url: Url
) -> Pin<Box<dyn Future<Output = Result<(), Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§fn event_seen_on_relays<'life0, 'async_trait>(
&'life0 self,
event_id: EventId
) -> Pin<Box<dyn Future<Output = Result<Option<HashSet<Url>>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn event_seen_on_relays<'life0, 'async_trait>(
&'life0 self,
event_id: EventId
) -> Pin<Box<dyn Future<Output = Result<Option<HashSet<Url>>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get list of relays that have seen the
EventId
source§fn event_by_id<'life0, 'async_trait>(
&'life0 self,
event_id: EventId
) -> Pin<Box<dyn Future<Output = Result<Event, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn event_by_id<'life0, 'async_trait>(
&'life0 self,
event_id: EventId
) -> Pin<Box<dyn Future<Output = Result<Event, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§fn count<'life0, 'async_trait>(
&'life0 self,
filters: Vec<Filter>
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 self,
filters: Vec<Filter>
) -> Pin<Box<dyn Future<Output = Result<usize, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§fn query<'life0, 'async_trait>(
&'life0 self,
filters: Vec<Filter>,
order: Order
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn query<'life0, 'async_trait>(
&'life0 self,
filters: Vec<Filter>,
order: Order
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Query store with filters
source§fn event_ids_by_filters<'life0, 'async_trait>(
&'life0 self,
filters: Vec<Filter>,
order: Order
) -> Pin<Box<dyn Future<Output = Result<Vec<EventId>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn event_ids_by_filters<'life0, 'async_trait>(
&'life0 self,
filters: Vec<Filter>,
order: Order
) -> Pin<Box<dyn Future<Output = Result<Vec<EventId>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get event IDs by filters
source§fn negentropy_items<'life0, 'async_trait>(
&'life0 self,
filter: Filter
) -> Pin<Box<dyn Future<Output = Result<Vec<(EventId, Timestamp)>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn negentropy_items<'life0, 'async_trait>(
&'life0 self,
filter: Filter
) -> Pin<Box<dyn Future<Output = Result<Vec<(EventId, Timestamp)>, Self::Err>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get
negentropy
itemsAuto Trait Implementations§
impl Freeze for SQLiteDatabase
impl !RefUnwindSafe for SQLiteDatabase
impl Send for SQLiteDatabase
impl Sync for SQLiteDatabase
impl Unpin for SQLiteDatabase
impl !UnwindSafe for SQLiteDatabase
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<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> IntoNostrDatabase for Twhere
T: NostrDatabase + 'static,
impl<T> IntoNostrDatabase for Twhere
T: NostrDatabase + 'static,
fn into_nostr_database(self) -> Arc<dyn NostrDatabase<Err = DatabaseError>>
source§impl<T> NostrDatabaseExt for Twhere
T: NostrDatabase + ?Sized,
impl<T> NostrDatabaseExt for Twhere
T: NostrDatabase + ?Sized,
source§fn profile<'life0, 'async_trait>(
&'life0 self,
public_key: PublicKey
) -> Pin<Box<dyn Future<Output = Result<Profile, Self::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
fn profile<'life0, 'async_trait>(
&'life0 self,
public_key: PublicKey
) -> Pin<Box<dyn Future<Output = Result<Profile, Self::Err>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Sync + 'async_trait,
Get profile metadata