Standard DBI Proposal (was: Re: Standard Database Interface?)
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxx>
- Date: Tue, 23 Oct 2007 13:33:23 -0000
Sean Woods wrote:
There are a couple of "flexibities" that sqlite has that other
db interfaces cannot share by virtue of the fact it lives in the
same memory as the interpreter. This is not insurmountable, but
I'm thinking operations like evaluating a result to a script would
require a bit of caching by the interpreter.
That's pretty easy to work around. Just keep a per-connection array
that maps from the SQL string to whatever kind of compiled form you
want. As long as people are using SQL in the form of some type of
prepared statement (which I'd say MUST be supported) then it's pretty
simple to do. That also gives you a spot to hang off any complex
information (like whether this statement returns a value or not, for
DBs that care). At the script level, the differences must be
concealed. The way in which the back-ends achieve this, well, that's a
great topic for ingenuity... :-)
So, choosing what actually should be in there as methods...
$conn close
$conn complete
$conn eval
$conn exists
$conn transaction
$conn version
All with the SQLite semantics (modulo how they treat column types, of
course). This is a subset of the SQLite set, and should be all the
bits that are needed for most DB work (plus a few things that make
life a little easier).
Comments?
Donal.
.
- Follow-Ups:
- Re: Standard DBI Proposal (was: Re: Standard Database Interface?)
- From: Sean Woods
- Re: Standard DBI Proposal (was: Re: Standard Database Interface?)
- References:
- Standard Database Interface?
- From: tcltkdev
- Re: Standard Database Interface?
- From: Sean Woods
- Re: Standard Database Interface?
- From: tcltkdev
- Re: Standard Database Interface?
- From: Sean Woods
- Re: Standard Database Interface?
- From: thelfter@xxxxxxxxx
- Re: Standard Database Interface?
- From: Sean Woods
- Standard Database Interface?
- Prev by Date: Re: why upvar is a sledgehammer
- Next by Date: Re: Format Text File
- Previous by thread: Re: Standard Database Interface?
- Next by thread: Re: Standard DBI Proposal (was: Re: Standard Database Interface?)
- Index(es):