| Age | Commit message (Collapse) | Author |
|
and extra() against SQL injection in column aliases on MySQL/MariaDB.
Thanks sw0rd1ight for the report.
Follow up to 93cae5cb2f9a4ef1514cf1a41f714fef08005200.
|
|
Thanks to Jacob Walls and Simon Charette for their input.
co-authored-by: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com>
|
|
Thanks Simon Charette for the implementation idea.
|
|
PostgreSQL 18+.
|
|
Now that the setup is a bit more expensive, it makes sense to return earlier
for the empty case.
|
|
.values_list().
co-authored-by: Adam Johnson <me@adamj.eu>
co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
|
|
when keep_parents=True.
Signed-off-by: saJaeHyukc <wogur981208@gmail.com>
|
|
ManyToManyField was already excluded from fields, concrete_fields,
and local_concrete_fields in Options.
|
|
Follow-up to cb13792938f2c887134eb6b5164d89f8d8f9f1bd. Refs #34437.
|
|
MySQL only supports the ->> when used directly against columns, this can be
inferred by the presence of lhs.output_field.model as model bounds fields are
directly tied to columns.
Purposely don't systematically switch to using JSON_QUOTE(JSON_EXTRACT(...))
as there might be functional indices out there that rely on the SQL remaining
stable between versions.
Thanks Jacob Tavener for the report.
|
|
migrations autodetector.
This was creating an unusable Q object solely to call
referenced_base_fields on it.
|
|
Thanks Clifford Gama for the report.
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
|
|
Follow-up to 8ede411a81b40ca53362e6788601193c7e56a0cf.
|
|
via ForeignObject.
|
|
even if a value is set.
The logic could likely be adjusted to assign the pre_save value in most cases
to avoid the database transit but it could break in subtle ways so it's not
worth the complexity it would require.
Regression in 94680437a45a71c70ca8bd2e68b72aa1e2eff337.
Co-authored-by: Tim Graham <timograham@gmail.com>
|
|
|
|
prefetch_related_objects().
Thanks Sarah Boyce for the review.
|
|
Follow-up to 94680437a45a71c70ca8bd2e68b72aa1e2eff337.
|
|
ForeignObject.
Follow-up to e44e8327d3d88d86895735c0e427102063ff5b55. Refs #36222.
|
|
Removed the can_return_columns_from_insert skip gates on existing
field_defaults tests to confirm the expected number of queries are
performed and that returning field overrides are respected.
|
|
This required implementing UPDATE RETURNING machinery that heavily
borrows from the INSERT one.
|
|
|
|
FieldError is now emitted for invalid update calls involving reverse
relations, where previously they failed with AttributeError.
|
|
column aliases.
Thanks Eyal Gabay (EyalSec) for the report.
|
|
values()/values_list().
Thanks Jacob Walls and Simon Charette for tests.
Signed-off-by: SaJH <wogur981208@gmail.com>
|
|
values().
|
|
Renamed existing methods and abstractions used for INSERT … RETURNING
to be generic enough to be used in the context of UPDATEs as well.
This also consolidates SQL compliant implementations on
BaseDatabaseOperations.
|
|
BaseDatabaseOperations.return_insert_columns()/fetch_returned_insert_rows().
|
|
Determining if a field is db_returning based on the default connection
feature availability prevents the usage of RETURNING for db_default
fields in setups where non-default backends do support RETURNING.
Whether or not the field should be attempted to be returned is already
checked at the compiler level which is backend aware.
|
|
QuerySet.in_bulk().
|
|
operations on SQLite.
|
|
Whether or not returning_fields should be specified to _insert is not a
function of each batches so the conditional can be moved outside of the loop.
|
|
When dealing with an heterogeneous set of object with regards to primary key
assignment that fits in a single batch there's no need to wrap the single
INSERT statement in a transaction.
|
|
OneToOneField uses the type of the related field.
|
|
Subquery.resolve_expression().
Regression in fd569dd45bf0746378faf7f65172497f21ed27f0.
|
|
against composite pks.
Follow-up to 8561100425876bde3be4b2a22324655f74ff9609.
Co-authored-by: Simon Charette <charette.s@gmail.com>
|
|
CompositePrimaryKey on either side.
Thanks to Jacob Walls for the report.
|
|
|
|
This allows the proper resolving of lookups when performing constraint
validation involving Q and Case objects.
Thanks Andrew Roberts for the report and Sarah for the tests and review.
|
|
|
|
expressions.
Thanks Jacob Walls for the report, and Sarah Boyce and Mariusz Felisiak
for reviews.
|
|
GeneratedField.expression.
Thanks to Simon Charette for the suggestion and review.
|
|
their base fields.
Thanks to Colton Saska for the report and to Simon Charette for the review.
|
|
Manually reformatted some comments and docstrings where autofix_w505.py
changed the meaning of the formatting.
|
|
Rewrapped long docstrings and block comments to 79 characters + newline
using script from https://github.com/medmunds/autofix-w505.
|
|
Manually reformatted some long docstrings and comments that would be
damaged by the to-be-applied autofixer script, in cases where editorial
judgment seemed necessary for style or wording changes.
|
|
|
|
indirect ancestors.
When looking for cached values in ManyRelatedManager and
ForwardManyToOneDescriptor walk up the whole chain of ancestors
(as long as they are cached) to find the prefetched relation.
|
|
PostgreSQL.
Regression in 764af7a3d6c0b543dcf659a2c327f214da768fe4.
|