diff options
| author | unwox <me@unwox.com> | 2024-12-23 22:37:30 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2024-12-23 22:37:30 +0600 |
| commit | 38d53728f98c66f2608f4a899e9defa28b5d9077 (patch) | |
| tree | a9c24bf56aefb4f6523adb6bb0a83aed282a1646 /bin | |
| parent | 768e3e38ea11becee0d6b2496b66d03953ee53a8 (diff) | |
futureproof products insertion when fetching
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/fetch.fnl | 4 |
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) |
