On Fri, 1 Mar 2002, Ken Williams wrote:
> A question, though - does this mean you've got some sort of
> dialect-independent representation of SQL queries? That's kind of
> interesting. Might it be possible to open that interface up, so that
> people could write some sort of neutral-SQL and send it to whatever
> database they feel like that day?
Alzabo actually has something like that.
Internally it has an object that you can use like this:
$sql->select( columns / functions / constants /etc )->from( tables )->
where( conditions )->order_by( yadda yadda )
There are subclasses for each of the backends Alzabo supports (Mysql and
Pg right now) that step in and override a few (very few) methods to
implement backend-specific bits like outer join handling, Mysql fulltext
indexing functions, limits, etc.
-dave
/*==================
www.urth.org
we await the New Sun
==================*/