NewSQLAnalyzer creates a new AST-based SQL analyzer
()
| 46 | |
| 47 | // NewSQLAnalyzer creates a new AST-based SQL analyzer |
| 48 | func NewSQLAnalyzer() *SQLAnalyzer { |
| 49 | return &SQLAnalyzer{ |
| 50 | Issues: make([]AnalysisIssue, 0), |
| 51 | SecurityScore: 100, |
| 52 | PerformanceScore: 100, |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | // Analyze performs comprehensive AST-based analysis |
| 57 | func (a *SQLAnalyzer) Analyze(astObj *ast.AST, sqlArgs ...string) (*AnalysisReport, error) { |
no outgoing calls