Re: TDBC documentation, examples, syntax?
- From: dkf <donal.k.fellows@xxxxxxxxx>
- Date: Mon, 16 Mar 2009 02:37:41 -0700 (PDT)
On 16 Mar, 04:52, "tom.rmadilo" <tom.rmad...@xxxxxxxxx> wrote:
Unfortunately the TDBC API, being a single level API, changes for
every driver and provides no opportunity for abstraction.
Maybe it isn't important for you to be able to reuse the same code
regardless of datasource. The API which I propose is similar to a
procedural API, the internal details are opaque, the interface remains
fixed.
That was actually a non-goal, or perhaps even an anti-goal. TDBC aims
to expose the underlying database's interpretation of SQL, for better
or for worse, because this at least does not prevent anyone from using
that database. Making all databases work the same... even with that
ISO spec mentioned earlier in this thread, it's not happening in a
hurry. (Most of the time when I have seen such attempts, they've
tended to work by doing "select * from table" and then manipulating
everything on the client side; not a very scalable approach!) Indeed,
during the planning stage for TDBC we solicited for input from
database extension authors and their strong feedback was that
retaining DB-specific quirks was desirable.
To put it another way, TDBC is about improving how Tcl interfaces with
databases so that at least some of the hard work for users is removed.
In particular, it's about spreading best-practices from one DB-
interface extension to the rest. It doesn't address how that maps to
the CLI precisely to permit the use of database-specific efficient
interfaces behind the scenes. (For example, it does not mandate the
use of prepared statements precisely because not all databases support
them - alas - but they are an extremely good implementation choice;
where not supported, the driver instead has to do *correct* quoting
internally. Users should not see the difference either way.) Efficient
back-end interface usage is encouraged; there probably needs to be a
wiki page or article written on this now that some experience has been
gained.
Donal (in any project, specially a big one, have non-goals as well as
goals).
.
- Follow-Ups:
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- References:
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: dkf
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: Neil Madden
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: Neil Madden
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: Neil Madden
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: Neil Madden
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- Prev by Date: Re: tkwait question
- Next by Date: Re: memory leak in md5::md5?
- Previous by thread: Re: TDBC documentation, examples, syntax?
- Next by thread: Re: TDBC documentation, examples, syntax?
- Index(es):
Relevant Pages
|