diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-25 03:28:49 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-11-25 03:28:49 +0000 |
commit | cf18eecd704f5eb6fde4e0c362cfdb322e3e559a (patch) | |
tree | 9b6e4503802cf0fcae9171b3ac2f85ba0af453c7 /lib/sqlalchemy/databases/sybase.py | |
parent | 6f604f911640d92f705fc6611bfaa3e2600c4ee1 (diff) | |
download | sqlalchemy-cf18eecd704f5eb6fde4e0c362cfdb322e3e559a.tar.gz |
- 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
Diffstat (limited to 'lib/sqlalchemy/databases/sybase.py')
-rw-r--r-- | lib/sqlalchemy/databases/sybase.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/sqlalchemy/databases/sybase.py b/lib/sqlalchemy/databases/sybase.py index 87045d192..2209594ed 100644 --- a/lib/sqlalchemy/databases/sybase.py +++ b/lib/sqlalchemy/databases/sybase.py @@ -778,11 +778,11 @@ class SybaseSQLCompiler(compiler.DefaultCompiler): else: return super(SybaseSQLCompiler, self).visit_binary(binary) - def label_select_column(self, select, column): + def label_select_column(self, select, column, asfrom): if isinstance(column, expression._Function): - return column.label(column.name + "_" + hex(random.randint(0, 65535))[2:]) + return column.label(None) else: - return super(SybaseSQLCompiler, self).label_select_column(select, column) + return super(SybaseSQLCompiler, self).label_select_column(select, column, asfrom) function_rewrites = {'current_date': 'getdate', } @@ -795,13 +795,7 @@ class SybaseSQLCompiler(compiler.DefaultCompiler): cast = expression._Cast(func, SybaseDate_mxodbc) # infinite recursion # res = self.visit_cast(cast) - if self.stack and self.stack[-1].get('select'): - # not sure if we want to set the typemap here... - self.typemap.setdefault("CAST", cast.type) -# res = "CAST(%s AS %s)" % (self.process(cast.clause), self.process(cast.typeclause)) res = "CAST(%s AS %s)" % (res, self.process(cast.typeclause)) -# elif func.name.lower() == 'count': -# res = 'count(*)' return res def for_update_clause(self, select): |