pub trait WhereClauses {
Show 22 methods
// Required methods
fn where_eq(&mut self, column: &str, value: Value);
fn where_ne(&mut self, column: &str, value: Value);
fn where_in(&mut self, column: &str, values: Vec<Value>);
fn where_not_in(&mut self, column: &str, values: Vec<Value>);
fn where_null(&mut self, column: &str);
fn where_not_null(&mut self, column: &str);
fn where_between(&mut self, column: &str, values: [Value; 2]);
fn where_not_between(&mut self, column: &str, values: [Value; 2]);
fn where_like(&mut self, column: &str, value: Value);
fn where_not_like(&mut self, column: &str, value: Value);
fn where_ilike(&mut self, column: &str, value: Value);
fn where_gt(&mut self, column: &str, value: Value);
fn where_gte(&mut self, column: &str, value: Value);
fn where_lt(&mut self, column: &str, value: Value);
fn where_lte(&mut self, column: &str, value: Value);
fn where_column(&mut self, lhs: &str, operator: &str, rhs: &str);
fn where_exists(&mut self, query: impl FnOnce(&mut ChainBuilder));
fn where_not_exists(&mut self, query: impl FnOnce(&mut ChainBuilder));
fn where_json_contains(&mut self, column: &str, value: Value);
fn where_subquery(&mut self, query: impl FnOnce(&mut QueryBuilder));
fn or(&mut self) -> &mut QueryBuilder;
fn where_raw(&mut self, sql: &str, binds: Option<Vec<Value>>);
}Expand description
Trait for WHERE clause operations
Required Methods§
Sourcefn where_not_in(&mut self, column: &str, values: Vec<Value>)
fn where_not_in(&mut self, column: &str, values: Vec<Value>)
Add a NOT IN condition
Sourcefn where_null(&mut self, column: &str)
fn where_null(&mut self, column: &str)
Add an IS NULL condition
Sourcefn where_not_null(&mut self, column: &str)
fn where_not_null(&mut self, column: &str)
Add an IS NOT NULL condition
Sourcefn where_between(&mut self, column: &str, values: [Value; 2])
fn where_between(&mut self, column: &str, values: [Value; 2])
Add a BETWEEN condition
Sourcefn where_not_between(&mut self, column: &str, values: [Value; 2])
fn where_not_between(&mut self, column: &str, values: [Value; 2])
Add a NOT BETWEEN condition
Sourcefn where_like(&mut self, column: &str, value: Value)
fn where_like(&mut self, column: &str, value: Value)
Add a LIKE condition
Sourcefn where_not_like(&mut self, column: &str, value: Value)
fn where_not_like(&mut self, column: &str, value: Value)
Add a NOT LIKE condition
Sourcefn where_ilike(&mut self, column: &str, value: Value)
fn where_ilike(&mut self, column: &str, value: Value)
Add a case-insensitive LIKE condition (ILIKE for Postgres, LOWER() for MySQL)
Sourcefn where_column(&mut self, lhs: &str, operator: &str, rhs: &str)
fn where_column(&mut self, lhs: &str, operator: &str, rhs: &str)
Add a column-to-column comparison
Sourcefn where_exists(&mut self, query: impl FnOnce(&mut ChainBuilder))
fn where_exists(&mut self, query: impl FnOnce(&mut ChainBuilder))
Add an EXISTS condition
Sourcefn where_not_exists(&mut self, query: impl FnOnce(&mut ChainBuilder))
fn where_not_exists(&mut self, query: impl FnOnce(&mut ChainBuilder))
Add a NOT EXISTS condition
Sourcefn where_json_contains(&mut self, column: &str, value: Value)
fn where_json_contains(&mut self, column: &str, value: Value)
Add a JSON contains condition (MySQL JSON_CONTAINS)
Sourcefn where_subquery(&mut self, query: impl FnOnce(&mut QueryBuilder))
fn where_subquery(&mut self, query: impl FnOnce(&mut QueryBuilder))
Add a subquery condition
Sourcefn or(&mut self) -> &mut QueryBuilder
fn or(&mut self) -> &mut QueryBuilder
Add an OR condition
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".