]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
added a type to label....
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 3 Apr 2006 03:24:06 +0000 (03:24 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 3 Apr 2006 03:24:06 +0000 (03:24 +0000)
doc/build/txt2myt.py
lib/sqlalchemy/sql.py

index 85778cd97a97725bfa9cf761aa5291ba62b2d19f..533ac7033dafb0db42e22d7fdf7e5dd59a488d81 100644 (file)
@@ -264,5 +264,5 @@ if __name__ == '__main__':
         input = file(inname).read()\r
         html = markdown.markdown(input)\r
         myt = html2myghtydoc(html)\r
-        file(inname[:-3] + "html", 'w').write(html)\r
+        #file(inname[:-3] + "html", 'w').write(html)\r
         file(outname, 'w').write(myt)\r
index 7f77acf17752efda830d99ca1a721e4784ee7041..52b75b1eeb6f305becf826e97c45d7439bd950ae 100644 (file)
@@ -489,7 +489,7 @@ class CompareMixin(object):
     def endswith(self, other):
         return self._compare('LIKE', "%" + str(other))
     def label(self, name):
-        return Label(name, self)
+        return Label(name, self, self.type)
     def distinct(self):
         return CompoundClause(None,"DISTINCT", self)
     def op(self, operator):
@@ -995,11 +995,12 @@ class Alias(FromClause):
 
     
 class Label(ColumnElement):
-    def __init__(self, name, obj):
+    def __init__(self, name, obj, type=None):
         self.name = name
         while isinstance(obj, Label):
             obj = obj.obj
         self.obj = obj
+        self.type = type or sqltypes.NullTypeEngine()
         obj.parens=True
     key = property(lambda s: s.name)