(expr: &ast::Expr, name: &str)
| 204 | } |
| 205 | |
| 206 | fn is_column(expr: &ast::Expr, name: &str) -> bool { |
| 207 | match expr { |
| 208 | ast::Expr::Identifier(ident) => normalize_ident(ident) == name, |
| 209 | // Three or more parts: schema.table.col — never matches a plain pk name. |
| 210 | ast::Expr::CompoundIdentifier(parts) if parts.len() >= 3 => false, |
| 211 | ast::Expr::CompoundIdentifier(parts) if parts.len() == 2 => { |
| 212 | normalize_ident(&parts[1]) == name |
| 213 | } |
| 214 | _ => false, |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | /// Build a `SqlPlan::VectorPrimaryInsert` from parsed rows. |
| 219 | /// |
no test coverage detected