Mariusz Felisiak
328f5627dd
Fixed #29870 -- Added DurationField introspection for Oracle and PostgreSQL.
...
Thanks Tim Graham for the review.
2018-10-21 09:08:05 +02:00
Florian Apolloner
bc7dd8490b
Fixed #21171 -- Avoided starting a transaction when a single (or atomic queries) are executed.
...
Checked the following locations:
* Model.save(): If there are parents involved, take the safe way and use
transactions since this should be an all or nothing operation.
If the model has no parents:
* Signals are executed before and after the previous existing
transaction -- they were never been part of the transaction.
* if `force_insert` is set then only one query is executed -> atomic
by definition and no transaction needed.
* same applies to `force_update`.
* If a primary key is set and no `force_*` is set Django will try an
UPDATE and if that returns zero rows it tries an INSERT. The first
case is completly save (single query). In the second case a
transaction should not produce different results since the update
query is basically a no-op then (might miss something though).
* QuerySet.update(): no signals issued, single query -> no transaction
needed.
* Model/Collector.delete(): This one is fun due to the fact that is
does many things at once.
Most importantly though: It does send signals as part of the
transaction, so for maximum backwards compatibility we need to be
conservative.
To ensure maximum compatibility the transaction here is removed only
if the following holds true:
* A single instance is being deleted.
* There are no signal handlers attached to that instance.
* There are no deletions/updates to cascade.
* There are no parents which also need deletion.
2018-10-17 12:19:02 +02:00
Mariusz Felisiak
f2e2a1bd4b
Fixed #29845 -- Fixed Cast crash on MySQL when casting to DecimalField.
2018-10-15 15:57:22 +02:00
Mariusz Felisiak
a3052c35d1
Fixed various comments in django/db/backends/oracle/base.py.
2018-10-13 20:25:23 +02:00
Mariusz Felisiak
52fec5d18f
Fixed #29836 -- Bumped required cx_Oracle to 6.0.
2018-10-11 11:43:16 +02:00
Sergey Fedoseev
3957f767bb
Simplified handling of DurationField values on MySQL/MariaDB.
2018-10-09 10:38:42 -04:00
Jon Dufresne
efd8a82e26
Refs #27795 -- Removed force_bytes() usage in MySQL backend.
...
The mysqlclient cursor attribute `_last_executed` is always stored as
bytes. Decode it.
TextField values are already type str. No need to decode.
2018-10-03 10:37:36 +02:00
Nick Pope
bf8b625a3b
Refs #29722 -- Added introspection of materialized views for PostgreSQL.
2018-10-02 14:02:04 -04:00
Nick Pope
45ef3df7d0
Fixed #29719 -- Added introspection of foreign tables for PostgreSQL.
...
Thanks infinite-l00p for the initial patch.
2018-10-02 14:01:24 -04:00
Jon Dufresne
0bf7b25f8f
Added django.db.backends.utils.names_digest() to remove redundant code.
2018-10-02 10:41:43 -04:00
Jon Dufresne
c37b844349
Fixed ResourceWarning in MySQL's _clone_test_db().
2018-10-02 10:23:21 -04:00
Claude Paroz
fc3a463048
Fixed #29767 -- Made date-related casts work on SQLite
...
Thanks Rémy Hubscher for the report and Tim Graham and Simon Charette for the reviews.
2018-10-01 13:27:30 +02:00
Mariusz Felisiak
024abe5b82
Fixed #29630 -- Fixed crash of sliced queries with multiple columns with the same name on Oracle 12.1.
...
Regression in 0899d583bd
.
Thanks Tim Graham for the review and Jani Tiainen for help.
2018-09-26 20:18:48 +02:00
Mariusz Felisiak
90d93a1b42
Made DatabaseWrapper.oracle_version() return a full version tuple.
2018-09-26 08:51:27 +02:00
Jon Dufresne
82f286cf6f
Refs #29784 -- Switched to https:// links where available.
2018-09-26 08:48:47 +02:00
Oleg
d1d5c97bc2
Fixed #29778 -- Fixed quoting of unique index names.
...
Regression in 3b429c9673
.
2018-09-25 16:00:20 -04:00
Jon Dufresne
abeed587b1
Refs #27795 -- Removed force_bytes() usage in db/backends/base/schema.py.
2018-09-25 09:54:06 -04:00
Jon Dufresne
1d65ddd9c3
Refs #27795 -- Removed force_bytes() usage in db/backends/utils.py.
2018-09-25 09:53:13 -04:00
Tom Forbes
9cbdb44014
Fixed #23646 -- Added QuerySet.bulk_update() to efficiently update many models.
2018-09-18 16:14:44 -04:00
Claude Paroz
f5e347a640
Fixed #27899 -- Added support for phrase/raw searching in SearchQuery.
...
Thanks Tim Graham, Nick Pope, and Claude Paroz for contribution and review.
2018-09-17 12:03:52 -04:00
Mariusz Felisiak
da92ec7962
Fixed #29759 -- Fixed crash on Oracle when fetching a returned insert id with cx_Oracle 7.
2018-09-16 12:45:34 +02:00
Nick Pope
f87f9c5f63
Simplified introspection methods for PostgreSQL.
2018-09-14 14:34:43 -04:00
Srinivas Reddy Thatiparthy
34d6bceec4
Fixed #29500 -- Fixed SQLite function crashes on null values.
...
Co-authored-by: Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2018-09-10 15:08:55 -04:00
Nick Pope
76dfa834e7
Combined two identical SQLite functions.
2018-09-10 14:41:58 -04:00
Nick Pope
af7a758dcb
Made some date parsing in SQLite functions more DRY.
2018-09-10 14:41:20 -04:00
Jon Dufresne
5311a36da5
Refs #29654 -- Replaced three dots with ellipsis in DB creation output strings.
2018-08-28 07:56:34 -04:00
Claude Paroz
50b8493581
Refs #29654 -- Replaced three dots with ellipsis character in output strings.
2018-08-22 09:13:58 -04:00
Sigurd Ljødal
3e09b37f80
Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup.
2018-08-18 13:09:15 -04:00
Jon Dufresne
bf17f5e884
Refs #29015 -- Added database name to PostgreSQL database name too long exception.
2018-08-17 12:43:56 -04:00
Tom
f1fbef6cd1
Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts.
2018-08-03 17:40:46 -04:00
Mariusz Felisiak
1a9cbf41a1
Fixed #29613 -- Fixed --keepdb on PostgreSQL if the database exists and the user can't create databases.
...
Regression in e776dd2db6
.
Thanks Tim Graham for the review.
2018-08-03 10:31:55 +02:00
Nick Pope
6b4d1ec8ff
Fixed #29614 -- Added BTreeIndex to django.contrib.postres.
2018-08-02 11:42:57 -04:00
Nick Pope
d6381d3559
Fixed #28990 -- Added autosummarize parameter to BrinIndex.
2018-08-02 11:26:58 -04:00
Tom Forbes
4198445afc
Refs #29548 -- Fixed failing window tests on MariaDB 10.3.
2018-07-30 19:54:56 -04:00
Andrew Brown
c0e3c65b9d
Fixed #29563 -- Added result streaming for QuerySet.iterator() on SQLite.
2018-07-25 18:08:57 -04:00
Mariusz Felisiak
ac25dd1f8d
Fixed #29569 -- Fixed Cast() with AutoField and BigAutoField.
2018-07-25 08:00:11 +02:00
Claude Paroz
65503ca097
Fixed #29040 -- Made test database creation messages use a consistent output stream.
2018-07-19 18:05:33 -04:00
Oliver Sauder
a07a49ee32
Fixed #29559 -- Fixed TransactionTestCase.reset_sequences for auto-created m2m through models.
2018-07-11 17:20:29 -04:00
Ian Foote
952f05a6db
Fixed #11964 -- Added support for database check constraints.
2018-07-10 15:32:33 -04:00
Sergey Fedoseev
6fbfb5cb96
Removed Oracle's fetchmany() and fetchall() wrappers.
...
Follow up to e06cab2600
.
2018-07-10 15:03:09 -04:00
Tom Forbes
45c035c823
Refs #29548 -- Fixed non-GIS test failures on MariaDB.
2018-07-09 14:59:42 -04:00
Michal Čihař
39e287d8bf
Fixed #29544 -- Fixed regex lookup on MariaDB.
...
Regression in 4249076844
.
2018-07-05 12:11:49 -04:00
Junyi Jiao
a0b19a0f5b
Refs #28643 -- Added math database functions.
...
Thanks Nick Pope for much review.
2018-07-05 11:02:12 -04:00
Mariusz Felisiak
d7d32964ef
Fixed #29541 -- Fixed Cursor.execute() crash when setinputsizes() is called without arguments wit cx_Oracle 6.4.
2018-07-04 12:57:29 -04:00
Tim Graham
4009e1f2ab
Removed unused code in django.db.backends.utils.format_number().
2018-07-02 16:10:35 -04:00
Sergey Fedoseev
b49b59b029
Simplified SQLite's Decimal adapter.
2018-07-02 13:36:40 -04:00
Ian Foote
38cada7c94
Fixed #28077 -- Added support for PostgreSQL opclasses in Index.
...
Thanks Vinay Karanam for the initial patch.
2018-06-29 17:00:28 -04:00
Thomas Grainger
4fba321a45
Fixed #29480 -- Made MySQL backend retrieve constraint columns in their defined order.
2018-06-29 10:43:53 -04:00
Tim Graham
b9cf764be6
Fixed #29517 -- Added support for SQLite column check constraints on positive integer fields.
2018-06-25 14:01:04 -04:00
Tom
4249076844
Refs #29451 -- Fixed regex/iregex lookups on MySQL 8.
2018-06-20 10:57:28 -04:00