[Dbix-class] Re : Explicit ASTs (ping nate)

Robert 'phaylon' Sedlacek phaylon at dunkelheit.at
Tue Sep 5 17:26:01 CEST 2006


Dami Laurent (PJ) said:

> An explicit AST is interesting if we want to perform operations on the
> tree ... but if the only operation is to generate SQL, I don't really
> see the point : chunks of strings should be good enough, passed
> directly from the DWIM API to the SQL layer. For example,
> we can already pass a string "COUNT(DISTINCT foo) AS n_foo" to
> SQL::Abstract, and get back rows with a $row->{n_foo} value : what
> more could be done if we had a more structured syntax tree ?

Transformation of the tree. "Transparent" subqueries by aliasing
conflicting identifiers, automagically fully qualifying column names when
joining and backend-specific optimizations are the first things that cross
my mind :)

-- 
Robert 'phaylon' Sedlacek
Perl Software Developer




More information about the Dbix-class mailing list