pub struct FindOpts {
pub limit: Option<i64>,
pub offset: Option<i64>,
pub order_by: Vec<String>,
pub filters: Vec<(String, Value)>,
}Expand description
Options for paginated / filtered queries.
Fields§
§limit: Option<i64>Maximum number of rows to return.
offset: Option<i64>Number of rows to skip.
order_by: Vec<String>Columns to order by (e.g. "created_at DESC").
filters: Vec<(String, Value)>Column-value filter pairs.
Implementations§
Source§impl FindOpts
impl FindOpts
Sourcepub fn with_limit(self, n: i64) -> Self
pub fn with_limit(self, n: i64) -> Self
Set a maximum number of rows.
Sourcepub fn with_offset(self, n: i64) -> Self
pub fn with_offset(self, n: i64) -> Self
Set the row offset for pagination.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FindOpts
impl RefUnwindSafe for FindOpts
impl Send for FindOpts
impl Sync for FindOpts
impl Unpin for FindOpts
impl UnsafeUnpin for FindOpts
impl UnwindSafe for FindOpts
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