pub struct DocumentBox {
pub scope: DocumentBoxScopeRaw,
pub created_at: DateTime<Utc>,
}Fields§
§scope: DocumentBoxScopeRawScope for the document box
created_at: DateTime<Utc>Date of creation for the document box
Implementations§
Source§impl DocumentBox
impl DocumentBox
Sourcepub async fn query(
db: impl DbExecutor<'_>,
offset: u64,
limit: u64,
) -> DbResult<Vec<DocumentBox>>
pub async fn query( db: impl DbExecutor<'_>, offset: u64, limit: u64, ) -> DbResult<Vec<DocumentBox>>
Get a page from the document boxes list
Sourcepub async fn total(db: impl DbExecutor<'_>) -> DbResult<i64>
pub async fn total(db: impl DbExecutor<'_>) -> DbResult<i64>
Get the total number of document boxes in the tenant
Sourcepub async fn search_query(
db: impl DbExecutor<'_>,
query: &str,
offset: u64,
limit: u64,
) -> DbResult<Vec<DocumentBox>>
pub async fn search_query( db: impl DbExecutor<'_>, query: &str, offset: u64, limit: u64, ) -> DbResult<Vec<DocumentBox>>
Get a page from the document boxes list based on a search query
Sourcepub async fn search_total(db: impl DbExecutor<'_>, query: &str) -> DbResult<i64>
pub async fn search_total(db: impl DbExecutor<'_>, query: &str) -> DbResult<i64>
Get the total number of document boxes in the tenant for the specific search query
Sourcepub async fn find_by_scope(
db: impl DbExecutor<'_>,
scope: &DocumentBoxScopeRaw,
) -> DbResult<Option<DocumentBox>>
pub async fn find_by_scope( db: impl DbExecutor<'_>, scope: &DocumentBoxScopeRaw, ) -> DbResult<Option<DocumentBox>>
Find a specific document box by scope within a tenant
pub async fn create( db: impl DbExecutor<'_>, scope: String, ) -> DbResult<DocumentBox>
Sourcepub async fn delete(&self, db: impl DbExecutor<'_>) -> DbResult<PgQueryResult>
pub async fn delete(&self, db: impl DbExecutor<'_>) -> DbResult<PgQueryResult>
Deletes the document box
Trait Implementations§
Source§impl Clone for DocumentBox
impl Clone for DocumentBox
Source§fn clone(&self) -> DocumentBox
fn clone(&self) -> DocumentBox
Returns a duplicate 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 ComposeSchema for DocumentBox
impl ComposeSchema for DocumentBox
Source§impl Debug for DocumentBox
impl Debug for DocumentBox
Source§impl<'a, R: Row> FromRow<'a, R> for DocumentBox
impl<'a, R: Row> FromRow<'a, R> for DocumentBox
Source§impl Serialize for DocumentBox
impl Serialize for DocumentBox
Auto Trait Implementations§
impl Freeze for DocumentBox
impl RefUnwindSafe for DocumentBox
impl Send for DocumentBox
impl Sync for DocumentBox
impl Unpin for DocumentBox
impl UnwindSafe for DocumentBox
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,
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> 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 moreCreates a shared type from an unshared type.