On Apr 16, 11:16 am, rohit <[email protected]> wrote:
> Apart from the need to explicitly qualify is there any disadvantage
> with doing it like this?
>
> DB[:table1].join(:table2, {:table2__colA => :table1__colA} &
> (:table2__colB < :x))
>
> Just like how you would write it in a filter.
You can certainly do it that way if you want to, but it won't work on
ruby 1.9 (where Symbol#< is defined by ruby).
Since you are doing an inner join, as long as your database supports
JOIN USING and has a query optimizer that doesn't completely suck,
this should be equivalent:
DB[:table1].join(:table2, [:colA]).filter{table2__colB < x}
Jeremy
--
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.