no-mistakes-postgres-sql 0.109.128

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
17
use super::SqlSelectFact;

pub(super) fn walk_returning(
    sql: &str,
    returning: Option<&[sqlparser::ast::SelectItem]>,
    ctes: &[String],
    positions: super::super::value::PlaceholderPositions<'_>,
    selects: &mut Vec<SqlSelectFact>,
) {
    for item in returning.into_iter().flatten() {
        if let sqlparser::ast::SelectItem::UnnamedExpr(expr)
        | sqlparser::ast::SelectItem::ExprWithAlias { expr, .. } = item
        {
            super::super::select::walk_expr_at(sql, expr, ctes, false, positions, selects);
        }
    }
}