pub struct Query<QB> { /* private fields */ }Expand description
Struct representing a SQL-like query for QuickBooks entities
Implementations§
Source§impl<QB: QBItem> Query<QB>
impl<QB: QBItem> Query<QB>
Sourcepub unsafe fn condition(self, condition: WhereClause) -> Self
pub unsafe fn condition(self, condition: WhereClause) -> Self
Add a condition to the query
§Safety
This function is unsafe because it accepts a raw WhereClause.
The caller must ensure that the WhereClause is valid and corresponds to the QuickBooks entity.
Sourcepub fn typed_condition(self, condition: TypedWhereClause<QB>) -> Self
pub fn typed_condition(self, condition: TypedWhereClause<QB>) -> Self
Add a typed condition to the query
This is safe because the typed where clause ensures that the field and values are valid for the QuickBooks entity.
Sourcepub unsafe fn order(self, field: &'static str, order: Order) -> Self
pub unsafe fn order(self, field: &'static str, order: Order) -> Self
Add an order clause to the query
§Safety
This function is unsafe because it accepts a raw string slice as the field name.
The caller must ensure that the field name is valid and corresponds to a field in the QuickBooks entity.
Sourcepub fn limit(self, number: u32, offset: Option<u32>) -> Self
pub fn limit(self, number: u32, offset: Option<u32>) -> Self
Set a limit on the number of results returned by the query
Sourcepub fn query_string(&self) -> String
pub fn query_string(&self) -> String
Generate the query string
Trait Implementations§
impl<QB> StructuralPartialEq for Query<QB>
Auto Trait Implementations§
impl<QB> Freeze for Query<QB>
impl<QB> RefUnwindSafe for Query<QB>where
QB: RefUnwindSafe,
impl<QB> Send for Query<QB>where
QB: Send,
impl<QB> Sync for Query<QB>where
QB: Sync,
impl<QB> Unpin for Query<QB>where
QB: Unpin,
impl<QB> UnsafeUnpin for Query<QB>
impl<QB> UnwindSafe for Query<QB>where
QB: UnwindSafe,
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