pub enum SqlParameter {
PostgresIndexed(SqlParameterIndex),
PositionalQuestionMark,
NamedColon(SqlParameterName),
NamedAtSign(SqlParameterName),
}Expand description
SQL parameter placeholders.
Variants§
PostgresIndexed(SqlParameterIndex)
PositionalQuestionMark
NamedColon(SqlParameterName)
NamedAtSign(SqlParameterName)
Implementations§
Source§impl SqlParameter
impl SqlParameter
Sourcepub const fn postgres_indexed(index: u32) -> Result<Self, SqlParameterError>
pub const fn postgres_indexed(index: u32) -> Result<Self, SqlParameterError>
Creates a PostgreSQL-style indexed parameter such as $1.
§Errors
Returns SqlParameterError::ZeroIndex when index is zero.
Sourcepub const fn positional() -> Self
pub const fn positional() -> Self
Creates a positional question-mark parameter.
Sourcepub fn named_colon(name: impl AsRef<str>) -> Result<Self, SqlParameterError>
pub fn named_colon(name: impl AsRef<str>) -> Result<Self, SqlParameterError>
Creates a colon-prefixed named parameter.
§Errors
Returns SqlParameterError when name validation fails.
Sourcepub fn named_at(name: impl AsRef<str>) -> Result<Self, SqlParameterError>
pub fn named_at(name: impl AsRef<str>) -> Result<Self, SqlParameterError>
Creates an at-sign-prefixed named parameter.
§Errors
Returns SqlParameterError when name validation fails.
Sourcepub const fn style(&self) -> SqlParameterStyle
pub const fn style(&self) -> SqlParameterStyle
Returns the placeholder style.
Trait Implementations§
Source§impl Clone for SqlParameter
impl Clone for SqlParameter
Source§fn clone(&self) -> SqlParameter
fn clone(&self) -> SqlParameter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SqlParameter
impl Debug for SqlParameter
Source§impl Display for SqlParameter
impl Display for SqlParameter
Source§impl FromStr for SqlParameter
impl FromStr for SqlParameter
Source§impl Hash for SqlParameter
impl Hash for SqlParameter
Source§impl Ord for SqlParameter
impl Ord for SqlParameter
Source§fn cmp(&self, other: &SqlParameter) -> Ordering
fn cmp(&self, other: &SqlParameter) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SqlParameter
impl PartialEq for SqlParameter
Source§fn eq(&self, other: &SqlParameter) -> bool
fn eq(&self, other: &SqlParameter) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SqlParameter
impl PartialOrd for SqlParameter
Source§impl TryFrom<&str> for SqlParameter
impl TryFrom<&str> for SqlParameter
impl Eq for SqlParameter
impl StructuralPartialEq for SqlParameter
Auto Trait Implementations§
impl Freeze for SqlParameter
impl RefUnwindSafe for SqlParameter
impl Send for SqlParameter
impl Sync for SqlParameter
impl Unpin for SqlParameter
impl UnsafeUnpin for SqlParameter
impl UnwindSafe for SqlParameter
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