diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-02 22:35:45 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-11-02 22:35:45 +0200 |
| commit | bec0b2a8c637ba2dc3745ad0c1e68ccc6c2f78bd (patch) | |
| tree | 6798d30312529877b04af916154322c1ac26b0fc /django/db/models/sql/datastructures.py | |
| parent | 7548aa8ffd46eb6e0f73730d1b2eb515ba581f95 (diff) | |
Fixed #14511 -- bug in .exclude() query
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 |
