mysql regexp

This commit is contained in:
Massimo
2013-02-08 13:01:36 -06:00
parent 66c3855e23
commit ae12b74620
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.1-alpha.2+timestamp.2013.02.08.12.41.08
Version 2.4.1-alpha.2+timestamp.2013.02.08.13.01.03
+4
View File
@@ -2390,6 +2390,10 @@ class MySQLAdapter(BaseAdapter):
def EPOCH(self, first):
return "UNIX_TIMESTAMP(%s)" % self.expand(first)
def REGEXP(self,first,second):
return '(%s REGEXP %s)' % (self.expand(first),
self.expand(second,'string'))
def _drop(self,table,mode):
# breaks db integrity but without this mysql does not drop table
return ['SET FOREIGN_KEY_CHECKS=0;','DROP TABLE %s;' % table,