Re: TDBC documentation, examples, syntax?



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



Relevant Pages

  • Re: wpa supplicant/ipw3945, ESSID last char missing
    ... driver interface have to be tied to the userspacewireless ... If the driver does X ... The issue is that the userspace API ...
    (Linux-Kernel)
  • Re: Question on EXPORT_DRIVER
    ... DLL and calls the correspondig API. ... that the interface can be handled correctly. ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ...
    (microsoft.public.development.device.drivers)
  • Re: Question on EXPORT_DRIVER
    ... interface can be handled correctly. ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... > I want to support something like an API library in the kernel for my ... > provide the same interfaces in Kernel, I either need to have another DLL ...
    (microsoft.public.development.device.drivers)
  • Re: Question on EXPORT_DRIVER
    ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... uses this DLL and calls the correspondig API. ... that the interface can be handled correctly. ... I want to support something like an API library in the kernel for my ...
    (microsoft.public.development.device.drivers)
  • Re: simple web programming options
    ... And that I have seen from CGI/FCGI, Java ... PHP seems to provide the best API of ready-to-use ... doing CGIs specifically and scripted access to databases. ... I recommend PHP highest for language. ...
    (comp.programming)