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
sourceimpl 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 RefUnwindSafe for Sql
impl Send for Sql
impl Sync for Sql
impl Unpin for Sql
impl UnwindSafe for Sql
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more