jeroendierckx/Camelot — pull request #2 by Governa (2012-09-05 14:54:25+00:00)
Title: Search for multiple terms if search string contains space

Split the search string on every space and search for each substring
in all columns.

Returns an object only if *all* strings are found.

So if you have the following definition(pseudo-python-code):
class MyEntity(Entity):
field1 = Column(Integer)
field2 = Column(String)
field3 = Column(String)

And the following itens on DB:

field1 | field2 | field3
1 | Test | OK
2 | Test1 | Bad
3 | Bad | Test3

Then the following searches return the following itens

search -> itens
"1" -> (1, 2)
"Bad" -> (2, 3)
"1 Bad" -> (2)
"1 OK" -> (1)