summaryrefslogtreecommitdiff
path: root/django/db/models/query.py
AgeCommit message (Collapse)Author
2007-01-04Fixed #2473 -- Added special case for '__in=[]' (empty set) queries, because ↵Russell Keith-Magee
'WHERE attr IN ()' is invalid SQL on many backends. Thanks, Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-14Fixes #2737 -- Added code to allow None as a query value for __exact ↵Russell Keith-Magee
queries, raising an error otherwise. __exact=None is interpreted as the SQL 'value = NULL'. This fixes some minor problems with queries on unsaved objects with related object sets, and stops queries with a value of None being outright ignored (even if they reference an unknown attribute). git-svn-id: http://code.djangoproject.com/svn/django/trunk@3902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-25Made ``pk`` a generic expansion for the primary key, rather than just an ↵Russell Keith-Magee
expansion for __id__exact. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3826 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-20Fixed #2379 -- Fixed 'search' DB lookup parameter, which was broken by ↵Adrian Holovaty
[3248]. Thanks, Tim Keating git-svn-id: http://code.djangoproject.com/svn/django/trunk@3400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Added local 'qn' variable for backend.quote_name in ↵Adrian Holovaty
django.db.models.query.delete_objects git-svn-id: http://code.djangoproject.com/svn/django/trunk@3327 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Added local 'qn' variable for backend.quote_name in ↵Adrian Holovaty
django.db.models.query.fill_table_cache git-svn-id: http://code.djangoproject.com/svn/django/trunk@3326 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Removed references to LOOKUP_SEPARATOR in django.db.models.query.lookup_innerAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Removed unnecessary 'except: raise' in django.db.models.query.lookup_innerAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Added local 'qn' variable for backend.quote_name in ↵Adrian Holovaty
django.db.models.query.lookup_inner git-svn-id: http://code.djangoproject.com/svn/django/trunk@3323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Renamed 'clause' variable to 'lookup_type' in ↵Adrian Holovaty
django.db.models.query.lookup_inner git-svn-id: http://code.djangoproject.com/svn/django/trunk@3322 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-11Fixed #1614 -- get_sql(), lookup_inner() and parse_lookup() no longer return ↵Adrian Holovaty
a 'tables' parameter, because 'tables' was never getting assigned, anywhere. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3317 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-08Made two small changes to comments in django.db.models.queryAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3300 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01Formatting fix for [3248]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3250 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01Fixes #2271 -- Added code to imply !__exact on any query argument that ↵Russell Keith-Magee
doesn't finish with a known query term. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-07-01Fixed #2217 -- Allowed raw objects to be used in __exact and __in query ↵Russell Keith-Magee
terms. Existing use of primary keys in query terms is preserved. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3246 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-27Added {{{Manager.create()}}} method to create and save an object in a single ↵Jacob Kaplan-Moss
step. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3217 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-08Fixed #2109 -- Convert old-style classes to new-style classes throughout ↵Adrian Holovaty
Django. Thanks, Nicola Larosa git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-07Added Manager.get_or_create()Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3092 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-03Fixed #593 -- Added 'search' DB-API lookup type, which does full-text index ↵Adrian Holovaty
searches in MySQL git-svn-id: http://code.djangoproject.com/svn/django/trunk@3073 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-06-01Fixed #1454 -- Improved DB API quote_only_if_word() so that it doesn't quote ↵Adrian Holovaty
'select' parameters that are not all word characters. Thanks, dja@cdc.msbx.net git-svn-id: http://code.djangoproject.com/svn/django/trunk@3044 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-31Fixed #2038 -- QuerySet._combine now combines where clause. Thanks, ↵Adrian Holovaty
graham@darkcoding.net git-svn-id: http://code.djangoproject.com/svn/django/trunk@3019 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26Fixed bug with QuerySet.exclude() failing to do negations on Q objects, andLuke Plant
at the same time generalised exclude/QNot so that they work for 'external' Q objects i.e. ones that simply have 'get_sql' defined. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-26Made negative indexing on QuerySet instances raise an assertion error ↵Luke Plant
(previously it just returned incorrect results). git-svn-id: http://code.djangoproject.com/svn/django/trunk@2992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-23Fixed bug with Meta.ordering being ignored when slicing a single item off a ↵Luke Plant
QuerySet. Thanks, Gábor Fawkes. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-14Fixed #1530 -- make count() respect distinct() on QuerySets. Create someMalcolm Tredinnick
tests for this as well. Thanks to Adam Endicott for the original patch on which this is based. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2902 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06Made QuerySet slicing return IndexError instead of DoesNotExist (and related ↵Luke Plant
changes). git-svn-id: http://code.djangoproject.com/svn/django/trunk@2859 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06Fixed #1776 -- Fixed bug in DateQuerySet when the field is null. Thanks, ↵Adrian Holovaty
Christopher Lenz git-svn-id: http://code.djangoproject.com/svn/django/trunk@2857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06Fixed QuerySet __getitem__ corner case so that it throws exceptions consistentlyLuke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-06Fixed #1579 - added support for 'Q' objects in limit_choices_to.Luke Plant
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-05-02MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly ↵Adrian Holovaty
backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions. git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37