pub struct PostgresBucket { /* private fields */ }
Implementations§
Source§impl PostgresBucket
impl PostgresBucket
pub fn event_table(&self) -> String
Sourcepub async fn rebuild_columns_cache(
&self,
client: &mut Client,
) -> Result<(), StateError>
pub async fn rebuild_columns_cache( &self, client: &mut Client, ) -> Result<(), StateError>
Rebuild the cache of columns in the table.
pub fn existing_columns(&self) -> Vec<String>
pub fn column(&self, column_name: &String) -> Option<PostgresColumn>
pub fn has_column(&self, column_name: &String) -> bool
pub async fn create_event_table( &self, client: &mut Client, ) -> Result<(), StateError>
pub async fn create_state_table( &self, client: &mut Client, ) -> Result<(), StateError>
pub async fn add_missing_columns( &self, client: &mut Client, missing: Vec<(String, &'static str)>, ) -> Result<(), StateError>
Trait Implementations§
Source§impl StorageCollection for PostgresBucket
impl StorageCollection for PostgresBucket
fn set_state<'life0, 'async_trait>(
&'life0 self,
state: Attested<EntityState>,
) -> Pin<Box<dyn Future<Output = Result<bool, MutationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_state<'life0, 'async_trait>(
&'life0 self,
id: EntityId,
) -> Pin<Box<dyn Future<Output = Result<Attested<EntityState>, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_states<'life0, 'life1, 'async_trait>(
&'life0 self,
predicate: &'life1 Predicate,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<EntityState>>, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn add_event<'life0, 'life1, 'async_trait>(
&'life0 self,
entity_event: &'life1 Attested<Event>,
) -> Pin<Box<dyn Future<Output = Result<bool, MutationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_events<'life0, 'async_trait>(
&'life0 self,
event_ids: Vec<EventId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<Event>>, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_events<'life0, 'async_trait>(
&'life0 self,
event_ids: Vec<EventId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<Event>>, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve a list of events
Source§fn dump_entity_events<'life0, 'async_trait>(
&'life0 self,
entity_id: EntityId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<Event>>, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dump_entity_events<'life0, 'async_trait>(
&'life0 self,
entity_id: EntityId,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<Event>>, RetrievalError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieve all events from the collection
fn set_states<'life0, 'async_trait>(
&'life0 self,
states: Vec<Attested<EntityState>>,
) -> Pin<Box<dyn Future<Output = Result<(), MutationError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_states<'life0, 'async_trait>(
&'life0 self,
ids: Vec<EntityId>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Attested<EntityState>>, RetrievalError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Auto Trait Implementations§
impl Freeze for PostgresBucket
impl !RefUnwindSafe for PostgresBucket
impl Send for PostgresBucket
impl Sync for PostgresBucket
impl Unpin for PostgresBucket
impl !UnwindSafe for PostgresBucket
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