pub struct Query {
pub keywords: Vec<Keyword>,
}
Expand description
Base struct for all queries built with the query builder
Fields§
§keywords: Vec<Keyword>
Implementations§
Source§impl Query
impl Query
Sourcepub fn select<T: Into<String> + Display>(
&mut self,
table: T,
values: Vec<T>,
) -> &mut Self
pub fn select<T: Into<String> + Display>( &mut self, table: T, values: Vec<T>, ) -> &mut Self
Add a select statement to the query. Takes the name of the table you’re selecting and the values.
You can add a filter with .filter
.
Sourcepub fn filter(&mut self, fields: Vec<(String, String)>) -> &mut Self
pub fn filter(&mut self, fields: Vec<(String, String)>) -> &mut Self
Add a filter statement to the query. Takes a vector of (String,String). The first value is the field name and the second field is the value that should be filtered with.
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