diff options
Diffstat (limited to 'django/db/models/sql/datastructures.py')
| -rw-r--r-- | django/db/models/sql/datastructures.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/django/db/models/sql/datastructures.py b/django/db/models/sql/datastructures.py index b32148eba5..f45ecaf76d 100644 --- a/django/db/models/sql/datastructures.py +++ b/django/db/models/sql/datastructures.py @@ -4,6 +4,21 @@ the SQL domain. """ +class Col(object): + def __init__(self, alias, col): + self.alias = alias + self.col = col + + def as_sql(self, qn, connection): + return '%s.%s' % (qn(self.alias), self.col), [] + + def prepare(self): + return self + + def relabeled_clone(self, relabels): + return self.__class__(relabels.get(self.alias, self.alias), self.col) + + class EmptyResultSet(Exception): pass |
