unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenneth Raeburn <raeburn@raeburn.org>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: emacs-devel@gnu.org
Subject: Re: SQLite interface
Date: Sat, 15 Mar 2014 02:53:04 -0400	[thread overview]
Message-ID: <1B24FFF2-0973-4814-94EF-041B63E94B7B@raeburn.org> (raw)
In-Reply-To: <87pplp263o.fsf@mid.deneb.enyo.de>


On Mar 13, 2014, at 16:31, Florian Weimer <fw@deneb.enyo.de> wrote:

> * Ted Zlatanov:
> 
>> Given that any possible FFI interface is after the freeze and probably
>> will take months to get into a released Emacs, can you consider writing
>> this with a shell backend for now and use the C API opportunistically?
> 
> What does this mean?  Do you want me to write a stub for the SQLite
> API that runs as a subprocess and exposes that over some sort of RPC
> interface?

A Perl stub using DBI and DBD::SQLite, with communication in JSON or YAML or some such (or s-expressions, if Perl module Data::SExpression is fully Emacs compatible even for untrusted and binary or multibyte-text data), may not be all that much work.

>> I don't know the details about SQLite's accessibility, but I believe it
>> can do at least some useful things non-interactively over STDOUT/STDIN.
> 
> Oh, you want me to use the existing sqlite3 command line client?
> That's a non-starter.  It is not binary-transparent, and it does not
> separated support query parameters.  My planned use case (Gnus)
> handles untrusted data received over the network, so this approach
> does not seem such a good idea to me.

I suppose using SELECT QUOTE(CAST (column AS BLOB)) ... and INSERT ... CAST(X'010203' AS TEXT), passing values as hexadecimal, would be horribly intrusive when writing the queries and processing the results, but is there more than that needed to use the command line client?

Ken


  reply	other threads:[~2014-03-15  6:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 10:08 SQLite interface Florian Weimer
2014-03-13 10:26 ` joakim
2014-03-13 10:29   ` Florian Weimer
2014-03-13 13:54     ` joakim
2014-03-13 13:20 ` Stefan Monnier
2014-03-13 13:31   ` David Kastrup
2014-03-13 14:25     ` Stefan Monnier
2014-03-13 17:26 ` Ted Zlatanov
2014-03-13 20:31   ` Florian Weimer
2014-03-15  6:53     ` Kenneth Raeburn [this message]
2014-03-15 15:00       ` Florian Weimer
2014-03-15 17:23         ` Ted Zlatanov
2014-03-15 12:26     ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1B24FFF2-0973-4814-94EF-041B63E94B7B@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=emacs-devel@gnu.org \
    --cc=fw@deneb.enyo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).