[storm] Storm : Multiple fields request

Boris Blondin blondin.boris at gmail.com
Wed Nov 12 14:23:39 GMT 2008


Thanks for your replys,

> Some code that I use to do the same thing:
>
> cls = Employee
> param = { 'age':30,'lastname':'smith' }
>
> expressions = []
> for k in param:
>    v = param[k]
>    if v == "none":
>        v = None
>    if hasattr(cls,k):
>        expressions += [ getattr(cls,k) == v ]
>
>
> sl = store.find(cls,And(*expressions))


That's I'm searching for, and can we do this with  "Like" instead of "And" ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/storm/attachments/20081112/3f3f3c82/attachment.htm 


More information about the storm mailing list