File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -267,6 +267,29 @@ impl Expr {
267
267
/// r#"SELECT "character", "size_w", "size_h" FROM "character" WHERE IFNULL("size_w", 0) > 2"#
268
268
/// );
269
269
/// ```
270
+ ///
271
+ /// ```
272
+ /// use sea_query::{tests_cfg::*, *};
273
+ ///
274
+ /// let query = Query::select()
275
+ /// .column(Char::Character)
276
+ /// .from(Char::Table)
277
+ /// .and_where(Expr::expr(Func::lower(Expr::col(Char::Character))).is_in(["a", "b"]))
278
+ /// .to_owned();
279
+ ///
280
+ /// assert_eq!(
281
+ /// query.to_string(MysqlQueryBuilder),
282
+ /// r#"SELECT `character` FROM `character` WHERE LOWER(`character`) IN ('a', 'b')"#
283
+ /// );
284
+ /// assert_eq!(
285
+ /// query.to_string(PostgresQueryBuilder),
286
+ /// r#"SELECT "character" FROM "character" WHERE LOWER("character") IN ('a', 'b')"#
287
+ /// );
288
+ /// assert_eq!(
289
+ /// query.to_string(SqliteQueryBuilder),
290
+ /// r#"SELECT "character" FROM "character" WHERE LOWER("character") IN ('a', 'b')"#
291
+ /// );
292
+ /// ```
270
293
#[ allow( clippy:: self_named_constructors) ]
271
294
pub fn expr < T > ( expr : T ) -> Self
272
295
where
You can’t perform that action at this time.
0 commit comments