summaryrefslogtreecommitdiff
path: root/django/db/backends/base
AgeCommit message (Collapse)Author
2019-09-09Fixed #28107 -- Added ↵Vojtech Bocek
DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling optimization for unmanaged models.
2019-09-09Refs #29444 -- Allowed returning multiple fields from INSERT statements on ↵Johannes Hoppe
PostgreSQL. Thanks Florian Apolloner, Tim Graham, Simon Charette, Nick Pope, and Mariusz Felisiak for reviews.
2019-08-29Fixed #25367 -- Allowed boolean expressions in QuerySet.filter() and exclude().Matthew Schinckel
This allows using expressions that have an output_field that is a BooleanField to be used directly in a queryset filters, or in the When() clauses of a Case() expression. Thanks Josh Smeaton, Tim Graham, Simon Charette, Mariusz Felisiak, and Adam Johnson for reviews. Co-Authored-By: NyanKiyoshi <hello@vanille.bid>
2019-08-22Fixed #30712 -- Allowed BLOB/TEXT defaults on MySQL 8.0.13+.Nasir Hussain
2019-08-21Fixed #21039 -- Added AddIndexConcurrently/RemoveIndexConcurrently ↵Mads Jensen
operations for PostgreSQL. Thanks to Simon Charettes for review. Co-Authored-By: Daniel Tao <daniel.tao@gmail.com>
2019-08-20Fixed #29979, Refs #17337 -- Extracted AutoField field logic into a mixin ↵Nick Pope
and refactored AutoFields. This reduces duplication by allowing AutoField, BigAutoField and SmallAutoField to inherit from IntegerField, BigIntegerField and SmallIntegerField respectively. Doing so also allows for enabling the max_length warning check and minimum/maximum value validation for auto fields, as well as providing a mixin that can be used for other possible future auto field types such as a theoretical UUIDAutoField.
2019-08-13Refs #25367 -- Moved Oracle Exists() handling to contextual methods.Simon Charette
Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in the following cases. 1. When part of a SELECT clause. 2. When part of a ORDER BY clause. 3. When compared against another expression in the WHERE clause. This commit moves the systematic CASE WHEN wrapping of Exists.as_oracle to contextual .select_format, Lookup.as_oracle, and OrderBy.as_oracle methods in order to avoid unnecessary wrapping.
2019-08-12Refs #23879 -- Made introspection respect required_db_features.Simon Charette
2019-08-02Fixed #30661 -- Added models.SmallAutoField.Nick Pope
2019-08-02Removed obsolete mentions of a check constraint in ↵Mariusz Felisiak
BaseDatabaseSchemaEditor.add_constraint()/remove_constraint() docstrings.
2019-07-19Fixed #30593 -- Added support for check constraints on MariaDB 10.2+.Hasan Ramezani
2019-07-08Refs #29444 -- Added support for fetching a returned non-integer insert ↵Johannes Hoppe
values on Oracle. This is currently not actively used, since the ORM will ask the SQL compiler to only return auto fields.
2019-07-02Fixed typos in comments and docs.Min ho Kim
2019-06-20Fixed #30451 -- Added ASGI handler and coroutine-safety.Andrew Godwin
This adds an ASGI handler, asgi.py file for the default project layout, a few async utilities and adds async-safety to many parts of Django.
2019-05-08Used time.monotonic() instead of time.time() where applicable.Przemysław Suliga
time.monotonic() available from Python 3.3: - Nicely communicates a narrow intent of "get a local system monotonic clock time" instead of possible "get a not necessarily accurate Unix time stamp because it needs to be communicated to outside of this process/machine" when time.time() is used. - Its result isn't affected by the system clock updates. There are two classes of time.time() uses changed to time.monotonic() by this change: - measuring time taken to run some code. - setting and checking a "close_at" threshold for for persistent db connections (django/db/backends/base/base.py).
2019-05-07Fixed #30444 -- Moved SQL generation for tables to ↵Rob Golding-Day
BaseDatabaseSchemaEditor.table_sql().
2019-04-18Fixed typos in docs, comments, and exception messages.Ville Skyttä
2019-03-17Refs #30172 -- Prevented removing a model Meta's index/unique_together from ↵Paveł Tyślacki
removing Meta constraints/indexes.
2019-03-17Refs #30172 -- Prevented removing a field's check or unique constraint from ↵Paveł Tyślacki
removing Meta constraints.
2019-03-09Fixed #30242 -- Removed extra space before LIMIT/OFFSET SQL.Hang Park
2019-02-14Fixed #30171 -- Fixed DatabaseError in servers tests.Jon Dufresne
Made DatabaseWrapper thread sharing logic reentrant. Used a reference counting like scheme to allow nested uses. The error appeared after 8c775391b78b2a4a2b57c5e89ed4888f36aada4b.
2019-02-13Fixed #30184 -- Removed ellipsis characters from shell output strings.Dan Davis
Partially reverted 50b8493581fea3d7137dd8db33bac7008868d23a (refs #29654) to avoid a crash when the user shell doesn't support non-ASCII characters.
2019-02-09Refs #26608 -- Added a database feature for fixed frame range distance support.Simon Charette
2019-02-06Refs #27753 -- Favored force/smart_str() over force/smart_text().Aymeric Augustin
2019-01-30Refs #29444 -- Renamed DatabaseFeatures.can_return_id* to be generic for ↵Johannes Hoppe
other columns.
2019-01-30Fixed #30116 -- Dropped support for Python 3.5.Tim Graham
2019-01-29Fixed #30108 -- Allowed adding foreign key constraints in the same statement ↵Dan Tao
that adds a field.
2019-01-12Fixed #30062 -- Added support for unique conditional constraints.Paveł Tyślacki
2019-01-12Used None as the empty value for condition in Index's SQL construction.Paveł Tyślacki
2019-01-10Renamed variables after generalization of constraints.Paveł Tyślacki
Follow up to 8eae094638acf802c8047b341d126d94bc9b45a3.
2019-01-09Refs #23748 -- Added AutoField introspection for SQLite.Nick Pope
2019-01-03Fixed typo in django/db/backends/base/features.py.Mariusz Felisiak
2019-01-01Fixed #30060 -- Moved SQL generation for indexes and constraints to ↵Paveł Tyślacki
SchemaEditor.
2018-12-26Refs #29547 -- Skipped an unsupported partial index test on older versions ↵Tim Graham
of SQLite. Follow up to e5b8626c0eb223cc3d643163882c5902c40ec972.
2018-12-24Fixed #30056 -- Added SQLite support for StdDev and Variance functions.Nick Pope
2018-12-22Renamed SQLite3 references to to SQLite.Simon Charette
The version suffix isn't part of the product name.
2018-12-06Fixed #29932 -- Fixed combining compound queries with sub-compound queries ↵Mariusz Felisiak
on SQLite and Oracle.
2018-11-26Refs #29722 -- Added introspection of materialized views for Oracle.Mariusz Felisiak
Thanks Tim Graham for the review.
2018-11-21Fixed #29949 -- Refactored db introspection identifier converters.Mariusz Felisiak
Removed DatabaseIntrospection.table_name_converter()/column_name_converter() and use instead DatabaseIntrospection.identifier_converter(). Removed DatabaseFeatures.uppercases_column_names. Thanks Tim Graham for the initial patch and review and Simon Charette for the review.
2018-11-20Changed BaseDatabaseSchemaEditor._effective_default() to staticmethod.Tim Graham
Follow up to 9cac10eee49eae3bbf7bd133ba0ae931b275324c.
2018-11-17Added BaseDatabaseSchemaEditor._effective_default() to allow testing without ↵Tim Graham
a connection.
2018-11-17Fixed #29505 -- Removed SchemaEditor's calling of callable defaults.Tim Graham
Thanks Eugene Pakhomov for the suggested fix.
2018-11-13Refs #29641 -- Refactored database schema constraint creation.Simon Charette
Added a test for constraint names in the database. Updated SQLite introspection to use sqlparse to allow reading the constraint name for table check and unique constraints. Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-09Fixed #29934 -- Added sqlparse as a require dependency.Tim Graham
2018-10-29Fixed #29547 -- Added support for partial indexes.Mads Jensen
Thanks to Ian Foote, Mariusz Felisiak, Simon Charettes, and Markus Holtermann for comments and feedback.
2018-10-25Refs #27025 -- Removed obsolete sqlite3 transaction management workaround ↵Tim Graham
for Python 3.6+. Obsolete per https://bugs.python.org/issue10740#msg274816.
2018-10-25Made DatabaseFeatures.uses_savepoints default to True.Tim Graham
2018-10-21Fixed #29870 -- Added DurationField introspection for Oracle and PostgreSQL.Mariusz Felisiak
Thanks Tim Graham for the review.
2018-10-02Added django.db.backends.utils.names_digest() to remove redundant code.Jon Dufresne
2018-10-01Fixed #29767 -- Made date-related casts work on SQLiteClaude Paroz
Thanks Rémy Hubscher for the report and Tim Graham and Simon Charette for the reviews.