Struct eversal_lib::model::MarketGroupDb
source · pub struct MarketGroupDb {
pub market_group_id: i32,
pub parent_group_id: Option<i32>,
pub market_group_name: String,
pub description: Option<String>,
pub icon_id: Option<i32>,
pub has_types: bool,
}Fields§
§market_group_id: i32§parent_group_id: Option<i32>§market_group_name: String§description: Option<String>§icon_id: Option<i32>§has_types: boolImplementations§
source§impl MarketGroupDb
impl MarketGroupDb
pub async fn get_by_id(id: i32) -> DbResult<Self>
pub async fn count(params: &MarketGroupFilter) -> DbResult<i64>
pub async fn get_multiple(filter: &MarketGroupFilter) -> DbResult<Vec<Self>>
pub async fn insert(&self) -> DbResult<()>
pub async fn insert_multiple(market_groups: &Vec<Self>) -> DbResult<()>
pub async fn update(&self) -> DbResult<()>
pub async fn delete(id: i32) -> DbResult<()>
Trait Implementations§
source§impl Debug for MarketGroupDb
impl Debug for MarketGroupDb
source§impl<'de> Deserialize<'de> for MarketGroupDb
impl<'de> Deserialize<'de> for MarketGroupDb
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 MarketGroupDbwhere
&'a str: ColumnIndex<R>,
i32: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for MarketGroupDbwhere
&'a str: ColumnIndex<R>,
i32: Decode<'a, R::Database> + Type<R::Database>,
Option<i32>: Decode<'a, R::Database> + Type<R::Database>,
String: Decode<'a, R::Database> + Type<R::Database>,
Option<String>: Decode<'a, R::Database> + Type<R::Database>,
bool: Decode<'a, R::Database> + Type<R::Database>,
Auto Trait Implementations§
impl Freeze for MarketGroupDb
impl RefUnwindSafe for MarketGroupDb
impl Send for MarketGroupDb
impl Sync for MarketGroupDb
impl Unpin for MarketGroupDb
impl UnwindSafe for MarketGroupDb
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