heynemann / motorengine

Motorengine is a port of MongoEngine for Tornado.
http://motorengine.readthedocs.org
204 stars 67 forks source link

String operators are not included in transform.py #113

Closed hhaawwaa closed 8 years ago

hhaawwaa commented 8 years ago

Thanks for the work you are doing! Let me point that string operators such as:

hhaawwaa commented 8 years ago

I am trying to implement it myself and make a pull request afterwards but not sure how to do it, I see motorengine code is quite different than mongoengine's. In any case, mongoengine uses regex to implement these operators as the following:

regex = r'%s'
if op == 'startswith':
    regex = r'^%s'
elif op == 'endswith':
    regex = r'%s$'
elif op == 'exact':
    regex = r'^%s$'
hhaawwaa commented 8 years ago

114 will include this feature