commit 7926632c14baef43cb39b38c804618a35d736771 parent 3fc427157e3fd3e64bcea2aebb950061370505b7 Author: Natasha Kerensikova <natgh@instinctive.eu> Date: Fri, 9 Feb 2024 20:02:16 +0000 Helper function to format custom SQL query Diffstat:
M | src/iens.scm | | | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/iens.scm b/src/iens.scm @@ -858,6 +858,12 @@ (load filename) (set! arg-replay old-arg-replay))) +(define (write-query text) + (query (for-each-row (lambda (row) (if (= 1 (length row)) + (write-line (->string (car row))) + (begin (write row) (newline))))) + (sql/transient db text))) + (defcmd (help) "" "Display this help" (for-each