fixed CONTAINS (again)
This commit is contained in:
1 parent
5122fbe110
commit
da25c6f843
2 files changed
+4
-4
No files matched your search
@@ -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
@@ -2668,7 +2668,7 @@ class PostgreSQLAdapter(BaseAdapter):
|
|||||||
elif first.type.startswith('list:'):
|
elif first.type.startswith('list:'):
|
||||||
second = '%|'+str(second).replace('|','||').replace('%','%%')+'|%'
|
second = '%|'+str(second).replace('|','||').replace('%','%%')+'|%'
|
||||||
op = case_sensitive and self.LIKE or self.ILIKE
|
op = case_sensitive and self.LIKE or self.ILIKE
|
||||||
return op(first,key)
|
return op(first,second)
|
||||||
|
|
||||||
# GIS functions
|
# GIS functions
|
||||||
|
|
||||||
@@ -3455,9 +3455,9 @@ class FireBirdAdapter(BaseAdapter):
|
|||||||
|
|
||||||
def CONTAINS(self, first, second, case_sensitive=False):
|
def CONTAINS(self, first, second, case_sensitive=False):
|
||||||
if first.type in ('string','text'):
|
if first.type in ('string','text'):
|
||||||
key = str(second).replace('%','%%')
|
second = str(second).replace('%','%%')
|
||||||
elif first.type.startswith('list:'):
|
elif first.type.startswith('list:'):
|
||||||
key = '|'+str(second).replace('|','||').replace('%','%%')+'|'
|
second = '|'+str(second).replace('|','||').replace('%','%%')+'|'
|
||||||
return self.CONTAINING(first,second)
|
return self.CONTAINING(first,second)
|
||||||
|
|
||||||
def _drop(self,table,mode):
|
def _drop(self,table,mode):
|
||||||
|
|||||||
Reference in new issue
Block a user