macro_rules! all {
( $( $x:expr ),* $(,)?) => { ... };
}Expand description
Macro to easily create an Condition::all.
ยงExamples
use sql_builder::*;
let query = Query::select()
.column("image")
.from("glyph")
.cond_where(
all![
Expr::col(("glyph", "aspect")).is_in([3, 4]),
Expr::col(("glyph", "image")).like("A%")
]
)
.to_owned();
assert_eq!(
query.to_string(MysqlQueryBuilder).unwrap(),
r#"SELECT `image` FROM `glyph` WHERE `glyph`.`aspect` IN (3, 4) AND `glyph`.`image` LIKE 'A%'"#
);