db_query
Execute read-only SQL queries against the app-under-test database to inspect its data; returns columns, rows, and total row count (capped at 200).
Instructions
Executes a read-only query (SELECT/WITH/EXPLAIN/PRAGMA) against the app-under-test database. Pass the connection in db (SQLite path or "file:" / postgres:// URL); otherwise the engine-side YATT_APP_DB/--app-db configuration applies. Returns {columns, rows, totalRows}; rows are capped at 200.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db | No | Connection: SQLite path or "file:" / postgres:// URL (overrides the global configuration) | |
| sql | Yes | Read-only SQL query (SELECT, WITH, EXPLAIN or PRAGMA) |