pub struct AuditLogDbStore { /* private fields */ }Expand description
SeaORM-backed audit log store.
Implementations§
Source§impl AuditLogDbStore
impl AuditLogDbStore
Sourcepub const fn new(db: DatabaseConnection) -> Self
pub const fn new(db: DatabaseConnection) -> Self
Creates an audit log store from a SeaORM database connection.
Sourcepub async fn create(&self, request: AuditLogCreate) -> Result<Model>
pub async fn create(&self, request: AuditLogCreate) -> Result<Model>
Inserts one audit log row.
Sourcepub async fn create_many(&self, models: Vec<ActiveModel>) -> Result<()>
pub async fn create_many(&self, models: Vec<ActiveModel>) -> Result<()>
Inserts multiple already-built audit log active models.
Sourcepub async fn create_many_requests(
&self,
requests: Vec<AuditLogCreate>,
) -> Result<()>
pub async fn create_many_requests( &self, requests: Vec<AuditLogCreate>, ) -> Result<()>
Inserts multiple audit log create requests.
Sourcepub async fn count_created_between(
&self,
start: DateTime<Utc>,
end: DateTime<Utc>,
) -> Result<u64>
pub async fn count_created_between( &self, start: DateTime<Utc>, end: DateTime<Utc>, ) -> Result<u64>
Counts rows created in [start, end).
Sourcepub async fn count_created_between_with_actions(
&self,
start: DateTime<Utc>,
end: DateTime<Utc>,
actions: &[&str],
) -> Result<u64>
pub async fn count_created_between_with_actions( &self, start: DateTime<Utc>, end: DateTime<Utc>, actions: &[&str], ) -> Result<u64>
Counts rows for any of the supplied action wire values in [start, end).
Sourcepub async fn delete_before(&self, before: DateTime<Utc>) -> Result<u64>
pub async fn delete_before(&self, before: DateTime<Utc>) -> Result<u64>
Deletes rows created before the supplied cutoff.
Sourcepub async fn find_with_filters_cursor(
&self,
query: AuditLogQuery<'_>,
) -> Result<AuditLogCursorSlice>
pub async fn find_with_filters_cursor( &self, query: AuditLogQuery<'_>, ) -> Result<AuditLogCursorSlice>
Finds audit logs with shared cursor filtering.
Trait Implementations§
Source§impl Clone for AuditLogDbStore
impl Clone for AuditLogDbStore
Source§fn clone(&self) -> AuditLogDbStore
fn clone(&self) -> AuditLogDbStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuditLogDbStore
impl !RefUnwindSafe for AuditLogDbStore
impl Send for AuditLogDbStore
impl Sync for AuditLogDbStore
impl Unpin for AuditLogDbStore
impl UnsafeUnpin for AuditLogDbStore
impl !UnwindSafe for AuditLogDbStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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