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 field(self, field: &'static str) -> Self
pub unsafe fn field(self, field: &'static str) -> Self
Add a field to select in 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 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 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