Re: TIP#308: Last serial column value generated




Donal K. Fellows wrote:
Darren New wrote:
I would think that async queries are likely to be the only part that *really* needs to be in the core. Given how many DB APIs are already out there as loadable modules, I can't imagine what core change you'd need, other than a new channel type if you wanted asynchronous non-blocking database queries. (And I'd still like to see *that* happen!)

Out of scope. Seriously. :-)

Donal.

Async DB queries are a fairly common requirement. I'd like to
improve our application so long-running SQL queries don't tie up
the GUI, and so we could provide a cancel button in some places.

I maintain fbsql, a MySQL TCL extension. My brother wrote it in 2000.
The library is used extensively in our own application (there's about
4600 SQL queries/operations, spread through 180,000 lines of TCL) so
naturally I'm not about to break compatibility, without good reason.

I do intend to add support for async queries when I get the time.
If the TDBC defined an async API I would probably follow it's design.

The fbsql extension is in the public domain. It's MySQL-specific
and likely to remain so. I imagine an implementation of TDBC would be
largely pure TCL, built on top of database-specific C extensions like
fbsql.

Glad to hear row-results as lists will be in TDBC. Generally speaking
the fbsql API takes a pragmatic approach; regular TCL substitution,
lists, default values for NULLs. Prepared statements are a solution
to a problem we don't have (insertion attack) and I like the convenience
of normal TCL substitution, for layering the database-aware code.

Russell
.



Relevant Pages

  • Re: TIP #185: Null Handling
    ... reconstructed from its string representation. ... this is how Tcl works. ... Tcl database API ought to work. ... extension, it would be a good idea for the Core to provide ...
    (comp.lang.tcl)
  • Curious: my C extension crashes in 8.5, is stable in 8.4...
    ... I have a C extension that is stubs-enabled, and uses only the public C api of Tcl. ... I am suspecting the custom tcl object types I create, but again sticking to the public api should not be a problem. ... I will try to debug the crash, but any info about changes in object types that can affect custom object types is welcomed. ...
    (comp.lang.tcl)
  • Re: How to access a channel from C when it is created in script?
    ... I am new to the C/C++ API of Tcl. ... Is there any way for a C extension ... extension code know about "file5". ...
    (comp.lang.tcl)
  • Dr. Dobbs Tcl-URL! - weekly Tcl news and links (Jan 5)
    ... "I will not mix string and list commands in TCL" ... API extension provides access to functions in the Windows API from ... The extension targets the Windows NT ... Tcl allows you to build your own control structures, well, here are ...
    (comp.lang.tcl)
  • Re: Goodbye TCL
    ... anyone that likes TCL and TK and wants to see ... support for the language increase rather then decrease and usage increase ... Unfortunately it is not the TCL core, it comes with restrictions, anf it ... "distribution of record" for what clearly many users want - an extension ...
    (comp.lang.tcl)