db.query
Run SQL against an environment database. Returns up to 500 rows. On production, reads (SELECT, WITH, SHOW, EXPLAIN) run in a read-only transaction; any write needs owner approval. May return pending_approval: the owner is emailed a link to approve; tell them it is waiting, then poll approval.status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | Yes | Environment: production, staging, or a preview name | |
| sql | Yes | ||
| params | No | ||
| project | Yes | Project name |