emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 733cb9614c 14/17: * lisp/ob-sqlite.el: Add support


From: ELPA Syncer
Subject: [elpa] externals/org 733cb9614c 14/17: * lisp/ob-sqlite.el: Add support for :prologue/:epilogue parameters
Date: Thu, 19 Oct 2023 06:58:52 -0400 (EDT)

branch: externals/org
commit 733cb9614cee1e4315e6ee035762f41797ab61bd
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    * lisp/ob-sqlite.el: Add support for :prologue/:epilogue parameters
    
    (org-babel-expand-body:sqlite):
---
 lisp/ob-sqlite.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el
index 7510e5158c..07a4326a2a 100644
--- a/lisp/ob-sqlite.el
+++ b/lisp/ob-sqlite.el
@@ -57,8 +57,15 @@
 
 (defun org-babel-expand-body:sqlite (body params)
   "Expand BODY according to the values of PARAMS."
-  (org-babel-sql-expand-vars
-   body (org-babel--get-vars params) t))
+  (let ((prologue (cdr (assq :prologue params)))
+       (epilogue (cdr (assq :epilogue params))))
+    (mapconcat 'identity
+               (list
+                prologue
+                (org-babel-sql-expand-vars
+                 body (org-babel--get-vars params) t)
+                epilogue)
+               "\n")))
 
 (defvar org-babel-sqlite3-command "sqlite3")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]