|
@@ -807,6 +807,9 @@ by an equality filter")
|
807
|
807
|
#Converting lodel2 wildcarded string into a case insensitive
|
808
|
808
|
#mongodb re
|
809
|
809
|
if mongop in cls.mongo_op_re:
|
|
810
|
+ if value.startswith('(') and value.endswith(')') and ',' in value:
|
|
811
|
+ mongoval = [ item for item in mongoval[1:-1].split(',') ]
|
|
812
|
+ elif mongop == 'like':
|
810
|
813
|
#unescaping \
|
811
|
814
|
mongoval = value.replace('\\\\','\\')
|
812
|
815
|
if not mongoval.startswith('*'):
|
|
@@ -817,6 +820,7 @@ by an equality filter")
|
817
|
820
|
#Replacing every other unescaped wildcard char
|
818
|
821
|
mongoval = cls.wildcard_re.sub('.*', mongoval)
|
819
|
822
|
mongoval = {'$regex': mongoval, '$options': 'i'}
|
|
823
|
+
|
820
|
824
|
return (op, mongoval)
|
821
|
825
|
|
822
|
826
|
##@brief Convert a list of tuple(OP, VALUE) into a pymongo filter dict
|