feat: add FTS5 search

This commit is contained in:
strsv committed 2026-11-06 08:01:39 +03:00
1 parent c441d770e2
commit f1624cfde2
17 files changed
+232 -26

No files matched your search

+9
View File
@@ -123,6 +123,11 @@ class ImportSteamTests(unittest.TestCase):
self.assertEqual(meta["steam_root"], self.root)
self.assertIn("imported_at", meta)
self.assertEqual(con.execute("SELECT COUNT(*) FROM game_fts").fetchone()[0], 2)
hits = [r[0] for r in con.execute(
"SELECT appid FROM game_fts WHERE game_fts MATCH 'alpha*'")]
self.assertEqual(hits, [100])
def test_incremental_keeps_metadata_and_preserves_personal(self):
con = self._run({100: game_info("Old Name", review=80)})
con.execute(
@@ -157,6 +162,10 @@ class ImportSteamTests(unittest.TestCase):
self.assertEqual(self._game(con, 300)["name"], "Gamma")
self.assertEqual(self._personal(con, 300)["status"], "backlog")
self.assertEqual(con.execute("SELECT COUNT(*) FROM game_fts").fetchone()[0], 2)
hits = [r[0] for r in con.execute(
"SELECT appid FROM game_fts WHERE game_fts MATCH 'gamma*'")]
self.assertEqual(hits, [300])
def test_full_import_preserves_personal_attributes_and_translations(self):
con = self._run({100: game_info("Initial", review=80)})