MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / analyzeIdentifier

Method analyzeIdentifier

cmd/gosqlx/cmd/sql_analyzer.go:291–298  ·  view source on GitHub ↗

analyzeIdentifier analyzes identifiers

(id *ast.Identifier)

Source from the content-addressed store, hash-verified

289
290// analyzeIdentifier analyzes identifiers
291func (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
301func (a *SQLAnalyzer) analyzeLiteralValue(lit *ast.LiteralValue) {

Callers 1

VisitMethod · 0.95

Calls 1

addPerformanceIssueMethod · 0.95

Tested by

no test coverage detected