fixed issue 1031, thanks David

This commit is contained in:
mdipierro
2012-10-01 14:49:42 -05:00
parent 94f11501ed
commit 083b598c93
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-10-01 14:25:23) dev
Version 2.0.9 (2012-10-01 14:49:31) dev
+6
View File
@@ -3261,6 +3261,12 @@ class FireBirdAdapter(BaseAdapter):
def SUBSTRING(self,field,parameters):
return 'SUBSTRING(%s from %s for %s)' % (self.expand(field), parameters[0], parameters[1])
def CONTAINS(self, first, second):
if first.type.startswith('list:'):
key = '|'+str(second).replace('|','||').replace('%','%%')+'|'
return '(%s CONTAINING %s)' % (self.expand(first),
self.expand(key,'string'))
def _drop(self,table,mode):
sequence_name = table._sequence_name
return ['DROP TABLE %s %s;' % (table, mode), 'DROP GENERATOR %s;' % sequence_name]