Hi,

In the current implementation, filter raises an exception when it
receives
empty hash:

  table.filter({}) #=> The AND operator requires at least 1 argument
(Sequel::Error)

I think that it's convenience to handle it as `no entry is rejected.'
Use case:

  cond ={}
  cond[:column1] = :foo if column1_must_be_foo
  cond[:column2] = :bar if column2_must_be_bar
  table.filter(cond)

This code fails if both column1_must_be_foo and column2_must_be_bar
are false.

What do you think?  I'm sorry in advance if this is already-discussed
(or
defective) idea.

--
Yusuke ENDOH <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
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