summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-04-15 23:21:56 -0600
committerEric Schulte <schulte.eric@gmail.com>2010-04-23 10:09:59 -0600
commit0734bf96ba24c44be088bfdbb7f04c5fd80e0588 (patch)
treeea92c9b1b0ef4a6e96a1df38512d9ae4156f2110
parent1fdc012e3d50279c469acfc3b1851147f11449ee (diff)
downloadorg-mode-0734bf96ba24c44be088bfdbb7f04c5fd80e0588.tar.gz
org-babel-expand-body:sql
-rw-r--r--contrib/babel/lisp/langs/org-babel-sql.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/contrib/babel/lisp/langs/org-babel-sql.el b/contrib/babel/lisp/langs/org-babel-sql.el
index da746f2..b995e48 100644
--- a/contrib/babel/lisp/langs/org-babel-sql.el
+++ b/contrib/babel/lisp/langs/org-babel-sql.el
@@ -51,6 +51,8 @@
(add-to-list 'org-babel-tangle-langs '("sql" "sql"))
+(defun org-babel-expand-body:sql (body params &optional processed-params) body)
+
(defun org-babel-execute:sql (body params)
"Execute a block of Sql code with org-babel. This function is
called by `org-babel-execute-src-block'."
@@ -65,7 +67,8 @@ called by `org-babel-execute-src-block'."
('mysql (format "mysql %s -e \"source %s\" > %s"
(or cmdline "") in-file out-file))
(t (error "no support for the %s sql engine")))))
- (with-temp-file in-file (insert body))
+ (with-temp-file in-file
+ (insert (org-babel-expand-body:sql body params)))
(message command)
(shell-command command)
(with-temp-buffer