]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
formatting fix
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 30 Dec 2009 04:53:23 +0000 (04:53 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 30 Dec 2009 04:53:23 +0000 (04:53 +0000)
lib/sqlalchemy/ext/compiler.py

index f893538e8ee036e23698d6427e3faae317edfedc..9fb7fd712025bfe664b21810919fc75c5df98cd2 100644 (file)
@@ -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.