From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: [BUG] ob-sqlite.el, -init doesn't work with some options Date: Tue, 09 Nov 2010 13:29:27 -0700 Message-ID: <87eiaujl5k.fsf@gmail.com> References: <87zktigv3t.fsf@dasa3.iem.pw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=53529 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFuow-0001UP-UG for emacs-orgmode@gnu.org; Tue, 09 Nov 2010 15:29:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFuov-0006Js-N6 for emacs-orgmode@gnu.org; Tue, 09 Nov 2010 15:29:34 -0500 Received: from mail-yx0-f169.google.com ([209.85.213.169]:50258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFuov-0006Jb-Kr for emacs-orgmode@gnu.org; Tue, 09 Nov 2010 15:29:33 -0500 Received: by yxm8 with SMTP id 8so298727yxm.0 for ; Tue, 09 Nov 2010 12:29:32 -0800 (PST) In-Reply-To: <87zktigv3t.fsf@dasa3.iem.pw.edu.pl> (=?utf-8?Q?=22=C5=81ukas?= =?utf-8?Q?z?= Stelmach"'s message of "Tue, 09 Nov 2010 20:22:46 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?utf-8?Q?=C5=81ukasz?= Stelmach Cc: emacs-orgmode@gnu.org Hi =C5=81ukasz, 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 =3Dcat=3D'ing the body of the code block through a pipe to the sqlite command (which would probably only work on unix systems). Thanks -- Eric =C5=81ukasz Stelmach 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