>   DB[:billing_headers].get(:charges.sql_function, :payments - :balance)
>
> so I get back an array with two values?  or is there more to this than
meets the eye?  (i.e. Sequel constructing a much more complex select clause
behind the scenes?).  Personally, if get didn't handle the above, I wouldn't
be crying over spilt milk.


> I suppose you could automatically alias if you have more than 1
> column, but that might have negative effects if the column is
> referenced anywhere else (e.g. in a order by).
>
>  DB[:a].join(:b, :id=>:b_id).order(:id).get(:a__id, :b__id___bid)
>
> hmmm...maybe I'm missing something, but why do I care about aliasing in
this case?

After all, I'm not getting a hash back, but an array of values, so as long
as those values are in correct order, [a, b], I'm good.  As for ambiguous
column errors, it seems proper to let the onus of disambiguating in order
clauses and the likes rest with the coder.

>From my perspective, when a complex case presents itself, I'm not generally
using "get" which I pretty much only use when I want one row answers and
pretty much know I can bank on what that one row is coming back at me.

Michael
-- 
http://codeconnoisseur.org

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to