Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't hide virtual table, hide shadow tables. #2391

Merged
merged 8 commits into from
Aug 15, 2024

Conversation

asg017
Copy link
Collaborator

@asg017 asg017 commented Aug 14, 2024

Closes #2296

  • Hide shadow tables by default
  • Do NOT hide FTS5 virtual tables (but hide their shadow tables)

This will likely fail the SQLite 3.25 test


📚 Documentation preview 📚: https://datasette--2391.org.readthedocs.build/en/2391/

@simonw
Copy link
Owner

simonw commented Aug 15, 2024

Let's mark the test that's going to fail in the older SQLite version as @pytest.mark.skipif - the failure just means that in old versions of SQLite there will be some visible tables that would have been hidden in newer versions, which is fine.

@simonw simonw mentioned this pull request Aug 15, 2024
3 tasks
@asg017
Copy link
Collaborator Author

asg017 commented Aug 15, 2024

@simonw ready for review!

It wasnt' as easy as skipping the test for SQLite 3.37 - since other tests break because of this change (ie table lists that sort by name + hidden status), I couldnt skip all those other non-related tests. So I added some logic that manually adds in FTS3 + FTS4 + FTS5 shadow tables by hard-coded their suffixes. The SQL is a bit nasty, happy to edit that if needed

@simonw simonw marked this pull request as ready for review August 15, 2024 20:17
@simonw
Copy link
Owner

simonw commented Aug 15, 2024

This looks great!

@simonw simonw merged commit 6d91d08 into simonw:main Aug 15, 2024
18 of 19 checks passed
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.

Automatically hide type=shadow tables in SQLite 3.37 or higher
2 participants