From 29303488ab096bb791d75ba034def004bba48ec1 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 28 Jul 2014 00:21:45 -0500 Subject: [PATCH] support for Oracle REGEXP_LIKE, thanks Alexander Rasin --- VERSION | 2 +- gluon/dal.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 95dd6ac3..a2814742 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.9.5-trunk+timestamp.2014.07.27.11.14.45 +Version 2.9.5-trunk+timestamp.2014.07.28.00.20.49 diff --git a/gluon/dal.py b/gluon/dal.py index bd2ee3b2..39373095 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -3192,6 +3192,10 @@ class OracleAdapter(BaseAdapter): def NOT_NULL(self, default, field_type): return 'DEFAULT %s NOT NULL' % self.represent(default, field_type) + def REGEXP(self, first, second): + return 'REGEXP_LIKE(%s, %s)' % (self.expand(first), + self.expand(second, 'string')) + def _drop(self, table, mode): sequence_name = table._sequence_name return ['DROP TABLE %s %s;' % (table.sqlsafe, mode), 'DROP SEQUENCE %s;' % sequence_name]