Ryan Pavlik
10/5/2003 1:04:00 AM
On Sun, 5 Oct 2003 09:36:34 +0900
Ryan Pavlik <rpav@mephle.com> wrote:
> TBL_AGE_RANGE = (tbl.age > tbl.x?) & (tbl.age < tbl.x?)
> TBL_AGE_RANGE.order_by = [:name, :age]
>
> TBL_AGE_RANGE[20, 30].select
>
> # => "SELECT * FROM Person WHERE ((Person.age > 20) AND
> # (Person.age < 30))"
Of course, not 10 minutes after posting, I see a bug demonstrated in
my own post. Figures. This should have the following result:
# => "SELECT * FROM test WHERE ((test.age > ?) AND (test.age < ?))
# ORDER BY name, age"
This is fixed in 1.1a, now posted.
--
Ryan Pavlik <rpav@mephle.com>
"And I thought all thieves could do in a fight
was run away." - 8BT