From cf18eecd704f5eb6fde4e0c362cfdb322e3e559a Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 25 Nov 2007 03:28:49 +0000 Subject: - named_with_column becomes an attribute - cleanup within compiler visit_select(), column labeling - is_select() removed from dialects, replaced with returns_rows_text(), returns_rows_compiled() - should_autocommit() removed from dialects, replaced with should_autocommit_text() and should_autocommit_compiled() - typemap and column_labels collections removed from Compiler, replaced with single "result_map" collection. - ResultProxy uses more succinct logic in combination with result_map to target columns --- lib/sqlalchemy/databases/mssql.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/databases/mssql.py') diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index 672f8d77c..469355083 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -339,8 +339,8 @@ class MSSQLExecutionContext(default.DefaultExecutionContext): _ms_is_select = re.compile(r'\s*(?:SELECT|sp_columns)', re.I | re.UNICODE) - def is_select(self): - return self._ms_is_select.match(self.statement) is not None + def returns_rows_text(self, statement): + return self._ms_is_select.match(statement) is not None class MSSQLExecutionContext_pyodbc (MSSQLExecutionContext): @@ -910,11 +910,11 @@ class MSSQLCompiler(compiler.DefaultCompiler): else: return super(MSSQLCompiler, self).visit_binary(binary, **kwargs) - def label_select_column(self, select, column): + def label_select_column(self, select, column, asfrom): if isinstance(column, expression._Function): return column.label(None) else: - return super(MSSQLCompiler, self).label_select_column(select, column) + return super(MSSQLCompiler, self).label_select_column(select, column, asfrom) function_rewrites = {'current_date': 'getdate', 'length': 'len', -- cgit v1.2.1