From ae12b746207c54ccc1edacc79e784cf22d82f65a Mon Sep 17 00:00:00 2001 From: Massimo Date: Fri, 8 Feb 2013 13:01:36 -0600 Subject: [PATCH] mysql regexp --- VERSION | 2 +- gluon/dal.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c986fead..070be2f6 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/dal.py b/gluon/dal.py index f8711f81..5b982191 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -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,