branch: master
commit 53fcecd25f3ab8dd1b394c4c75fa509fe51fd24d
Author: Ludovic Courtès <l...@gnu.org>
Date:   Thu Feb 8 11:46:29 2018 +0100

    database: Cache prepared statements.
    
    Suggested by Danny Milosavljevic.
    
    * src/cuirass/database.scm (sqlite-exec): Pass #:cache? to
    'sqlite-prepare'.
---
 src/cuirass/database.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cuirass/database.scm b/src/cuirass/database.scm
index c3310da..67a0d08 100644
--- a/src/cuirass/database.scm
+++ b/src/cuirass/database.scm
@@ -62,7 +62,7 @@ rows."
         (object->string arg)
         arg))
 
-  (let ((stmt (sqlite-prepare db sql)))
+  (let ((stmt (sqlite-prepare db sql #:cache? #t)))
     (for-each (lambda (arg index)
                 (sqlite-bind stmt index (normalize arg)))
               args (iota (length args) 1))

Reply via email to