pub struct Sql(pub String, pub Vec<SqlArg>);
Expand description
A tuple to hold a raw SQL statement and the SQL arguments.
Sql
is the result from the Resolver
and is ready to be sent to the database.
Tuple Fields§
§0: String
§1: Vec<SqlArg>
Implementations§
Source§impl Sql
impl Sql
Sourcepub fn to_unsafe_string(&self) -> String
pub fn to_unsafe_string(&self) -> String
Builds a string with all arguments inlined.
While the string could technically be sent to a database never do this, because of the risk of SQL injection! The string is should only be used for debugging and logging purposes.
Sourcepub fn push_literal(&mut self, sql_lit: &str)
pub fn push_literal(&mut self, sql_lit: &str)
Add a literal string at the end.
Sourcepub fn pop_literals(&mut self, count: u8)
pub fn pop_literals(&mut self, count: u8)
Remove a number of characters from the end.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sql
impl RefUnwindSafe for Sql
impl Send for Sql
impl Sync for Sql
impl Unpin for Sql
impl UnwindSafe for Sql
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