This commit is contained in:
Timothy Jaeryang Baek committed 2026-08-30 12:09:34 -04:00
1 parent 6fa50a6558
commit 26f37426b7
3 files changed
+30 -5

No files matched your search

+2 -1
View File
@@ -334,8 +334,9 @@ class PromptsTable:
tag_lower = tag.lower()
if dialect_name == 'sqlite':
tag_lower = tag.replace('\\', '\\\\').replace('%', '\\%').replace('_', '\\_')
tag_clause = text(
'EXISTS (SELECT 1 FROM json_each(prompt.tags) t WHERE LOWER(t.value) = :tag_val)'
"EXISTS (SELECT 1 FROM json_each(prompt.tags) t WHERE t.value LIKE :tag_val ESCAPE '\\')"
)
elif dialect_name == 'postgresql':
tag_clause = text(