Skip to content

Commit

Permalink
syntax fixes?
Browse files Browse the repository at this point in the history
  • Loading branch information
asg017 committed Aug 15, 2024
1 parent 0db9065 commit 17826c6
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions datasette/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ async def hidden_table_names(self):
OR substr(name, 1, 1) == '_'
),
fts_suffixes AS (
select column1 as suffix
from (VALUES ('_data'), ('_idx'), ('_docsize'), ('_content'))
SELECT column1 AS suffix
FROM (VALUES ('_data'), ('_idx'), ('_docsize'), ('_content'), ('_config'))
),
fts_names AS (
SELECT name
Expand All @@ -516,13 +516,17 @@ async def hidden_table_names(self):
),
fts_shadow_tables AS (
SELECT
printf('%s%s', fts_tables.name, fts_suffixes.suffix) AS name
printf('%s%s', fts_names.name, fts_suffixes.suffix) AS name
FROM fts_names
JOIN fts_suffixes
),
final AS (
SELECT name FROM base
UNION ALL
SELECT name FROM fts_shadow_tables
)
SELECT name FROM base
UNION ALL
SELECT name FROM fts_shadow_tables
SELECT name FROM final ORDER BY 1
"""
)
]
Expand Down

0 comments on commit 17826c6

Please sign in to comment.