gograph_sql
Extract and analyze all raw SQL statements, database touches, and transaction blocks from Go source code. Filter results by keyword for targeted audits.
Instructions
Extract and analyze all raw SQL query literals, database touches, and transaction blocks inside the codebase. BEHAVIOR & SAFETY: This is a 100% local, read-only static analysis tool. It has no side effects, requires no authorization or credentials, has no rate limits, and performs zero destructive modifications. USAGE GUIDELINES: Call this tool when auditing database interactions, debugging database performance, or reviewing raw queries. Optional filter by keyword. Do NOT use for Go structs mapped to database tables (use gograph_schema instead). COMPLETENESS: Returns a list of matching SQL statements, their file and line locations, and the parent Go functions containing the database touch. Example term: 'SELECT'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | No | Optional SQL keyword or table name to filter database queries (e.g., 'SELECT', 'users') |