[Dbix-class] Explicit ASTs (ping nate)
Ash Berlin
ash at cpan.org
Sat Sep 2 23:21:57 CEST 2006
Matt S Trout wrote:
> SELECT my.a, my.b FROM my_table my WHERE spork = 1
>
> and that would become
>
> {
> select => [ [ -name, 'my', 'a' ], [ -name, 'my', 'b' ] ],
> from => [ [ -alias, 'my_table', 'my' ] ],
> where => [ [ -op, '=', [ -name, 'spork' ], [ -bind, 1 ] ] ],
> }
>
> which is ... spectacularly ugly, but I -think- explicit enough.
[snip]
No kidding thats ugly. Would there be shortcuts for common operations
(maybe just in DBIC, not SQL::A itself) such as just `select these
cols'? such as:
{ select => [qw/a b/], ... }
Ash
More information about the Dbix-class
mailing list