mirror of
https://github.com/django/django.git
synced 2025-08-09 21:38:18 +00:00
Fixed #7210 -- Added F() expressions to query language. See the documentation for details on usage.
Many thanks to: * Nicolas Lara, who worked on this feature during the 2008 Google Summer of Code. * Alex Gaynor for his help debugging and fixing a number of issues. * Malcolm Tredinnick for his invaluable review notes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9792 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
08dd4176ed
commit
cf37e4624a
16 changed files with 586 additions and 48 deletions
|
@ -17,6 +17,9 @@ class QueryWrapper(object):
|
|||
def __init__(self, sql, params):
|
||||
self.data = sql, params
|
||||
|
||||
def as_sql(self, qn=None):
|
||||
return self.data
|
||||
|
||||
class Q(tree.Node):
|
||||
"""
|
||||
Encapsulates filters as objects that can then be combined logically (using
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue