From de115ae40695d8e9fa6d85c629222bec2ea01ff6 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 17 Jul 2012 20:04:22 -0400 Subject: - a big renaming of all the _Underscore classes to have plain names. The old names are still defined for backwards compatibility. - _BindParamClause renamed to BindParameter --- lib/sqlalchemy/dialects/maxdb/base.py | 2 +- lib/sqlalchemy/dialects/mssql/base.py | 8 ++++---- lib/sqlalchemy/dialects/mysql/base.py | 4 ++-- lib/sqlalchemy/dialects/postgresql/psycopg2.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'lib/sqlalchemy/dialects') diff --git a/lib/sqlalchemy/dialects/maxdb/base.py b/lib/sqlalchemy/dialects/maxdb/base.py index cde839db9..76adf97ff 100644 --- a/lib/sqlalchemy/dialects/maxdb/base.py +++ b/lib/sqlalchemy/dialects/maxdb/base.py @@ -607,7 +607,7 @@ class MaxDBCompiler(compiler.SQLCompiler): snagger = self.ColumnSnagger() snagger.traverse(column) if snagger.count == 1: - if isinstance(column, sql_expr._Label): + if isinstance(column, sql_expr.Label): labels[unicode(snagger.column)] = column.name elif use_labels: labels[unicode(snagger.column)] = column._label diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py index 4303660bf..b893541d3 100644 --- a/lib/sqlalchemy/dialects/mssql/base.py +++ b/lib/sqlalchemy/dialects/mssql/base.py @@ -876,12 +876,12 @@ class MSSQLCompiler(compiler.SQLCompiler): """ if ( - isinstance(binary.left, expression._BindParamClause) + isinstance(binary.left, expression.BindParameter) and binary.operator == operator.eq - and not isinstance(binary.right, expression._BindParamClause) + and not isinstance(binary.right, expression.BindParameter) ): return self.process( - expression._BinaryExpression(binary.right, + expression.BinaryExpression(binary.right, binary.left, binary.operator), **kwargs) @@ -897,7 +897,7 @@ class MSSQLCompiler(compiler.SQLCompiler): adapter = sql_util.ClauseAdapter(target) def col_label(col): adapted = adapter.traverse(col) - if isinstance(col, expression._Label): + if isinstance(col, expression.Label): return adapted.label(c.key) else: return self.label_select_column(None, adapted, asfrom=False) diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 6b34ec577..5a020f416 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -216,10 +216,10 @@ add all datatype support until 4.1.1. If your application falls into this narrow area, the behavior of CAST can be controlled using the :ref:`sqlalchemy.ext.compiler_toplevel` system, as per the recipe below:: - from sqlalchemy.sql.expression import _Cast + from sqlalchemy.sql.expression import Cast from sqlalchemy.ext.compiler import compiles - @compiles(_Cast, 'mysql') + @compiles(Cast, 'mysql') def _check_mysql_version(element, compiler, **kw): if compiler.dialect.server_version_info < (4, 1, 0): return compiler.process(element.clause, **kw) diff --git a/lib/sqlalchemy/dialects/postgresql/psycopg2.py b/lib/sqlalchemy/dialects/postgresql/psycopg2.py index ec8d0f219..44ed7fc91 100644 --- a/lib/sqlalchemy/dialects/postgresql/psycopg2.py +++ b/lib/sqlalchemy/dialects/postgresql/psycopg2.py @@ -221,7 +221,7 @@ class PGExecutionContext_psycopg2(PGExecutionContext): or \ ( (not self.compiled or - isinstance(self.compiled.statement, expression._TextClause)) + isinstance(self.compiled.statement, expression.TextClause)) and self.statement and SERVER_SIDE_CURSOR_RE.match(self.statement)) ) ) -- cgit v1.2.1