Browse Source

specify "," as default sqlite output seperator

* lisp/ob-sqlite.el (org-babel-execute:sqlite): Specify the use of ","
  as the separator to `org-table-convert-region'.  Fixes errors when
  only one result per line of output.
Eric Schulte 7 years ago
parent
commit
60176c84e5
1 changed files with 8 additions and 1 deletions
  1. 8 1
      lisp/ob-sqlite.el

+ 8 - 1
lisp/ob-sqlite.el

@@ -93,7 +93,14 @@ This function is called by `org-babel-execute-src-block'."
 	      (member "code" result-params)
 	      (equal (point-min) (point-max)))
 	  (buffer-string)
-	(org-table-convert-region (point-min) (point-max))
+	(org-table-convert-region (point-min) (point-max)
+				  (if (or (member :csv others)
+					  (member :column others)
+					  (member :line others)
+					  (member :list others)
+					  (member :html others) separator)
+				      nil
+				    '(4)))
 	(org-babel-sqlite-table-or-scalar
 	 (org-babel-sqlite-offset-colnames
 	  (org-table-to-lisp) headers-p))))))