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

Struct SQLAnalyzer

cmd/gosqlx/cmd/sql_analyzer.go:27–45  ·  view source on GitHub ↗

SQLAnalyzer provides deep AST-based analysis of SQL queries

Source from the content-addressed store, hash-verified

25
26// SQLAnalyzer provides deep AST-based analysis of SQL queries
27type SQLAnalyzer struct {
28 // Unified analysis results
29 Issues []AnalysisIssue
30 ComplexityMetrics ComplexityMetrics
31
32 // Score tracking
33 SecurityScore int
34 PerformanceScore int
35
36 // AST traversal state
37 currentDepth int
38 maxDepth int
39 joinCount int
40 subqueryCount int
41 functionCount int
42 hasCartesian bool
43 hasSelectStar bool
44 hasLiteralInWhere bool
45}
46
47// NewSQLAnalyzer creates a new AST-based SQL analyzer
48func NewSQLAnalyzer() *SQLAnalyzer {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected