fixed CONTAINS (again)

This commit is contained in:
Massimo
2013-03-08 10:19:13 -06:00
parent 5122fbe110
commit da25c6f843
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.2-stable+timestamp.2013.03.08.10.16.16
Version 2.4.2-stable+timestamp.2013.03.08.10.18.44
+3 -3
View File
@@ -2668,7 +2668,7 @@ class PostgreSQLAdapter(BaseAdapter):
elif first.type.startswith('list:'):
second = '%|'+str(second).replace('|','||').replace('%','%%')+'|%'
op = case_sensitive and self.LIKE or self.ILIKE
return op(first,key)
return op(first,second)
# GIS functions
@@ -3455,9 +3455,9 @@ class FireBirdAdapter(BaseAdapter):
def CONTAINS(self, first, second, case_sensitive=False):
if first.type in ('string','text'):
key = str(second).replace('%','%%')
second = str(second).replace('%','%%')
elif first.type.startswith('list:'):
key = '|'+str(second).replace('|','||').replace('%','%%')+'|'
second = '|'+str(second).replace('|','||').replace('%','%%')+'|'
return self.CONTAINING(first,second)
def _drop(self,table,mode):