* lisp/ob-sqlite.el: Add support for :prologue/:epilogue parameters

(org-babel-expand-body:sqlite):
This commit is contained in:
Ihor Radchenko 2023-10-19 11:59:59 +03:00
parent ab4ec726e5
commit 733cb9614c
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 9 additions and 2 deletions

View File

@ -57,8 +57,15 @@
(defun org-babel-expand-body:sqlite (body params) (defun org-babel-expand-body:sqlite (body params)
"Expand BODY according to the values of PARAMS." "Expand BODY according to the values of PARAMS."
(let ((prologue (cdr (assq :prologue params)))
(epilogue (cdr (assq :epilogue params))))
(mapconcat 'identity
(list
prologue
(org-babel-sql-expand-vars (org-babel-sql-expand-vars
body (org-babel--get-vars params) t)) body (org-babel--get-vars params) t)
epilogue)
"\n")))
(defvar org-babel-sqlite3-command "sqlite3") (defvar org-babel-sqlite3-command "sqlite3")