| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
disambiguate it from a list.
|
|
|
|
| |
SQLInsertCompiler
|
| |
|
|
|
|
| |
QuerySet.iterator() didn't return an iterator.
|
|
|
|
|
|
|
| |
incorrect .select_related() use
Using select_related() after .values() or .values_list() is not possible
because .values() or .values_list() already got the values they need.
|
|
|
|
| |
with custom db_column.
|
|
|
|
|
|
| |
being cleared in get().
Thanks to pdewacht for the patch.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the pk was a relation field, qs.filter(pk__in=qs) didn't work.
In addition, fixed Restaurant.objects.filter(place=restaurant_instance),
where place is an OneToOneField and the primary key of Restaurant.
A big thank you to Josh for review and to Tim for review and cosmetic
edits.
Thanks to Beauhurst for commissioning the work on this ticket.
|
|
|
|
| |
being overwritten.
|
|
|
|
| |
number of deleted objects.
|
| |
|
|
|
|
|
|
|
|
| |
Field.rel is now deprecated. Rel objects have now also remote_field
attribute. This means that self == self.remote_field.remote_field.
In addition, made the Rel objects a bit more like Field objects. Still,
marked ManyToManyFields as null=True.
|
|
|
|
|
|
| |
foreign keys.
Joint effort between myself, Josh, Anssi and Shai.
|
| |
|
|
|
|
|
|
|
|
| |
The method is mainly intended for use with UUIDField. For UUIDField we
want to call the field's default even when primary key value is
explicitly set to None to match the behavior of AutoField.
Thanks to Marc Tamlyn and Tim Graham for review.
|
|
|
|
|
|
|
|
| |
limited number of rows."
This reverts commit da79ccca1d34f427952cce4555e598a700adb8de.
This optimized the unsuccessful case at the expense of the successful one.
|
|
|
|
|
|
| |
ValuesListQuerySet().
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
|
|
|
|
|
|
| |
default_alias.
Refs #14030.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactored compiler SELECT, GROUP BY and ORDER BY generation.
While there, also refactored select_related() implementation
(get_cached_row() and get_klass_info() are now gone!).
Made get_db_converters() method work on expressions instead of
internal_type. This allows the backend converters to target
specific expressions if need be.
Added query.context, this can be used to set per-query state.
Also changed the signature of database converters. They now accept
context as an argument.
|
|
|
|
|
|
|
| |
retrieving fields.
Thanks to Russell Keith-Magee for mentoring this Google Summer of
Code 2014 project and everyone else who helped with the patch!
|
|
|
|
| |
with as_manager().
|
|
|
|
| |
Field.related.
|
|
|
|
|
|
|
| |
managers in migration
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
|
|
|
|
| |
generators and dict comprehension
|
| |
|
|
|
|
|
|
| |
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
|
|
|
|
| |
expressions
|
|
|
|
| |
by check_related_objects.
|
|
|
|
|
|
| |
OrderedSet.__bool__
This also defines QuerySet.__bool__ for consistency though this should not have any consequence as bool(qs) used to fallback on QuerySet.__len__ in Py3.
|
|
|
|
| |
Thanks Loic Bistuer and Simon Charette for the review.
|
|
|
|
| |
QuerySet.first() and .last()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type conversions
Complete rework of translating data values from database
Deprecation of SubfieldBase, removal of resolve_columns and
convert_values in favour of a more general converter based approach and
public API Field.from_db_value(). Now works seamlessly with aggregation,
.values() and raw queries.
Thanks to akaariai in particular for extensive advice and inspiration,
also to shaib, manfre and timograham for their reviews.
|
|
|
|
| |
inherited models.
|
|
|
|
| |
parameters.
|
| |
|
| |
|
|
|
|
|
|
| |
with select_for_update on Oracle
Thanks Michael Miller for reporting the issue.
|
|
|
|
|
|
|
|
|
| |
The Model.from_db() is intended to be used in cases where customization
of model loading is needed. Reasons can be performance, or adding custom
behavior to the model (for example "dirty field tracking" to issue
automatic update_fields when saving models).
A big thank you to Tim Graham for the review!
|
|
|
|
|
|
|
| |
Models and QuerySets from a different Django version.
Thanks FunkyBob for the suggestion, prasoon2211 for the initial patch,
and akaariai, loic, and charettes for helping in shaping the patch.
|
| |
|
|
|
|
|
|
| |
lookups can refer to former lookups.
Thanks Anssi Kääriäinen and Tim Graham for the reviews. Refs #17001 and #22650.
|
|
|
|
|
|
|
|
|
| |
Regression from f51c1f59 when using select_related then prefetch_related
on the reverse side of an O2O:
Author.objects.select_related('bio').prefetch_related('bio__books')
Thanks Aymeric Augustin for the report and tests. Refs #17001.
|
|
|
|
|
|
|
|
| |
Previously, known related objects overwrote related objects loaded
though select_related. This could cancel the effect of select_related
when it was used over more than one level.
Thanks boxm for the bug report and timo for bisecting the regression.
|
|
|
|
|
|
| |
Thanks Florian Apolloner for noticing the issue and Aymeric
Augustin for the expertise.
Refs #22540.
|
|
|
|
|
|
|
|
| |
create()
So as the save step is centralized in create(), especially useful
when customizing behavior in subclasses.
Thanks craig.labenz@gmail.com for the report.
|
| |
|
|
|
|
| |
deprecation timeline.
|
|
|
|
| |
select_for_update.
|
|
|
|
|
|
|
|
|
|
|
| |
relations
The original patch for custom prefetches didn't allow usage of custom
queryset for single valued relations (along ForeignKey or OneToOneKey).
Allowing these enables calling performance oriented queryset methods like
select_related or defer/only.
Thanks @akaariai and @timgraham for the reviews. Refs #17001.
|