diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-12-30 04:53:23 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-12-30 04:53:23 +0000 |
commit | 67e63bc7c472d959f3fac954afd1858e18dd4453 (patch) | |
tree | 6cc78baf36133d146fcd74cb56f11bb7f2a8b216 | |
parent | 77bf8f0713ad0d37956f72ddc50a41ac62619c1e (diff) | |
download | sqlalchemy-67e63bc7c472d959f3fac954afd1858e18dd4453.tar.gz |
formatting fix
-rw-r--r-- | lib/sqlalchemy/ext/compiler.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/ext/compiler.py b/lib/sqlalchemy/ext/compiler.py index f893538e8..9fb7fd712 100644 --- a/lib/sqlalchemy/ext/compiler.py +++ b/lib/sqlalchemy/ext/compiler.py @@ -93,11 +93,11 @@ Within the new compilation function, to get at the "original" compilation routin use the appropriate visit_XXX method - this because compiler.process() will call upon the overriding routine and cause an endless loop. Such as, to add "prefix" to all insert statements:: -from sqlalchemy.sql.expression import Insert + from sqlalchemy.sql.expression import Insert -@compiles(Insert) -def prefix_inserts(insert, compiler, **kw) - return compiler.visit_insert(insert.prefix_with("some prefix"), **kw) + @compiles(Insert) + def prefix_inserts(insert, compiler, **kw): + return compiler.visit_insert(insert.prefix_with("some prefix"), **kw) The above compiler will prefix all INSERT statements with "some prefix" when compiled. |