aboutsummaryrefslogtreecommitdiff
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorCaleb Ristvedt <caleb.ristvedt@cune.org>2020-06-01 19:21:43 -0500
committerCaleb Ristvedt <caleb.ristvedt@cune.org>2020-06-10 21:54:35 -0500
commit5d6e2255286e591def122ec2f4a3cbda497fea21 (patch)
tree96a55c989dc491168adb961de46252a038923076 /.dir-locals.el
parent3cd92a855e8f6768a4470cd5522749a39d5f9047 (diff)
downloadguix-5d6e2255286e591def122ec2f4a3cbda497fea21.tar
guix-5d6e2255286e591def122ec2f4a3cbda497fea21.tar.gz
database: rewrite query procedures in terms of with-statement.
Most of our queries would fail to finalize their statements properly if sqlite returned an error during their execution. This resolves that, and also makes them somewhat more concise as a side-effect. This also makes some small changes to improve certain queries where behavior was strange or overly verbose. * guix/store/database.scm (call-with-statement): new procedure. (with-statement): new macro. (last-insert-row-id, path-id, update-or-insert, add-references): rewrite to use with-statement. (update-or-insert): factor last-insert-row-id out of the end of both branches. (add-references): remove pointless last-insert-row-id call. * .dir-locals.el (with-statement): add indenting information.
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index dc8bc0e437..77c12f9411 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -89,6 +89,7 @@
(eval . (put 'with-database 'scheme-indent-function 2))
(eval . (put 'call-with-transaction 'scheme-indent-function 2))
+ (eval . (put 'with-statement 'scheme-indent-function 3))
(eval . (put 'call-with-container 'scheme-indent-function 1))
(eval . (put 'container-excursion 'scheme-indent-function 1))