]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Compiled is just an object now. the ClauseVisitor portion
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 26 Jul 2007 18:55:57 +0000 (18:55 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 26 Jul 2007 18:55:57 +0000 (18:55 +0000)
is now specific to ANSICompiler.

lib/sqlalchemy/ansisql.py
lib/sqlalchemy/engine/base.py

index 83a05abdd62a8a5201c3599a7bfb038ff332c201..22227d56a84dbee26e46dfef764c8a294ba75a17 100644 (file)
@@ -102,7 +102,7 @@ class ANSIDialect(default.DefaultDialect):
         """
         return ANSIIdentifierPreparer(self)
 
-class ANSICompiler(engine.Compiled):
+class ANSICompiler(engine.Compiled, sql.ClauseVisitor):
     """Default implementation of Compiled.
 
     Compiles ClauseElements into ANSI-compliant SQL strings.
index 4d6cbececdcb16c0dfa509e6623b1bc68cdd0fac..ad029425565606875abe43418f1273f429dde323 100644 (file)
@@ -388,7 +388,7 @@ class ExecutionContext(object):
 
         raise NotImplementedError()
 
-class Compiled(sql.ClauseVisitor):
+class Compiled(object):
     """Represent a compiled SQL expression.
 
     The ``__str__`` method of the ``Compiled`` object should produce
@@ -429,7 +429,12 @@ class Compiled(sql.ClauseVisitor):
         self.parameters = parameters
         self.bind = bind
         self.can_execute = statement.supports_execution()
-
+    
+    def compile(self):
+        """Produce the internal string representation of this element."""
+        
+        raise NotImplementedError()
+        
     def __str__(self):
         """Return the string text of the generated SQL statement."""