pub struct QueryParams {
pub filter: Option<FilterExpr>,
pub group_by: Option<Vec<String>>,
pub having: Option<FilterExpr>,
pub sort: Vec<SortItem>,
pub page: u32,
pub page_size: u32,
}Expand description
通用查询参数结构体 用于接收前端传递的查询条件、分页、排序等信息
Fields§
§filter: Option<FilterExpr>过滤条件表达式(支持嵌套的 AND/OR)
group_by: Option<Vec<String>>GROUP BY 字段列表
having: Option<FilterExpr>HAVING 过滤条件
sort: Vec<SortItem>排序规则列表
page: u32当前页码(通常从 0 开始,具体取决于实现)
page_size: u32每页记录数
Trait Implementations§
Source§impl Debug for QueryParams
impl Debug for QueryParams
Source§impl<'de> Deserialize<'de> for QueryParams
impl<'de> Deserialize<'de> for QueryParams
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
Auto Trait Implementations§
impl Freeze for QueryParams
impl RefUnwindSafe for QueryParams
impl Send for QueryParams
impl Sync for QueryParams
impl Unpin for QueryParams
impl UnwindSafe for QueryParams
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