Browse Source

org-babel-expand-body:sql

Eric Schulte 15 years ago
parent
commit
0734bf96ba
1 changed files with 4 additions and 1 deletions
  1. 4 1
      contrib/babel/lisp/langs/org-babel-sql.el

+ 4 - 1
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