(_ context.Context)
| 173 | } |
| 174 | |
| 175 | func (a *Analyzer) Close(_ context.Context) error { |
| 176 | a.mu.Lock() |
| 177 | defer a.mu.Unlock() |
| 178 | if a.conn != nil { |
| 179 | err := a.conn.Close() |
| 180 | a.conn = nil |
| 181 | return err |
| 182 | } |
| 183 | return nil |
| 184 | } |
| 185 | |
| 186 | // EnsureConn initializes the database connection if not already done. |
| 187 | // This is useful for database-only mode where we need to connect before analyzing queries. |
nothing calls this directly
no test coverage detected