commit 3dfe3660b15a829c6722cacd7db21baa5ea3f9a1
parent e7fe0e9ff2d64db3484f08aaa94586cad51f4b7e
Author: Metalympiáda <metalmypiada@matfyz.cz>
Date: Mon, 24 Oct 2022 10:24:33 +0000
Support older versions of sqlite
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/db.scm b/db.scm
@@ -81,10 +81,10 @@
(catch 'sqlite-error
(lambda ()
(let* ((stmt-text (string-append (fold (lambda (i so-far)
- (string-append so-far ",(?,?,?,?)"))
+ (string-append so-far ", (?,?,?,?)"))
"insert into answers (name, round, problem, content) values(?,?,?,?)"
(iota (- (length answers) 1)))
- " on conflict do update set content=excluded.content"))
+ " on conflict (name, round, problem) do update set content=excluded.content"))
(stmt (sqlite-prepare db stmt-text)))
(for-each (lambda (a i) (begin (sqlite-bind stmt (+ (* i 4) 1) user)
(sqlite-bind stmt (+ (* i 4) 2) round)