no-mistakes-postgres-sql 0.109.124

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::SqlSelectFact;
use std::collections::HashSet;

/// A nested `EXISTS` can be reached from both an expression walk and the
/// enclosing SELECT walk; keep the first fact at each source position.
pub(super) fn exists_set_operations(selects: &mut [SqlSelectFact]) {
    let mut seen = HashSet::new();
    for select in selects {
        select
            .exists_set_operations
            .retain(|fact| seen.insert((fact.line, fact.column)));
    }
}

#[cfg(all(test, any(nm_shard_all, nm_shard_2)))]
mod tests;