Just hacked together something similar over the last two weeks or so.
Right now its just an ActiveRecord extension, but I approached a bit
differently. Less flexibly, but more DSLish.
http://nickelcode.com/rquery/
I have to say I think you implementation is better in the long run as
its more flexible. Heres to good ideas!
Best
John Bender