| Age | Commit message (Collapse) | Author |
|
|
|
|
|
It was mainly for MySQL on Python 3, but now the current
recommended MySQL driver for Python 3 (mysqlclient) does support
binary fields, it is unneeded. Refs #20377.
|
|
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.
|
|
refs #22340.
|
|
This reduces how frequently this logic is run significantly.
Thanks to Anssi for the suggestion.
|
|
Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than
storing as a NUMBER(19) of microseconds.
There are issues with cx_Oracle which require some extra data
manipulation in the database backend when constructing queries, but it
handles the conversion back to timedelta objects cleanly.
Thanks to Shai for the review.
|
|
A field for storing periods of time - modeled in Python by timedelta. It
is stored in the native interval data type on PostgreSQL and as a bigint
of microseconds on other backends.
Also includes significant changes to the internals of time related maths
in expressions, including the removal of DateModifierNode.
Thanks to Tim and Josh in particular for reviews.
|
|
Refs #20968. Allow querying template_postgis presence without
existing test database.
Thanks Tim Graham for the review.
|
|
|
|
Thanks Kenial S. Lee for the initial patch and Tim Graham for
the review.
|
|
comprehension
|
|
Thanks Collin Anderson for the review.
|
|
Oracle
Thanks Claude Paroz for partial fix and Simon Charrette for review
|
|
Thanks maxi for the report, Shai Berger for his help with the patch
and Tim Graham for the review.
|
|
|
|
Thanks rodolfo_3 for the report and the initial patch, and
Josh Smeaton, Shai Berger and Tim Graham for the reviews.
|
|
|
|
refs #23395.
|
|
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.
|
|
Refs #22632. This should be the base for using more database
features to exclude specific backends in GIS tests.
Thanks Tim Graham for the review.
|
|
|
|
select_for_update on Oracle
Thanks Michael Miller for reporting the issue.
|
|
Thanks Chow Loong Jin for the report and the initial patch.
|
|
the behavior.
|
|
|
|
|
|
is within limits of the database.
Thanks russellm for report and Tim Graham for review.
|
|
supports_column_check_constraints.
Thanks maxi for the suggestion.
|
|
|
|
This is achieved by inserting a fake entry in connection.queries when
not releasing a savepoint (since Oracle doesn't support that operation.)
Also removed the can_release_savepoints feature that was recently added,
but is superseded by this solution.
|
|
Turned it from a tri-valued boolean into a regular boolean.
|
|
|
|
Prevented unlimited memory consumption when running background tasks
with DEBUG=True.
Thanks Rob, Alex, Baptiste, and others.
|
|
Forward-port of c9aedce0 from stable/1.7.x.
|
|
Previously this was conflated with another Oracle-specific behavior.
|
|
|
|
|
|
In django.db.backends.BaseDatabaseWrapper, pulled the creation of
cursors in the non-debug case into a separate method, in order to
make behavior more consistent when overriding the cursor creation
in derived classes.
|
|
Thanks Shai for the thorough review.
|
|
|
|
Oracle and SQL Server don't have exactly the same limitations. It's
worth treating them differently.
|
|
|
|
|
|
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.
Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.
sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.
Many people contributed to both tickets, thank you all, and especially
Claude for the review.
Refs #22401.
|
|
|
|
Forwardport of 9bbb43dd1a from stable/1.7.x
|
|
Refs #15802 -- Reverted #7c657b24 as BaseDatabaseWrapper.close() now
has a proper "finally" clause that may need to preserve self.connection.
|
|
|
|
Thanks to @timgraham for the review.
|