use super::operators::*;
use crate::dsl;
use crate::expression::grouped::Grouped;
use crate::expression::{AsExpression, Expression};
use crate::sql_types::SqlType;
#[cfg(feature = "sqlite")]
pub trait SqliteExpressionMethods: Expression + Sized {
fn is<T>(self, other: T) -> dsl::Is<Self, T>
where
Self::SqlType: SqlType,
T: AsExpression<Self::SqlType>,
{
Grouped(Is::new(self, other.as_expression()))
}
#[allow(clippy::wrong_self_convention)] fn is_not<T>(self, other: T) -> dsl::IsNot<Self, T>
where
Self::SqlType: SqlType,
T: AsExpression<Self::SqlType>,
{
Grouped(IsNot::new(self, other.as_expression()))
}
}
impl<T: Expression> SqliteExpressionMethods for T {}