>From 4e4636cba2d62066de64dbaa88bf23169a0ecfb5 Mon Sep 17 00:00:00 2001 From: Caleb Ristvedt Date: Sat, 3 Jun 2017 02:41:40 -0500 Subject: [PATCH 3/7] fixup! Implement prototype register-path in scheme --- guix/sql.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guix/sql.scm b/guix/sql.scm index 9e3815401..6d756c0a6 100644 --- a/guix/sql.scm +++ b/guix/sql.scm @@ -22,8 +22,8 @@ ;; Should I go from key->index here or try to change that in guile-sqlite3? (define-syntax sql-parameters - "Converts key-value pairs into sqlite bindings for a specific statement." (syntax-rules () + "Converts key-value pairs into sqlite bindings for a specific statement." ((sql-parameters statement (name1 val1) (name2 val2) (name3 val3) ...) (begin (sqlite-bind statement name1 val1) (sql-parameters statement (name2 val2) (name3 val3) ...))) @@ -43,10 +43,10 @@ ;; I get the feeling schemers have probably already got this "with" business ;; much more automated than this... (define-syntax with-sql-statement - "Automatically prepares statements and then finalizes statements once the + (syntax-rules () + "Automatically prepares statements and then finalizes statements once the scope of this macro is left. Also with built-in sqlite parameter binding via key-value pairs." - (syntax-rules () ((with-sql-statement db sql statement-var ((name1 val1) (name2 val2) ...) exps ...) @@ -68,8 +68,8 @@ key-value pairs." (sqlite-finalize statement-var))))))) (define-syntax with-sql-database - "Automatically closes the database once the scope of this macro is left." (syntax-rules () + "Automatically closes the database once the scope of this macro is left." ((with-sql-database location db-var exps ...) (let ((db-var (sqlite-open location))) (dynamic-wind noop -- 2.13.0