summaryrefslogtreecommitdiff
path: root/django
AgeCommit message (Collapse)Author
2007-11-03queryset-refactor: Merged from trunk up to [6635].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6638 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-03queryset-refactor: Merged from trunk up to [6623].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-24queryset-refactor: Added the ability to apply parameters to the selectMalcolm Tredinnick
fragments in QuerySet.extra(). Refs #2902 git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23queryset-refactor: Added a convenience all() method to Querysets. Refs #3739Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23queryset-refactor: Fixed an order_by() regression. It must override anyMalcolm Tredinnick
existing ordering, not append to it. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6599 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23queryset-refactor: Merged from trunk up to [6595].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Changed post_delete signal behaviour back to match trunk'sMalcolm Tredinnick
version (it wasn't in error after all). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Fixed a possibility of shooting oneself in the foot andMalcolm Tredinnick
creating infinite recursion with select_related(). Refs #3045, #3288. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6521 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Added ~ support to Q-objects. Based heavily on a patch fromMalcolm Tredinnick
Collin Grady. Refs #4858. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Fixed values(...).select_related(...) bug that wasMalcolm Tredinnick
introduced in [6512]. The lookup tests picked this up. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6517 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Made the use of values() for ForeignKey fields consistentMalcolm Tredinnick
and documented this feature. Refs #4358. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Made sure the ordering columns in a distinct() query onlyMalcolm Tredinnick
include the columns we are selecting on. This avoids some PostgreSQL problems and leads to more efficient queries to boot. Refs #5321. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Fixed a couple of typos that were messing up ↵Malcolm Tredinnick
extra(select=...). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Added an order_by parameter to extra(). Refs #2076.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed a large bag of order_by() problems.Malcolm Tredinnick
This also picked up a small bug in some twisted select_related() handling. Introduces a new syntax for cross-model ordering: foo__bar__baz, using field names, instead of a strange combination of table names and field names. This might turn out to be backwards compatible (although the old syntax leads to bugs and is not to be recommended). Still to come: fixes for extra() handling, since the new syntax can't handle that and doc updates. Things are starting to get a bit slow here, so we might eventually have to remove ordering by many-many and other multiple-result fields, since they don't make a lot of sense in any case. For now, it's legal. Refs #2076, #2874, #3002 (although the admin bit doesn't work yet). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed handling of extra(tables=...). In passing, this solvesMalcolm Tredinnick
a duplicate table / bad SQL problem. Refs #2496. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Removed Options.get_order_sql(). It has no role to play anyMalcolm Tredinnick
longer. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Removed a whole bunch of unused code. This includes theMalcolm Tredinnick
final remnants of handle_legacy_orderlist(). Refs #245. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed a problem with count() queries -- we were creating anMalcolm Tredinnick
"ORDER BY" clause sometimes and that isn't accepted by PostgreSQL (and a waste of time on other databases as well). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed some quoting problems with aliases.Malcolm Tredinnick
These showed up for PostgreSQL, but this approach is a bit more robust in general, I suspect. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Made all the changes needed to have count() work properlyMalcolm Tredinnick
with ValuesQuerySet. This is the general case of #2939. At this point, all the existing tests now pass on the branch (except for Oracle). It's a bit slower than before, though, and there are still a bunch of known bugs that aren't in the tests (or only exercised for some backends). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6497 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Previous exclude() fixing broke the simple case. Fixed thatMalcolm Tredinnick
(the lookup tests picked this up). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed the optimization that potentially removes the finalMalcolm Tredinnick
join to handle the case where a to_field attribute is given for the join. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed the SQL construction when excluding items acrossMalcolm Tredinnick
nullable joins. This is #5324 plus a few more complex variations on that theme. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed a bug in Node.negate() for already negated nodes.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Create a new join when merging two QuerySets that use a 1-mMalcolm Tredinnick
field. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6492 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed a problem in the isnull=True handling.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6490 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14querset-refactor: Fixed a bunch of little things as a result of working on theMalcolm Tredinnick
tests. All of modeltests/ now pass. This includes a fix to modeltests/signals/ (in the post_delete signal testing), which I'm sure was incorrect previously. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6489 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: integrate select_related() into SQL generation.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Ported DateQuerySet and ValueQuerySet over and fixed most ofMalcolm Tredinnick
the related tests. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed small deepcopy bug in Where clauses.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-14queryset-refactor: Fixed a bug in QuerySet.get(). Also removed unneeded code ↵Malcolm Tredinnick
form EmptyQuerySet. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6484 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-08queryset-refactor: Merged changed from trunk up to [6463].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-20queryset-refactor: Merged to [6381]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6340]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6300]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6250]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6220]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6337 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6198]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6197]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6190]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6155]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6140]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-15queryset-refactor: Merged to [6130]Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6330 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Fixed some more join and lookup tests.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Fixed deleting via generic relations.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Use the correct column in custom column handling.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Fixed limit/offset computations.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Initial portion of queryset rewrite. This breaks a lot more than it fixes inMalcolm Tredinnick
the current state. Committing so that Adrian and I can work on it together. Do not try to use this yet! git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-09-13Created a tree data structure. Might be generically useful. Currently used forMalcolm Tredinnick
constructing queries. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6115 bcc190cf-cafb-0310-a4f2-bffc1f526a37