use crate::{Expr, ExprTrait};
use super::SqliteBinOper;
pub trait SqliteExpr: ExprTrait {
fn glob<T>(self, right: T) -> Expr
where
T: Into<Expr>,
{
self.binary(SqliteBinOper::Glob, right)
}
fn matches<T>(self, right: T) -> Expr
where
T: Into<Expr>,
{
self.binary(SqliteBinOper::Match, right)
}
fn get_json_field<T>(self, right: T) -> Expr
where
T: Into<Expr>,
{
self.binary(SqliteBinOper::GetJsonField, right)
}
fn cast_json_field<T>(self, right: T) -> Expr
where
T: Into<Expr>,
{
self.binary(SqliteBinOper::CastJsonField, right)
}
}
impl<T> SqliteExpr for T where T: ExprTrait {}