added popular sites module

This commit is contained in:
Fabian Freund
2026-06-29 08:55:43 +02:00
parent da7712bc80
commit a1ed66b392
24 changed files with 1441 additions and 5 deletions
@@ -0,0 +1,13 @@
CREATE TABLE sites (
domain TEXT NOT NULL PRIMARY KEY,
rank INTEGER NOT NULL
);
-- Prefix completion ordered by popularity. The caller escapes LIKE
-- metacharacters in the user input and appends '%', so `ESCAPE '\'` makes any
-- literal % / _ the user typed match literally instead of as wildcards.
searchSitesByPrefix:
SELECT * FROM sites
WHERE domain LIKE :pattern ESCAPE '\'
ORDER BY rank ASC
LIMIT :limit;