[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] [BUG] ob-sqlite.el, -init doesn't work with some options
From: |
Eric Schulte |
Subject: |
Re: [Orgmode] [BUG] ob-sqlite.el, -init doesn't work with some options |
Date: |
Tue, 09 Nov 2010 13:29:27 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
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 <address@hidden> 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