Draft
Conversation
Add /api/v1/sql endpoint for executing plain SQL queries (no VISUALISE clause). Returns rows and columns as JSON, enabling direct database access for data exploration. Features: - Execute arbitrary SQL queries against the database - Returns JSON with rows, columns, rowCount, and truncated flag - Configurable row limit via --sql-max-rows (default: 10000) - Results truncated (not errored) when limit exceeded - Proper date/datetime serialization matching VegaLite writer Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
|
@georgestagg I haven't done a super detailed review of these changes, but offering them to see if they feel right at first glance. If it feels right, I'll look in greater detail. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/api/v1/sqlendpoint for executing plain SQL queries (no VISUALISE clause)--sql-max-rowsCLI flag (default: 10,000)API
Request:
{"query": "SELECT * FROM my_table WHERE x > 10"}Response:
{ "status": "success", "data": { "rows": [{"id": 1, "name": "Alice"}, ...], "columns": ["id", "name"], "rowCount": 150, "truncated": false } }🤖 Generated with Claude Code