pub struct EventEntity<'conn, C>where
C: Deref<Target = Connection>,{ /* private fields */ }Expand description
Event entity.
Implementations§
Source§impl<'conn> EventEntity<'conn, Box<Connection>>
impl<'conn> EventEntity<'conn, Box<Connection>>
Sourcepub fn find_all_query(log_type: EventLogType, reverse: bool) -> Select
pub fn find_all_query(log_type: EventLogType, reverse: bool) -> Select
Query to find all events.
Source§impl<'conn, C> EventEntity<'conn, C>where
C: Deref<Target = Connection>,
impl<'conn, C> EventEntity<'conn, C>where
C: Deref<Target = Connection>,
Sourcepub fn find_one(
&self,
log_type: EventLogType,
event_id: i64,
) -> Result<EventRecordRow, SqlError>
pub fn find_one( &self, log_type: EventLogType, event_id: i64, ) -> Result<EventRecordRow, SqlError>
Find an event record in the database.
Sourcepub fn delete_one(
&self,
log_type: EventLogType,
commit_hash: &CommitHash,
) -> Result<(), SqlError>
pub fn delete_one( &self, log_type: EventLogType, commit_hash: &CommitHash, ) -> Result<(), SqlError>
Delete an event from the database table.
Sourcepub fn insert_events(
&self,
log_type: EventLogType,
account_or_folder_id: i64,
events: &[EventRecordRow],
) -> Result<Vec<i64>, SqlError>
pub fn insert_events( &self, log_type: EventLogType, account_or_folder_id: i64, events: &[EventRecordRow], ) -> Result<Vec<i64>, SqlError>
Insert events into an event log table.
Sourcepub fn insert_account_events(
&self,
account_id: i64,
events: &[EventRecordRow],
) -> Result<Vec<i64>, SqlError>
pub fn insert_account_events( &self, account_id: i64, events: &[EventRecordRow], ) -> Result<Vec<i64>, SqlError>
Create account events in the database.
Sourcepub fn insert_folder_events(
&self,
folder_id: i64,
events: &[EventRecordRow],
) -> Result<Vec<i64>, SqlError>
pub fn insert_folder_events( &self, folder_id: i64, events: &[EventRecordRow], ) -> Result<Vec<i64>, SqlError>
Create folder events in the database.
Sourcepub fn insert_device_events(
&self,
account_id: i64,
events: &[EventRecordRow],
) -> Result<Vec<i64>, SqlError>
pub fn insert_device_events( &self, account_id: i64, events: &[EventRecordRow], ) -> Result<Vec<i64>, SqlError>
Create device events in the database.
Sourcepub fn insert_file_events(
&self,
account_id: i64,
events: &[EventRecordRow],
) -> Result<Vec<i64>, SqlError>
Available on crate feature files only.
pub fn insert_file_events( &self, account_id: i64, events: &[EventRecordRow], ) -> Result<Vec<i64>, SqlError>
files only.Create file events in the database.
Sourcepub fn load_events(
&self,
log_type: EventLogType,
account_id: i64,
folder_id: Option<i64>,
) -> Result<Vec<EventRecordRow>, Error>
pub fn load_events( &self, log_type: EventLogType, account_id: i64, folder_id: Option<i64>, ) -> Result<Vec<EventRecordRow>, Error>
Load event records for a folder.
Sourcepub fn load_commits(
&self,
log_type: EventLogType,
account_or_folder_id: i64,
) -> Result<Vec<CommitRow>, Error>
pub fn load_commits( &self, log_type: EventLogType, account_or_folder_id: i64, ) -> Result<Vec<CommitRow>, Error>
Load commits and identifiers for a folder.
Sourcepub fn delete_all_events(
&self,
log_type: EventLogType,
account_or_folder_id: i64,
) -> Result<usize, SqlError>
pub fn delete_all_events( &self, log_type: EventLogType, account_or_folder_id: i64, ) -> Result<usize, SqlError>
Delete all event logs.
Auto Trait Implementations§
impl<'conn, C> Freeze for EventEntity<'conn, C>
impl<'conn, C> RefUnwindSafe for EventEntity<'conn, C>where
C: RefUnwindSafe,
impl<'conn, C> Send for EventEntity<'conn, C>where
C: Sync,
impl<'conn, C> Sync for EventEntity<'conn, C>where
C: Sync,
impl<'conn, C> Unpin for EventEntity<'conn, C>
impl<'conn, C> UnwindSafe for EventEntity<'conn, C>where
C: RefUnwindSafe,
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