pub struct ConditionBuilder { /* private fields */ }
Expand description
A Condition
builder, used with StatementBuilder::if_condition()
.
Implementations§
Source§impl ConditionBuilder
impl ConditionBuilder
Sourcepub fn new(operator: GlobalConditionOperator) -> Self
pub fn new(operator: GlobalConditionOperator) -> Self
Create a new Condition with the provided operator.
Sourcepub fn new_string_equals() -> Self
pub fn new_string_equals() -> Self
Create a new Condition with operator = StringEquals
Sourcepub fn new_string_not_equals() -> Self
pub fn new_string_not_equals() -> Self
Create a new Condition with operator = StringNotEquals
Sourcepub fn new_numeric_equals() -> Self
pub fn new_numeric_equals() -> Self
Create a new Condition with operator = NumericEquals
Sourcepub fn new_numeric_not_equals() -> Self
pub fn new_numeric_not_equals() -> Self
Create a new Condition with operator = NumericNotEquals
Sourcepub fn right_hand_side(
&mut self,
key: &str,
values: &mut Vec<ConditionValue>,
) -> &mut Self
pub fn right_hand_side( &mut self, key: &str, values: &mut Vec<ConditionValue>, ) -> &mut Self
Add a list of values to the right-hand-sidse of this condition.
Sourcepub fn right_hand_str(&mut self, key: &str, value: &str) -> &mut Self
pub fn right_hand_str(&mut self, key: &str, value: &str) -> &mut Self
Add a string value to the right-hand-sidse of this condition.
Sourcepub fn right_hand_int(&mut self, key: &str, value: i64) -> &mut Self
pub fn right_hand_int(&mut self, key: &str, value: i64) -> &mut Self
Add a integer value to the right-hand-sidse of this condition.
Sourcepub fn right_hand_float(&mut self, key: &str, value: f64) -> &mut Self
pub fn right_hand_float(&mut self, key: &str, value: f64) -> &mut Self
Add a float value to the right-hand-sidse of this condition.
Sourcepub fn right_hand_bool(&mut self, key: &str, value: bool) -> &mut Self
pub fn right_hand_bool(&mut self, key: &str, value: bool) -> &mut Self
Add a boolean value to the right-hand-sidse of this condition.
Sourcepub fn build_as_condition(
&self,
) -> HashMap<ConditionOperator, HashMap<QString, OneOrAll<ConditionValue>>>
pub fn build_as_condition( &self, ) -> HashMap<ConditionOperator, HashMap<QString, OneOrAll<ConditionValue>>>
Convert this one condition into a complete Condition for a statement.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConditionBuilder
impl RefUnwindSafe for ConditionBuilder
impl Send for ConditionBuilder
impl Sync for ConditionBuilder
impl Unpin for ConditionBuilder
impl UnwindSafe for ConditionBuilder
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