pub struct SetNode {
pub childs: Vec<NodeType>,
pub collection: String,
pub skips: String,
pub skip_null: Option<bool>,
}Expand description
Represents a set node in py_sql.
It’s typically used in UPDATE statements to dynamically include SET clauses.
It will automatically remove trailing commas if present.
§Example
PySQL syntax:
UPDATE table
set:
if name != null:
name = #{name},
if age != null:
age = #{age},
WHERE id = #{id}Fields§
§childs: Vec<NodeType>§collection: String§skips: String§skip_null: Option<bool>Trait Implementations§
impl Eq for SetNode
impl StructuralPartialEq for SetNode
Auto Trait Implementations§
impl Freeze for SetNode
impl RefUnwindSafe for SetNode
impl Send for SetNode
impl Sync for SetNode
impl Unpin for SetNode
impl UnwindSafe for SetNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.