fix: return full pagination object in execute_query responses - #58
Merged
fuleinist merged 3 commits intoAug 2, 2026
Merged
Conversation
get_tables issued DescribeTable serially for every table returned by ListTables. On AWS accounts with hundreds of tables this took over a minute (~300ms per describe), exceeding the GUI's connection timeout and failing the initial connection. Describes now run with bounded concurrency (16 in flight via buffer_unordered) and results are re-sorted alphabetically to preserve ListTables ordering. Measured on an account with 400 tables: 75s -> 7s, with full metadata (item_count, table_size_bytes, table_status) preserved. Co-authored-by: Cursor <cursoragent@cursor.com>
The Tabularis app deserializes query results into a QueryResult whose
Pagination struct requires `page`, `page_size`, `total_rows` (optional)
and `has_more`. The plugin only sent `pagination: {"next_token": ...}`,
so the app rejected every query response with "missing field `page`"
(then `page_size`, then `has_more` as each was worked around).
items_to_response now always emits a complete pagination object:
- page: request's `page` param (default 1)
- page_size: request's `limit`, falling back to returned row count
- total_rows: null (DynamoDB cannot cheaply count a filtered result)
- has_more: existing next_token/truncation logic
- next_token: preserved alongside for resume
Stacked on TabularisDB#57.
Co-authored-by: Cursor <cursoragent@cursor.com>
CI was failing because cargo fmt --check found formatting differences on the sort_by line. Reformat to match rustfmt expectations.
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.
Summary
The Tabularis app (0.17+) deserializes
execute_queryresults into aQueryResultwhosePaginationstruct requirespage,page_size,total_rows(optional) andhas_more(src-tauri/src/models.rs). The plugin only sent:so the app rejected every query response with
missing field \page`— and after patching that,missing field `page_size`, thenmissing field `has_more``. Query results never rendered in the UI.Changes
items_to_responsenow always emits a complete pagination object:page— request'spageparam (default 1, newextract_pagehelper)page_size— request'slimit, falling back to the returned row counttotal_rows—null(DynamoDB cannot cheaply count a filtered result)has_more— existingnext_token/truncation logic, unchangednext_token— preserved alongside for resumeCOUNT/SUM/...) keeppagination: null, which the app'sOption<Pagination>accepts.extract_pagedefaults.Test plan
cargo test— 178 passed (3 new)cargo clippy— cleanNo credentials, endpoints, or account-specific data included in this change.
Made with Cursor
Made with Cursor