How about splitting where and filter to do different things?

Both these would be the same:

 dataset.filter {|o| o.a > 1}
 dataset.where {a > 1}

You can also refer to local variables in #where by passing them as
arguments:

 price = 1
 name = "hotdog"
 # The following two statements result in the SQL: "price > 1 AND name
= 'hotdog'"
 dataset.filter {|o| (o.price > price) & (o.name == name)}
 dataset.where(price, name) {|p,n| (price > p) & (name > n)}
--~--~---------~--~----~------------~-------~--~----~
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