analyzeIdentifier analyzes identifiers
(id *ast.Identifier)
| 289 | |
| 290 | // analyzeIdentifier analyzes identifiers |
| 291 | func (a *SQLAnalyzer) analyzeIdentifier(id *ast.Identifier) { |
| 292 | // Check for unqualified column names in multi-table queries |
| 293 | if id.Table == "" && a.joinCount > 0 { |
| 294 | a.addPerformanceIssue("UNQUALIFIED_COLUMN", "LOW", |
| 295 | "Unqualified column names in multi-table queries can be ambiguous", |
| 296 | "performance", "Use table aliases to qualify column names") |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | // analyzeLiteralValue analyzes literal values |
| 301 | func (a *SQLAnalyzer) analyzeLiteralValue(lit *ast.LiteralValue) { |
no test coverage detected