pub struct Serializer<'a> { /* private fields */ }Expand description
Serialize a statement to a SQL string
Implementations§
Source§impl<'a> Serializer<'a>
impl<'a> Serializer<'a>
Source§impl<'a> Serializer<'a>
impl<'a> Serializer<'a>
pub fn serialize(&self, stmt: &Statement, params: &mut impl Params) -> String
Sourcepub fn serialize_transaction(&self, op: &Transaction) -> String
pub fn serialize_transaction(&self, op: &Transaction) -> String
Serialize a transaction control operation to a SQL string.
The generated SQL is flavor-specific (e.g., MySQL uses START TRANSACTION
while other databases use BEGIN). Savepoints are named sp_{id}.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Serializer<'a>
impl<'a> RefUnwindSafe for Serializer<'a>
impl<'a> Send for Serializer<'a>
impl<'a> Sync for Serializer<'a>
impl<'a> Unpin for Serializer<'a>
impl<'a> UnwindSafe for Serializer<'a>
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