summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/sqlite/pysqlite.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/sqlite/pysqlite.py')
-rw-r--r--lib/sqlalchemy/dialects/sqlite/pysqlite.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/pysqlite.py b/lib/sqlalchemy/dialects/sqlite/pysqlite.py
index eb855016e..377411520 100644
--- a/lib/sqlalchemy/dialects/sqlite/pysqlite.py
+++ b/lib/sqlalchemy/dialects/sqlite/pysqlite.py
@@ -506,6 +506,8 @@ class SQLiteDialect_pysqlite(SQLiteDialect):
connect = super(SQLiteDialect_pysqlite, self).on_connect()
def regexp(a, b):
+ if b is None:
+ return None
return bool(re.match(a, b))
def set_regexp(connection):
@@ -513,7 +515,6 @@ class SQLiteDialect_pysqlite(SQLiteDialect):
dbapi_connection = connection.connection
else:
dbapi_connection = connection
-
dbapi_connection.create_function(
"regexp",
2,