pub enum ParamValues {
List(Vec<ScalarValue>),
Map(HashMap<String, ScalarValue>),
}
Expand description
The parameter value corresponding to the placeholder
Variants§
List(Vec<ScalarValue>)
For positional query parameters, like SELECT * FROM test WHERE a > $1 AND b = $2
Map(HashMap<String, ScalarValue>)
For named query parameters, like SELECT * FROM test WHERE a > $foo AND b = $goo
Implementations§
Source§impl ParamValues
impl ParamValues
pub fn get_placeholders_with_values(&self, id: &str) -> Result<ScalarValue>
Trait Implementations§
Source§impl Clone for ParamValues
impl Clone for ParamValues
Source§fn clone(&self) -> ParamValues
fn clone(&self) -> ParamValues
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 ParamValues
impl Debug for ParamValues
Source§impl<K> From<HashMap<K, ScalarValue>> for ParamValues
impl<K> From<HashMap<K, ScalarValue>> for ParamValues
Source§fn from(value: HashMap<K, ScalarValue>) -> Self
fn from(value: HashMap<K, ScalarValue>) -> Self
Converts to this type from the input type.
Source§impl<K> From<Vec<(K, ScalarValue)>> for ParamValues
impl<K> From<Vec<(K, ScalarValue)>> for ParamValues
Source§fn from(value: Vec<(K, ScalarValue)>) -> Self
fn from(value: Vec<(K, ScalarValue)>) -> Self
Converts to this type from the input type.
Source§impl From<Vec<ScalarValue>> for ParamValues
impl From<Vec<ScalarValue>> for ParamValues
Source§fn from(value: Vec<ScalarValue>) -> Self
fn from(value: Vec<ScalarValue>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParamValues
impl !RefUnwindSafe for ParamValues
impl Send for ParamValues
impl Sync for ParamValues
impl Unpin for ParamValues
impl !UnwindSafe for ParamValues
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)