pub struct Condition {
pub page: Option<PaginationParam>,
pub cond: Condition,
pub order: Vec<(SimpleExpr, Order)>,
}Available on crate features
api and seaorm only.Fields§
§page: Option<PaginationParam>§cond: Condition§order: Vec<(SimpleExpr, Order)>Implementations§
Source§impl Condition
impl Condition
pub fn new(cond: Condition) -> Self
pub fn new_all() -> Self
pub fn new_any() -> Self
pub fn add_sort(self, col: SimpleExpr, sort: Order) -> Self
pub fn add_page(self, page: PaginationParam) -> Self
pub fn parse_sort(self, str: String, col: Vec<ColumnRef>) -> Self
pub fn any() -> Condition
pub fn all() -> Condition
pub fn add<C>(self, condition: C) -> Self
pub fn add_option<C>(self, condition: Option<C>) -> Self
pub fn build<E>(self, q: Select<E>) -> (Select<E>, Option<PaginationParam>)where
E: EntityTrait,
pub async fn select_page<M, E, C>( self, q: Select<E>, db: &C, ) -> Result<(Vec<E::Model>, u64)>
pub fn add_time<T>(self, p: &TimeParam) -> Selfwhere
T: DefaultColumnTrait,
Available on crate feature
entity only.Trait Implementations§
Auto Trait Implementations§
impl Freeze for Condition
impl RefUnwindSafe for Condition
impl Send for Condition
impl Sync for Condition
impl Unpin for Condition
impl UnsafeUnpin for Condition
impl UnwindSafe for Condition
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