My intention is to focus on supporting high-performance in Berkeley DB and any native-lisp backends, but not to focus on doing stored procedures for the SQL backend. (Although that would be a nice enhancement project for the SQL backend, at least for the SQL calls that emulate the BDB semantics on top of relational tables).
So my thinking is this. A query compiler will compile a constraint expression into a closure if it is in a compiled code block, much like cl-ppcre handles compiling regex's. That closure will contain a fully compiled query execution code block, based on the computed query plan.
(map-query fn '(query ...)) ==> (apply query-closure fn free-params)A query closure is a mapping function. You can also generate query closures and pass them around as first class objects, but you'll have to keep track of the order of any arguments that bind to free parameters. I'm still working out these kinds of details. The interpreter has to be completed and validated first.
Ian On Apr 3, 2007, at 8:41 AM, Pierre THIERRY wrote:
Recently, a discussion started in the Torque project, an ODB for Java that also provides persistence, about the possible use of storedprocedures instead of building SQL requests, because for frequent cheapoperations, the overhead of parsing and executing SQL can be non-trivial.Do you think such DB-specific optimisations could make sense in Elephanttoo? Curiously, Pierre -- [EMAIL PROTECTED] OpenPGP 0xD9D50D8A _______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ elephant-devel site list elephant-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel