Struct eversal_lib::model::CategoryDb
source · pub struct CategoryDb {
pub category_id: i32,
pub category_name: String,
pub icon_id: Option<i32>,
pub published: bool,
}Fields§
§category_id: i32§category_name: String§icon_id: Option<i32>§published: boolImplementations§
source§impl CategoryDb
impl CategoryDb
sourcepub async fn count(filter: &CategoryFilter) -> DbResult<i64>
pub async fn count(filter: &CategoryFilter) -> DbResult<i64>
Count the number of categories in the database.
sourcepub async fn get_multiple(params: &CategoryFilter) -> DbResult<Vec<Self>>
pub async fn get_multiple(params: &CategoryFilter) -> DbResult<Vec<Self>>
Fetch categories from the database.
sourcepub async fn insert_multiple(categories: Vec<Self>) -> DbResult<()>
pub async fn insert_multiple(categories: Vec<Self>) -> DbResult<()>
Insert multiple categories into the database.
Trait Implementations§
source§impl Debug for CategoryDb
impl Debug for CategoryDb
source§impl<'de> Deserialize<'de> for CategoryDb
impl<'de> Deserialize<'de> for CategoryDb
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, R: Row> FromRow<'a, R> for CategoryDb
impl<'a, R: Row> FromRow<'a, R> for CategoryDb
Auto Trait Implementations§
impl Freeze for CategoryDb
impl RefUnwindSafe for CategoryDb
impl Send for CategoryDb
impl Sync for CategoryDb
impl Unpin for CategoryDb
impl UnwindSafe for CategoryDb
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> 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