pub struct Query { /* private fields */ }Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
pub fn eq(self, col: &str, val: impl Into<JsValue>) -> Self
pub fn ne(self, col: &str, val: impl Into<JsValue>) -> Self
pub fn gt(self, col: &str, val: impl Into<JsValue>) -> Self
pub fn gte(self, col: &str, val: impl Into<JsValue>) -> Self
pub fn lt(self, col: &str, val: impl Into<JsValue>) -> Self
pub fn lte(self, col: &str, val: impl Into<JsValue>) -> Self
pub fn is_null(self, col: &str) -> Self
pub fn is_not_null(self, col: &str) -> Self
Sourcepub fn filter_optional(self, col: &str, val: Option<impl Into<JsValue>>) -> Self
pub fn filter_optional(self, col: &str, val: Option<impl Into<JsValue>>) -> Self
Generates (?N IS NULL OR col = ?N) — use for optional filter parameters.
Pass None to skip the filter (match all rows), Some(v) to filter by value.
Sourcepub fn filter_optional_gte(
self,
col: &str,
val: Option<impl Into<JsValue>>,
) -> Self
pub fn filter_optional_gte( self, col: &str, val: Option<impl Into<JsValue>>, ) -> Self
Generates (?N IS NULL OR col >= ?N) — use for optional lower-bound filters.
Sourcepub fn filter_optional_lte(
self,
col: &str,
val: Option<impl Into<JsValue>>,
) -> Self
pub fn filter_optional_lte( self, col: &str, val: Option<impl Into<JsValue>>, ) -> Self
Generates (?N IS NULL OR col <= ?N) — use for optional upper-bound filters.
pub fn order_by(self, col: &str, dir: Order) -> Self
pub fn limit(self, n: u64) -> Self
pub fn offset(self, n: u64) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnsafeUnpin 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