[Orgmode] [BUG] ob-sqlite.el, -init doesn't work with some options
Hello. ob-sqlite.el uses -init option to provide sqlite with a src block content, however, this prevetns sevarl options' from taking an effect. Particularly -header (and it's opposite), -csv and -header Create a database, put a SELECT into a file and compare the effects of the following commands sqlite3 -init file.sql -header -separator ';' -csv db.sqlite cat file.sql | sqlite3 -header -separator ';' -csv db.sqlite A walkaround is to place desired configration commands (the onse beginning with a dot in sqlite) in the src block, e.g: #+BEGIN_SRC sqlite :db passwords.sqlite :results replace .separator | .mode csv select * from myusers; #+END_SRC -- Miłego dnia, Łukasz Stelmach ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] [BUG] ob-sqlite.el, -init doesn't work with some options
Hi Łukasz, Thanks for mentioning this issue and for posting a workaround. Would you suggest a different method of passing the body of a sqlite code block to the sqlite command? The only other options which immediately occurs to me would involve =cat='ing the body of the code block through a pipe to the sqlite command (which would probably only work on unix systems). Thanks -- Eric Łukasz Stelmach lukasz.stelm...@iem.pw.edu.pl writes: Hello. ob-sqlite.el uses -init option to provide sqlite with a src block content, however, this prevetns sevarl options' from taking an effect. Particularly -header (and it's opposite), -csv and -header Create a database, put a SELECT into a file and compare the effects of the following commands sqlite3 -init file.sql -header -separator ';' -csv db.sqlite cat file.sql | sqlite3 -header -separator ';' -csv db.sqlite A walkaround is to place desired configration commands (the onse beginning with a dot in sqlite) in the src block, e.g: #+BEGIN_SRC sqlite :db passwords.sqlite :results replace .separator | .mode csv select * from myusers; #+END_SRC ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode