summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-08-06 21:52:24 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-08-06 21:52:24 +0000
commit8446b805333f87e80a7680cfc8939d566fb033df (patch)
tree25ddfa7fe3a7b5f468b468a4874ce537e62e184f /lib/sqlalchemy/sql.py
parent2dde45881b07df9233461c9a19b647f9b7dc816c (diff)
downloadsqlalchemy-8446b805333f87e80a7680cfc8939d566fb033df.tar.gz
- added desc() and asc() directly to CompareMixin
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index eef1a9046..06802cf6f 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -1443,7 +1443,17 @@ class _CompareMixin(ColumnOperators):
def label(self, name):
"""produce a column label, i.e. ``<columnname> AS <name>``"""
return _Label(name, self, self.type)
-
+
+ def desc(self):
+ """produce a DESC clause, i.e. ``<columnname> DESC``"""
+
+ return desc(self)
+
+ def asc(self):
+ """produce a ASC clause, i.e. ``<columnname> ASC``"""
+
+ return asc(self)
+
def distinct(self):
"""produce a DISTINCT clause, i.e. ``DISTINCT <columnname>``"""
return _UnaryExpression(self, operator="DISTINCT")