in reply to RFC - A multi table SQL Builder

If I used your module I'd probably want this piece:

select => [ 'A.foo', 'E.bar', ],

to allow me to provide field aliases, like so:

select => [ 'A.foo', #normal { 'A.foo' => 'the_foo' }, #simple { 'E.bar' => { alias => 'the_e_bar' } }, #flexible ],

resulting in the following SQL:

SELECT A.foo, A.foo the_foo, E.bar the_e_bar

/J

Replies are listed 'Best First'.
Re^2: RFC - A multi table SQL Builder
by dragonchild (Archbishop) on Oct 18, 2004 at 12:36 UTC
    You could do that right now by doing:
    select => [ 'A.foo AS foo', 'E.bar AS bar', ],
    which is what we do. However, I can definitely see adding different kinds of APIs, so that different SQL flavors can be supported. Thanks!

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      Ok. I just wasn't sure you had that covered :)

      Other than the SQL dialect issue, I don't really see any advantage of my suggested syntax over yours.

      /J