pub enum Parameter {
Null,
Boolean(bool),
Integer(i64),
Float(f64),
String(String),
Binary(Vec<u8>),
}Expand description
Parameter value for prepared statements.
Variants§
Null
NULL value
Boolean(bool)
Boolean value
Integer(i64)
Integer value
Float(f64)
Float value
String(String)
String value
Binary(Vec<u8>)
Binary data
Implementations§
Source§impl Parameter
impl Parameter
Sourcepub fn to_sql_literal(&self) -> Result<String, QueryError>
pub fn to_sql_literal(&self) -> Result<String, QueryError>
Convert parameter to SQL literal string.
This is a basic implementation for Phase 1. In production, use proper prepared statement protocol.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parameter
impl RefUnwindSafe for Parameter
impl Send for Parameter
impl Sync for Parameter
impl Unpin for Parameter
impl UnwindSafe for Parameter
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