Is there support for this?
Jim
Yes, you can use these operators and any others via the .op() method:
table.c.col1.op('rlike')('re')
not_(table.c.col1.op('rlike')('re'))
table.c.col1.op('regexp')('re')
-j
As a a remark, ilike also is accessed in this way.
--
Eric
Is it possible to use them with the ORM too? Or am I misunderstanding
the above? If someone has the time to post an example of how one would
do an rlike version of
Resource.select_by( foo="bar" )
I'd love to see it.
Thanks
Iain
>Resource.select_by( foo="bar" )
>
>
Untested, but I reckon this will work:
Resource.query.filter(Resource.foo.op('rlike')('bar'))
Paul
might need to call op() off the Table instance for now, might not
have added op() to the class-based properties....
Excuse what may be a stupid question, but is this for both 0.3 and 0.4
or just the new stuff? ( I know, I gotta upgrade soon now! )
Thanks
Iain
you can say query.filter(sometable.c.somecolumn.op('rlike')('bar'))
in any 0.3 or 0.4 version.