pub struct SqlExpression { /* private fields */ }Expand description
Lightweight SQL expression container.
Implementations§
Source§impl SqlExpression
impl SqlExpression
Sourcepub const fn identifier(identifier: SqlIdentifier) -> Self
pub const fn identifier(identifier: SqlIdentifier) -> Self
Creates an expression from an identifier.
Sourcepub const fn column(column: SqlColumnRef) -> Self
pub const fn column(column: SqlColumnRef) -> Self
Creates an expression from a column reference.
Sourcepub const fn parameter(parameter: SqlParameter) -> Self
pub const fn parameter(parameter: SqlParameter) -> Self
Creates an expression from a parameter placeholder.
Sourcepub fn binary(left: Self, operator: SqlOperator, right: Self) -> Self
pub fn binary(left: Self, operator: SqlOperator, right: Self) -> Self
Creates a simple binary operator expression.
Sourcepub fn predicate(predicate: SqlPredicate) -> Self
pub fn predicate(predicate: SqlPredicate) -> Self
Creates an expression from a predicate.
Sourcepub const fn kind(&self) -> &SqlExpressionKind
pub const fn kind(&self) -> &SqlExpressionKind
Returns the expression kind.
Trait Implementations§
Source§impl Clone for SqlExpression
impl Clone for SqlExpression
Source§fn clone(&self) -> SqlExpression
fn clone(&self) -> SqlExpression
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 SqlExpression
impl Debug for SqlExpression
Source§impl Display for SqlExpression
impl Display for SqlExpression
Source§impl From<SqlColumnRef> for SqlExpression
impl From<SqlColumnRef> for SqlExpression
Source§fn from(value: SqlColumnRef) -> Self
fn from(value: SqlColumnRef) -> Self
Converts to this type from the input type.
Source§impl From<SqlIdentifier> for SqlExpression
impl From<SqlIdentifier> for SqlExpression
Source§fn from(value: SqlIdentifier) -> Self
fn from(value: SqlIdentifier) -> Self
Converts to this type from the input type.
Source§impl From<SqlParameter> for SqlExpression
impl From<SqlParameter> for SqlExpression
Source§fn from(value: SqlParameter) -> Self
fn from(value: SqlParameter) -> Self
Converts to this type from the input type.
Source§impl From<SqlValue> for SqlExpression
impl From<SqlValue> for SqlExpression
Source§impl Hash for SqlExpression
impl Hash for SqlExpression
Source§impl Ord for SqlExpression
impl Ord for SqlExpression
Source§fn cmp(&self, other: &SqlExpression) -> Ordering
fn cmp(&self, other: &SqlExpression) -> 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 SqlExpression
impl PartialEq for SqlExpression
Source§fn eq(&self, other: &SqlExpression) -> bool
fn eq(&self, other: &SqlExpression) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SqlExpression
impl PartialOrd for SqlExpression
impl Eq for SqlExpression
impl StructuralPartialEq for SqlExpression
Auto Trait Implementations§
impl Freeze for SqlExpression
impl RefUnwindSafe for SqlExpression
impl Send for SqlExpression
impl Sync for SqlExpression
impl Unpin for SqlExpression
impl UnsafeUnpin for SqlExpression
impl UnwindSafe for SqlExpression
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