fixed 1771:MongoDBAdapter ILIKE and widget.autocomplete, thanks Francisco
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.7.4-stable+timestamp.2013.11.16.03.22.18
|
||||
Version 2.7.4-stable+timestamp.2013.11.16.03.31.47
|
||||
|
||||
@@ -5985,6 +5985,11 @@ class MongoDBAdapter(NoSQLAdapter):
|
||||
return {self.expand(first): ('%s' % \
|
||||
self.expand(second, 'string').replace('%','/'))}
|
||||
|
||||
def ILIKE(self, first, second):
|
||||
val = second if isinstance(second,self.ObjectId) else {
|
||||
'$regex': second.replace('%', ''), '$options': 'i'}
|
||||
return {self.expand(first): val}
|
||||
|
||||
def STARTSWITH(self, first, second):
|
||||
#escaping regex operators?
|
||||
return {self.expand(first): ('/^%s/' % \
|
||||
|
||||
Reference in New Issue
Block a user