From 38d53728f98c66f2608f4a899e9defa28b5d9077 Mon Sep 17 00:00:00 2001 From: unwox Date: Mon, 23 Dec 2024 22:37:30 +0600 Subject: futureproof products insertion when fetching --- bin/fetch.fnl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/fetch.fnl') 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) -- cgit v1.2.3