From 8fc5005dfe3eb66a46470ad8a8c7b95fc4d6bdca Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 6 Aug 2009 21:11:27 +0000 Subject: merge 0.6 series to trunk. --- lib/sqlalchemy/ext/compiler.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/ext/compiler.py') diff --git a/lib/sqlalchemy/ext/compiler.py b/lib/sqlalchemy/ext/compiler.py index 0e3db00e0..05df8d2be 100644 --- a/lib/sqlalchemy/ext/compiler.py +++ b/lib/sqlalchemy/ext/compiler.py @@ -33,7 +33,7 @@ Produces:: Compilers can also be made dialect-specific. The appropriate compiler will be invoked for the dialect in use:: - from sqlalchemy.schema import DDLElement # this is a SQLA 0.6 construct + from sqlalchemy.schema import DDLElement class AlterColumn(DDLElement): @@ -45,16 +45,16 @@ for the dialect in use:: def visit_alter_column(element, compiler, **kw): return "ALTER COLUMN %s ..." % element.column.name - @compiles(AlterColumn, 'postgres') + @compiles(AlterColumn, 'postgresql') def visit_alter_column(element, compiler, **kw): return "ALTER TABLE %s ALTER COLUMN %s ..." % (element.table.name, element.column.name) -The second ``visit_alter_table`` will be invoked when any ``postgres`` dialect is used. +The second ``visit_alter_table`` will be invoked when any ``postgresql`` dialect is used. The ``compiler`` argument is the :class:`~sqlalchemy.engine.base.Compiled` object in use. This object can be inspected for any information about the in-progress compilation, including ``compiler.dialect``, ``compiler.statement`` etc. -The :class:`~sqlalchemy.sql.compiler.SQLCompiler` and :class:`~sqlalchemy.sql.compiler.DDLCompiler` (DDLCompiler is 0.6. only) +The :class:`~sqlalchemy.sql.compiler.SQLCompiler` and :class:`~sqlalchemy.sql.compiler.DDLCompiler` both include a ``process()`` method which can be used for compilation of embedded attributes:: class InsertFromSelect(ClauseElement): -- cgit v1.2.1