summaryrefslogtreecommitdiff
path: root/bin/serve.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/serve.fnl')
-rw-r--r--bin/serve.fnl3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/serve.fnl b/bin/serve.fnl
index 98e0aac..82759b8 100644
--- a/bin/serve.fnl
+++ b/bin/serve.fnl
@@ -139,6 +139,7 @@
price_per AS \"price-per\",
year
FROM products
+ WHERE archived = false
ORDER BY ROW_NUMBER() over (PARTITION BY site ORDER BY ROWID)
LIMIT ?"
[limit])))
@@ -201,6 +202,7 @@
INNER JOIN products ON search.fid = products.url
LEFT JOIN product_tags ON product_tags.product = search.fid
WHERE search.`table` = 'products'
+ AND products.archived = false
%s" where-sql)
where-vars)))
@@ -224,6 +226,7 @@
INNER JOIN products ON search.fid = products.url
LEFT JOIN product_tags ON product_tags.product = products.url
WHERE search.`table` = 'products'
+ AND products.archived = false
%s
ORDER BY ROW_NUMBER() over (PARTITION BY products.site ORDER BY products.ROWID),
rank