Skip to content
Snippets Groups Projects
Commit 23d75284 authored by Christopher Baines's avatar Christopher Baines
Browse files

database: Remove redundant reset calls.

sqlite-prepare will reset cached statements before returning them, so these
sqlite-reset calls are redundant.

* src/cuirass/database.scm (db-get-builds-query-min, db-get-builds-query-max):
Remove sqlite-reset calls.
parent 068ad30a
No related branches found
No related tags found
No related merge requests found
...@@ -1290,7 +1290,6 @@ AND (:system IS NULL ...@@ -1290,7 +1290,6 @@ AND (:system IS NULL
(stmt (sqlite-prepare db stmt-text #:cache? #t))) (stmt (sqlite-prepare db stmt-text #:cache? #t)))
(apply sqlite-bind-arguments stmt (apply sqlite-bind-arguments stmt
(query->bind-arguments query)) (query->bind-arguments query))
(sqlite-reset stmt)
(let ((rows (sqlite-fold-right cons '() stmt))) (let ((rows (sqlite-fold-right cons '() stmt)))
(sqlite-reset stmt) (sqlite-reset stmt)
(and=> (expect-one-row rows) vector->list))))) (and=> (expect-one-row rows) vector->list)))))
...@@ -1311,7 +1310,6 @@ AND (:system IS NULL ...@@ -1311,7 +1310,6 @@ AND (:system IS NULL
(stmt (sqlite-prepare db stmt-text #:cache? #t))) (stmt (sqlite-prepare db stmt-text #:cache? #t)))
(apply sqlite-bind-arguments stmt (apply sqlite-bind-arguments stmt
(query->bind-arguments query)) (query->bind-arguments query))
(sqlite-reset stmt)
(let ((rows (sqlite-fold-right cons '() stmt))) (let ((rows (sqlite-fold-right cons '() stmt)))
(sqlite-reset stmt) (sqlite-reset stmt)
(and=> (expect-one-row rows) vector->list))))) (and=> (expect-one-row rows) vector->list)))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment