queryLint
queryLintReview SQL for indexing and metadata issues without execution. Detects unknown objects, SELECT *, conditionless joins, unindexed FKs, and non-leading predicate columns.
Instructions
Review authored SQL for advisory metadata and indexing problems without executing it. Reports unknown objects, SELECT *, conditionless joins, unindexed FKs and non-leading predicate/order columns; use validateQuery when database-driver acceptance is the question.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| schema | No | ||
| connection | Yes | Database to run against. Call listConnections for valid names; do not guess. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lintable | Yes | True when query lint could combine parsed SQL with metadata checks. | |
| warnings | No | Warnings produced by SQL inspection and metadata-aware lint checks. | |
| inspection | No | Parsed query inspection that underpins lint (opaque; the inspectQuery tool returns the typed form). | |
| warningCount | No | Number of warnings produced by inspection or lint. | |
| tablesChecked | No | Tables whose metadata was checked during query lint. |