Skip to content

Include generated columns in pks_and_rows_where results - #968

Open
yushuosun wants to merge 1 commit into
simonw:mainfrom
yushuosun:fix/include-generated-columns-with-pks
Open

yushuosun wants to merge 1 commit into
simonw:mainfrom
yushuosun:fix/include-generated-columns-with-pks

Conversation

@yushuosun

@yushuosun yushuosun commented Nov 29, 2026 •

Copy link
Copy Markdown

Reading a table with a generated column via pks_and_rows_where() omitted that column, even though rows_where() returned it. The former built its projection from PRAGMA table_info, which omits generated columns as discussed in #411.

Use SQLite's wildcard row projection and continue selecting rowid explicitly for tables without a declared primary key. The test reads a computed score and checks the returned key and row.

Windows, Python 3.12. The new test failed before the fix. Afterward, python -m pytest tests/test_rows.py -q and the same command with --sqlite-autocommit each passed all 23 tests. Full suite in UTF-8 mode: 1,497 passed, 17 skipped. The initial run using the Windows default encoding encountered documentation fixture decoding errors.


📚 Documentation preview 📚: https://sqlite-utils--968.org.readthedocs.build/en/968/

Copilot AI balanced review requested due to automatic review settings November 29, 2026 12:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants