emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: Finally figuring out some ob-sqlite stuff -- for worg?
@ 2019-11-09 17:38 Thomas S. Dye
  2019-11-09 17:43 ` Fwd: " Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2019-11-09 17:38 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-org list


> Okay, it's up. If anyone wants to explain to me the point of the 
> "where
> exists" clause in the SQL, I would be interested to hear. It 
> works as
> expected this way, but is that clause necessary?

The 'if exists' clause protects against an SQLite error raised if 
you ask to delete a table that doesn't exist.  The code will work 
without it if the table exists, but will exit without creating the 
table if not.

Thanks for a useful addition to the Org babel SQLite 
documentation.  I agree with you that Org mode tables are a 
convenient way to enter SQL data, keeping in mind that table 
columns can't be rearranged without changes to the SQL code.

All the best,
Tom

--
Thomas S. Dye
http://tsdye.online/tsdye

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Fwd: Re: Finally figuring out some ob-sqlite stuff -- for worg?
  2019-11-09 17:38 Finally figuring out some ob-sqlite stuff -- for worg? Thomas S. Dye
@ 2019-11-09 17:43 ` Thomas S. Dye
  2019-11-09 18:00   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2019-11-09 17:43 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-org list

Cancel that, I was looking at a cached version of the page.

Thanks again for the documentation.

All the best,
Tom

Thomas S. Dye writes:

>> Okay, it's up. If anyone wants to explain to me the point of 
>> the
>> "where
>> exists" clause in the SQL, I would be interested to hear. It
>> works as
>> expected this way, but is that clause necessary?
>
> The 'if exists' clause protects against an SQLite error raised 
> if
> you ask to delete a table that doesn't exist.  The code will 
> work
> without it if the table exists, but will exit without creating 
> the
> table if not.
>
> Thanks for a useful addition to the Org babel SQLite
> documentation.  I agree with you that Org mode tables are a
> convenient way to enter SQL data, keeping in mind that table
> columns can't be rearranged without changes to the SQL code.
>
> All the best,
> Tom


--
Thomas S. Dye
http://tsdye.online/tsdye

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fwd: Re: Finally figuring out some ob-sqlite stuff -- for worg?
  2019-11-09 17:43 ` Fwd: " Thomas S. Dye
@ 2019-11-09 18:00   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2019-11-09 18:00 UTC (permalink / raw)
  To: emacs-orgmode

"Thomas S. Dye" <tsd@tsdye.online> writes:

> Cancel that, I was looking at a cached version of the page.

I guessed that was what happened :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-09 18:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-09 17:38 Finally figuring out some ob-sqlite stuff -- for worg? Thomas S. Dye
2019-11-09 17:43 ` Fwd: " Thomas S. Dye
2019-11-09 18:00   ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).