no-mistakes-postgres-sql 0.109.125

PostgreSQL SQL parsing, statement facts, and identifier extraction for no-mistakes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use super::facts;

#[test]
fn nested_positive_order_caps_remain_distinct_from_implicit_groups() {
    let sql = include_str!(concat!(
        env!("CARGO_MANIFEST_DIR"),
        "/../../test-cases/rules/postgres-bounded-statements/fixture/sql/nested-positive-order.sql"
    ));
    assert_eq!(
        facts(sql)
            .iter()
            .map(|fact| fact.query.capped)
            .collect::<Vec<_>>(),
        [true, true, true, false, false, false, false, false]
    );
}