*(I originally posted this question 
<http://stackoverflow.com/q/19864665/405017> on Stack Overflow. Please feel 
free to answer there, too, if you want SO rep.)*

Given a dataset that has multiple filters applied, how can I create a new 
dataset that removes or overrides one of the existing filters?

ds1 = DB[:x].filter(a:1, b:2)#=> <Sequel::Dataset: "SELECT * FROM x WHERE ((a = 
1) AND (b = 2))">

ds2 = ds1.filter(a:42) # I want to CHANGE a, not add another#=> 
<Sequel::Dataset: "SELECT * FROM x WHERE ((a = 1) AND (b = 2) AND (a = 42))">

The #unfiltered method removes all filters (e.g. it removes b=2). While 
that would be easy to re-add in the above simple case, it would result in 
code duplication in my real case.

So, is this possible?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to