Hide SQLite virtual table internals - #624
Merged
debba merged 2 commits intoAug 24, 2026
Merged
Conversation
DhruvShah-Dev
marked this pull request as ready for review
August 11, 2026 17:30
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by glm-5.2 · Input: 102.8K · Output: 7.8K · Cached: 96.4K |
debba
approved these changes
Aug 18, 2026
Collaborator
There was a problem hiding this comment.
Reviewed this locally, checked out the branch and tested against a real db. LGTM.
What I checked
- The
hidden = 1filter is applied insqlite_column_from_rowand all three call sites (get_columns,get_all_columns_batch,get_view_columns) now usefilter_map. Grepped the branch, there are no other places mappingtable_xinforows, so nothing was missed. - Confirmed the premise against a real database. On an fts5 table,
PRAGMA table_xinforeturns the internaldocsandrankcolumns withhidden = 1, while generated columns report2(virtual) and3(stored). So the filter removes exactly the fts5 internals and keeps generated columns visible withis_generated: true, same as before. - This is more than cosmetic btw: in fts5 the column named after the table is a command interface, so having it in the New Row modal meant a user could accidentally run commands like
'delete-all'. Good catch on #622.
Tests
You mentioned the test timed out on your machine. It runs fine here on the branch:
cargo test --lib drivers::sqlite::tests
12 passed; 0 failed (0.02s after build)
That includes the new test_get_columns_excludes_hidden_virtual_table_columns, which covers both the direct and the batch lookup against a real fts5 table.
Manual testing
Seeded a db with an fts5 table, a table with virtual + stored generated columns, a plain table and a view:
- fts5 New Row modal: only
titleandbody, nodocsorrankanymore - generated columns: still shown and still flagged as generated, not writable
- plain table and view: unchanged
Notes (non blocking)
PRAGMA table_xinfo('{}')with the raw table name predates this PR, but a table name containing'would break the query. Worth a separate issue.
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
table_xinforows withhidden = 1out of column metadata.hidden = 2andhidden = 3as generated metadata.Root Cause
PRAGMA table_xinfoincludes hidden virtual-table columns thattable_infodid not return. Those rows were mapped as normal writable columns and surfaced in the New Row modal.Fixes #622
Validation
git diff --checkcargo test test_get_columns_excludes_hidden_virtual_table_columns --lib -- --nocapturetimed out locally after 3 minutes during Rust execution/build.