Macro sea_query::all[][src]

macro_rules! all {
    ($($x : expr), *) => { ... };
}
Expand description

Macro to easily create an Condition::all.

Examples

use sea_query::{*, tests_cfg::*};

let query = Query::select()
    .column(Glyph::Image)
    .from(Glyph::Table)
    .cond_where(
        all![
            Expr::tbl(Glyph::Table, Glyph::Aspect).is_in(vec![3, 4]),
            Expr::tbl(Glyph::Table, Glyph::Image).like("A%")
        ]
    )
    .to_owned();

assert_eq!(
    query.to_string(MysqlQueryBuilder),
    r#"SELECT `image` FROM `glyph` WHERE `glyph`.`aspect` IN (3, 4) AND `glyph`.`image` LIKE 'A%'"#
);