Skip to content

Commit 744a8a8

Browse files
committed
More examples
1 parent 4a041f4 commit 744a8a8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/expr.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,18 @@ impl Expr {
331331
/// r#"SELECT 'a' ? 'b'"#
332332
/// );
333333
/// ```
334+
/// ```
335+
/// use sea_query::{*, tests_cfg::*};
336+
///
337+
/// let query = Query::select()
338+
/// .expr(Expr::cust_with_values("data @?? (?::JSONPATH)", vec!["hello"]))
339+
/// .to_owned();
340+
///
341+
/// assert_eq!(
342+
/// query.to_string(PostgresQueryBuilder),
343+
/// r#"SELECT data @? ('hello'::JSONPATH)"#
344+
/// );
345+
/// ```
334346
pub fn cust_with_values<V, I>(s: &str, v: I) -> SimpleExpr
335347
where
336348
V: Into<Value>,

0 commit comments

Comments
 (0)