unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Using a command-line program (sqlite3) as a backend
@ 2009-03-24 21:18 florian
  2009-03-24 21:38 ` Chetan
  2009-03-25  1:03 ` Glenn Morris
  0 siblings, 2 replies; 12+ messages in thread
From: florian @ 2009-03-24 21:18 UTC (permalink / raw)
  To: help-gnu-emacs

It seems to me I have a rather basic question:

I would like to use an SQLite database, and be able to query and
modify it from Elisp functions. It seems that nobody has written Elisp
bindings for the SQLite library yet, and I am definitely not smart
enough to do that myself.

So I gather I will have to use SQLite's command-line interface,
sqlite3. I don't see much of a problem in parsing the output (in fact,
I've already written that), but I am wondering about the differences
between running sqlite3 as a synchronous process for every query (in a
one-shot fashion), and starting it up once, as an asynchronous
process, and then having it linger in the background, sending it
commands and parsing the output it returns as needed.

To me, the synchronous method seems more robust, but I am wondering
whether it will scale well (supposing I get fond of using the database
and start to use it for more and more complex things). As to the
asynchronous method, I seem to have heard that I/O via stdin and
stdout is prone to, er, I don't know: hang? lock? I've forgotten, but
I would much appreciate to be warned if that is the case.

(I have tried to find hints in ispell.el (since that seems to be a
similar situation), but only found out that it implements indeed
both.)

Can anybody offer me any advice here? Thanks so much!

Florian


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Using a command-line program (sqlite3) as a backend
@ 2009-03-26 23:25 Xavier Maillard
  0 siblings, 0 replies; 12+ messages in thread
From: Xavier Maillard @ 2009-03-26 23:25 UTC (permalink / raw)
  To: florian; +Cc: help-gnu-emacs


   Nevertheless, I tested the (sql-sqlite ..) function, and it does not
   seem like a function that has actually ever been tested: it asks for a
   user name, password, and server, none of which makes sense with SQLite
   (or, as I suspect, has ever made sense with it). And it does complain
   and die: "sqlite3.exe: unknown option: -user=florian". That leaves me
   a little suspicious about whether sql.el can serve as a model, let
   alone library,  for what I want to do. But I'm open to be taught
   otherwise, of course ...

That has been fixed in CVS.

	Xavier
-- 
http://www.gnu.org
http://www.april.org
http://www.lolica.org




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

end of thread, other threads:[~2009-03-29  6:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-24 21:18 Using a command-line program (sqlite3) as a backend florian
2009-03-24 21:38 ` Chetan
2009-03-25 22:53   ` florian
2009-03-25 23:03     ` Chetan
2009-03-25 23:16       ` florian
2009-03-26  6:00         ` Harald Hanche-Olsen
2009-03-25  1:03 ` Glenn Morris
2009-03-25 23:11   ` florian
2009-03-25 23:28     ` Glenn Morris
2009-03-28 13:17       ` Using a command-line program (sqlite3) as a backend:observations with start-process florian
2009-03-29  6:19         ` rustom
  -- strict thread matches above, loose matches on Subject: below --
2009-03-26 23:25 Using a command-line program (sqlite3) as a backend Xavier Maillard

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).