Format Query
query-formatRead-onlyIdempotent
Format complete SQL with the native RawTree formatter without executing statements or writing database query logs. Supports multiple statements and preserves literals.
Instructions
Format complete SQL with the native RawTree formatter without executing statements or writing database query logs. Supports multiple statements and preserves literals. Inline INSERT VALUES data is copied verbatim without completeness or schema validation.
Returns JSON { "formatted": "..." } containing the entire formatted SQL. The API allows a 50 MiB JSON request, 100 MiB formatted output, and 30 seconds of formatting. Requires a backend with POST /v1/query-format.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Complete SQL document to format. | |
| cluster | No | RawTree cluster to use for this operation. | |
| database | No | Optional RawTree database override. RawTree uses the default database when omitted. | |
| organization | No | RawTree organization containing the target cluster. |