pub struct StringNode {
pub value: String,
}
Expand description
Represents a plain string, a SQL text segment, or a string with preserved whitespace in py_sql. This node holds parts of the SQL query that are not dynamic tags or raw text.
§Examples
PySQL syntax for simple text segments:
SELECT * FROM users WHERE
if name != null:
name = #{name}
// In the above, "SELECT * FROM users WHERE " is a StringNode.
PySQL syntax for strings with preserved whitespace (using backticks - single line only):
` SELECT column1, column2 FROM my_table `
It also handles simple quoted strings if they are part of the py_sql structure:
// Example within a more complex structure (e.g., an expression):
// if status == 'active':
Fields§
§value: String
Trait Implementations§
Source§impl Clone for StringNode
impl Clone for StringNode
Source§fn clone(&self) -> StringNode
fn clone(&self) -> StringNode
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StringNode
impl Debug for StringNode
Source§impl PartialEq for StringNode
impl PartialEq for StringNode
impl Eq for StringNode
impl StructuralPartialEq for StringNode
Auto Trait Implementations§
impl Freeze for StringNode
impl RefUnwindSafe for StringNode
impl Send for StringNode
impl Sync for StringNode
impl Unpin for StringNode
impl UnwindSafe for StringNode
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.