To do this nicely ticket #767 would have to be fixed, but until then
this should work:
def rlike_match_all(entity, **kwargs):
    return and_(*[getattr(entity,
key).comparator.expression_element().op('rlike')(value) for key,value
in kwargs.items()])

and use it by
Resource.select(rlike_match_all(Resource, query_dict))

Ants

So you can
On Nov 1, 8:12 pm, iain duncan <[EMAIL PROTECTED]> wrote:
> Others gave some pointers a while back on using rlike with query
> filters. I'm wondering whether there is some way to get rlike with
> assign_mapper syntax?
>
> I'm using right now
>
> Resource.select_by( **query_dict )
>
> where query dict is name/val pairs, I'd like to be able to make those
> name/val pairs be re matches. Any tips most appreciated!
>
> Thanks
> Iain


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to