summaryrefslogtreecommitdiff
path: root/bin/fetch.fnl
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2024-12-23 22:37:30 +0600
committerunwox <me@unwox.com>2024-12-23 22:37:30 +0600
commit38d53728f98c66f2608f4a899e9defa28b5d9077 (patch)
treea9c24bf56aefb4f6523adb6bb0a83aed282a1646 /bin/fetch.fnl
parent768e3e38ea11becee0d6b2496b66d03953ee53a8 (diff)
futureproof products insertion when fetching
Diffstat (limited to 'bin/fetch.fnl')
-rw-r--r--bin/fetch.fnl4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/fetch.fnl b/bin/fetch.fnl
index c23019f..53a8f7a 100644
--- a/bin/fetch.fnl
+++ b/bin/fetch.fnl
@@ -101,7 +101,9 @@
(fn store-products [tx products]
(when (< 0 (# products))
(local sql
- (.. "INSERT OR REPLACE INTO products VALUES "
+ (.. "INSERT OR REPLACE INTO products"
+ "(url, site, title, description, year, image, price, weight, volume, price_per, archived, creation_time)"
+ " VALUES "
(array.join
(map (fn [_ _] "(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")
products)