diff --git a/src/expr/trait.rs b/src/expr/trait.rs index 48ebe0a99..818bbb544 100644 --- a/src/expr/trait.rs +++ b/src/expr/trait.rs @@ -920,11 +920,11 @@ pub trait ExprTrait: Sized { /// r#"SELECT "character", "size_w", "size_h" FROM "character" WHERE "character"."character" LIKE '|_Our|_' ESCAPE '|'"# /// ); /// ``` - fn like(self, like: L) -> Expr + fn like(self, right: R) -> Expr where - L: IntoLikeExpr, + R: Into, { - self.binary(BinOper::Like, like.into_like_expr()) + self.binary(BinOper::Like, right) } /// Express a less than (`<`) expression. @@ -1255,11 +1255,11 @@ pub trait ExprTrait: Sized { /// r#"SELECT "character", "size_w", "size_h" FROM "character" WHERE "character"."character" NOT LIKE 'Ours''%'"# /// ); /// ``` - fn not_like(self, like: L) -> Expr + fn not_like(self, right: R) -> Expr where - L: IntoLikeExpr, + R: Into, { - self.binary(BinOper::NotLike, like.into_like_expr()) + self.binary(BinOper::NotLike, right) } /// Express a logical `OR` operation. diff --git a/src/extension/postgres/expr.rs b/src/extension/postgres/expr.rs index 3f57e6961..e2ecf7f31 100644 --- a/src/extension/postgres/expr.rs +++ b/src/extension/postgres/expr.rs @@ -1,5 +1,5 @@ use super::PgBinOper; -use crate::{Expr, ExprTrait, IntoLikeExpr}; +use crate::{Expr, ExprTrait}; /// Postgres-specific operator methods for building expressions. pub trait PgExpr: ExprTrait { @@ -140,19 +140,19 @@ pub trait PgExpr: ExprTrait { /// r#"SELECT "character", "size_w", "size_h" FROM "character" WHERE "character"."character" ILIKE E'Ours\'%'"# /// ); /// ``` - fn ilike(self, like: L) -> Expr + fn ilike(self, right: R) -> Expr where - L: IntoLikeExpr, + R: Into, { - self.binary(PgBinOper::ILike, like.into_like_expr()) + self.binary(PgBinOper::ILike, right) } /// Express a `NOT ILIKE` expression - fn not_ilike(self, like: L) -> Expr + fn not_ilike(self, right: R) -> Expr where - L: IntoLikeExpr, + R: Into, { - self.binary(PgBinOper::NotILike, like.into_like_expr()) + self.binary(PgBinOper::NotILike, right) } /// Express a postgres retrieves JSON field as JSON value (`->`).