diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-08-18 01:00:44 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-08-18 01:00:44 +0000 |
commit | 820346549b7e50e927c519c9bc54934e9a440422 (patch) | |
tree | 1747619176907dac7663f54408a4288129e49a3a /lib/sqlalchemy/databases/mysql.py | |
parent | 74595d900c23fcefe75353d3099cb73a55a0b6cf (diff) | |
download | sqlalchemy-820346549b7e50e927c519c9bc54934e9a440422.tar.gz |
- 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
Diffstat (limited to 'lib/sqlalchemy/databases/mysql.py')
-rw-r--r-- | lib/sqlalchemy/databases/mysql.py | 8 |
1 files changed, 5 insertions, 3 deletions
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: '%%' } ) |