query_app_db
Run one SQL statement against a function app's own database, to read rows and to fix data. Not for schema: a table or a column belongs in the version's migrations/NNNN_name.sql, and a statement that changes the schema is refused. Owners and editors only. Answers rows and rowCount for a select, and changes with lastInsertRowid for a write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One statement, with ? placeholders for every value that comes from somewhere else. A second statement in the same string is refused. | |
| app_id | Yes | The app id, as returned by search_apps or create_app. Starts with app_. | |
| params | No | The values for the ? placeholders, in order. Strings, numbers, booleans and null. |