fixed Issue 1572:mongodb contains operator typo, thanks Alan
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.6.0-development+timestamp.2013.07.03.01.52.44
|
Version 2.6.0-development+timestamp.2013.07.03.03.59.49
|
||||||
|
|||||||
+2
-2
@@ -5718,7 +5718,7 @@ class MongoDBAdapter(NoSQLAdapter):
|
|||||||
# There is a technical difference, but mongodb doesn't support
|
# There is a technical difference, but mongodb doesn't support
|
||||||
# that, but the result will be the same
|
# that, but the result will be the same
|
||||||
val = second if isinstance(second,self.ObjectId) else \
|
val = second if isinstance(second,self.ObjectId) else \
|
||||||
{' $regex':".*" + re.escape(self.expand(second, 'string')) + ".*"}
|
{'$regex':".*" + re.escape(self.expand(second, 'string')) + ".*"}
|
||||||
return {self.expand(first) : val}
|
return {self.expand(first) : val}
|
||||||
|
|
||||||
def LIKE(self, first, second):
|
def LIKE(self, first, second):
|
||||||
@@ -5751,7 +5751,7 @@ class MongoDBAdapter(NoSQLAdapter):
|
|||||||
#There is a technical difference, but mongodb doesn't support
|
#There is a technical difference, but mongodb doesn't support
|
||||||
# that, but the result will be the same
|
# that, but the result will be the same
|
||||||
#TODO contains operators need to be transformed to Regex
|
#TODO contains operators need to be transformed to Regex
|
||||||
return {self.expand(first) : {' $regex': \
|
return {self.expand(first) : {'$regex': \
|
||||||
".*" + re.escape(self.expand(second, 'string')) + ".*"}}
|
".*" + re.escape(self.expand(second, 'string')) + ".*"}}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user