From 820346549b7e50e927c519c9bc54934e9a440422 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 18 Aug 2007 01:00:44 +0000 Subject: - modified SQL operator functions to be module-level operators, allowing SQL expressions to be pickleable [ticket:735] - small adjustment to mapper class.__init__ to allow for Py2.6 object.__init__() behavior --- lib/sqlalchemy/databases/mysql.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/sqlalchemy/databases/mysql.py') diff --git a/lib/sqlalchemy/databases/mysql.py b/lib/sqlalchemy/databases/mysql.py index 4cdc7962a..303a44552 100644 --- a/lib/sqlalchemy/databases/mysql.py +++ b/lib/sqlalchemy/databases/mysql.py @@ -123,10 +123,12 @@ Notes page on the wiki at http://sqlalchemy.org is a good resource for timely information affecting MySQL in SQLAlchemy. """ -import re, datetime, inspect, warnings, operator, sys +import re, datetime, inspect, warnings, sys from array import array as _array from sqlalchemy import ansisql, exceptions, logging, schema, sql, util +from sqlalchemy import operators as sql_operators + from sqlalchemy.engine import base as engine_base, default import sqlalchemy.types as sqltypes @@ -1735,9 +1737,9 @@ class MySQLCompiler(ansisql.ANSICompiler): operators = ansisql.ANSICompiler.operators.copy() operators.update( { - sql.ColumnOperators.concat_op: \ + sql_operators.concat_op: \ lambda x, y: "concat(%s, %s)" % (x, y), - operator.mod: '%%' + sql_operators.mod: '%%' } ) -- cgit v1.2.1