Hi,

I want to programmatically translate a mongo-like query hash to a Sequel 
Expression to pass to Dataset#where.

The input would be something like: db[:people].custom_where(age: {lt: 30})

I can think of translating the above into: db[:people].where 
{__send__(:age).__send__(:<, 30)}

Is there a cleaner way to do this? Maybe someone already wrote a plugin?

--David

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/Zzhpok2wUiUJ.
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