pub struct Query {
pub parameters: Parameters,
pub sort_fields: SortFields,
pub limit: usize,
pub offset: usize,
}
Fields§
§parameters: Parameters
§sort_fields: SortFields
§limit: usize
§offset: usize
Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
pub fn init( parameters: Parameters, sort_fields: SortFields, limit: usize, offset: usize, ) -> Self
pub fn to_http(&self) -> String
pub fn from_http(search: String) -> Result<Self>
pub fn to_sql(&self) -> String
pub fn where_clause(&self) -> String
pub fn order_clause(&self) -> String
pub fn to_values(&self) -> Vec<SqlValue>
Sourcepub fn parameter_values(&self) -> Vec<SqlValue>
pub fn parameter_values(&self) -> Vec<SqlValue>
Get SQL values for parameters only (without limit and offset)
Sourcepub fn pagination_values(&self) -> Vec<SqlValue>
pub fn pagination_values(&self) -> Vec<SqlValue>
Get SQL values for pagination (limit and offset only)
Sourcepub fn total_parameters(&self) -> usize
pub fn total_parameters(&self) -> usize
Get the total number of SQL parameter values (parameters + pagination) This counts only non-empty values, matching the behavior of to_values()
Trait Implementations§
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
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