summaryrefslogtreecommitdiff
path: root/django/db/backends/dummy
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-02-16Fixed #35967 -- Deferred test suite fixtures serialization after all dbs setup.Simon Charette
While the top-level objects fed to serialization are bound to the test database being created nothing prevents code invoked during serialization from performing queries against other connections entries that haven't been swapped yet. The reported example of that is a database router directing all reads to a test mirror for a set of models involving auto-created many-to-many fields. It might be tempting to address the many-to-many field case but this a symptom of a larger problem where the test framework yields the flow execution to user code that could interact with non-test databases in unexpected ways. Deferring test database fixture serialization until the point where all connections entries have been swapped for their test equivalent ensures that no code triggered during serialization can interact with non-test databases. Thanks Jake Howard for the report and Jacob Walls for the initial investigation.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-11-10Removed DatabaseIntrospection.get_key_columns().Mariusz Felisiak
Thanks Simon Charette for the report.
2018-10-25Made DatabaseFeatures.uses_savepoints default to True.Tim Graham
2017-02-28Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan
2016-09-26Removed DatabaseError and IntegrityError declarations from database backends.Adam Chainz
Unused since 11ee9746a0530ec38f523fb4de44950d9b783877.
2016-09-08Fixed #27170 -- Added DatabaseWrapper class attributes to ease subclassing.Chris Jerdonek
2015-03-25Fixed #24394 -- Allowed running tests with empty default dictionary.Andrei Kulakov
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-14Fixed #22603 -- Reorganized classes in django.db.backends.Tim Graham
2014-12-29Fixed #22279 -- Prevented dummy backend going through DatabaseErrorWrapperClaude Paroz
Thanks Daniel Hahler for the report and Tim Graham for the review.
2014-03-21Removed legacy transaction management per the deprecation timeline.Aymeric Augustin
2013-07-08A large number of stylistic cleanups across django/db/Alex Gaynor
2013-03-11Deprecated transaction.commit/rollback_unless_managed.Aymeric Augustin
Since "unless managed" now means "if database-level autocommit", committing or rolling back doesn't have any effect. Restored transactional integrity in a few places that relied on automatically-started transactions with a transitory API.
2013-03-11Removed _enter/_leave_transaction_management.Aymeric Augustin
The goal is to make all databases share a common, autocommit-based, implementation.
2013-03-11Added an API to control database-level autocommit.Aymeric Augustin
2013-03-07Added missing method in the dummy database backend.Aymeric Augustin
2013-03-02Reordered methods in database wrappers.Aymeric Augustin
* Grouped related methods together -- with banner comments :/ * Described which methods are intended to be implemented in backends. * Added docstrings. * Used the same order in all wrappers.
2013-01-04Fixed #19192 -- Allowed running tests with dummy db backendClaude Paroz
Thanks Simon Charette for the initial patch, and Jan Bednařík for his work on the ticket.
2012-03-12Fixed #17883. Improved error message for old-style database backends.Paul McMillan
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-07Fixed #3615: Added support for loading fixtures with forward references on ↵Karen Tracey
database backends (such as MySQL/InnoDB) that do not support deferred constraint checking. Many thanks to jsdalton for coming up with a clever solution to this long-standing issue, and to jacob, ramiro, graham_king, and russellm for review/testing. (Apologies if I missed anyone else who helped here.) git-svn-id: http://code.djangoproject.com/svn/django/trunk@16590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-05Fixed #13630 -- Made __init__ methods of all DB backends' DatabaseOperations ↵Ramiro Morales
classes take a `connection` argument. Thanks calexium for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16016 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14Fixed #15293 -- Updated the dummy backend to support the APIs introduced by ↵Russell Keith-Magee
r15493. Thanks to mp for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15528 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-06Fixed #15230 -- added some more attributes to the dummy database backend.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-10Changed a whole bunch of places to raise exception instances instead of ↵Adrian Holovaty
old-style raising exception classes plus a comma. Good for the future Python 3 conversion git-svn-id: http://code.djangoproject.com/svn/django/trunk@12180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-24Fixed #12428: Ensured that the dummy backend is installed correctly on a ↵Russell Keith-Magee
fresh project generated by django-admin.py startproject. Thanks to Simon for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22Fixed #1142 -- Added multiple database support.Russell Keith-Magee
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-12Tweaked the dummy database backend initialisation.Malcolm Tredinnick
In order to report more comphrehensible tracebacks, remove the super() constructor call, since passing args to object.__init__ ends badly. So some subclassing possibilities are now removed, but it's the "dummy" backend, so we can make some compromises. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-03-11Fixed #10459 -- Refactored the internals of database connection objects so ↵Adrian Holovaty
that connections know their own settings and pass around settings as dictionaries instead of passing around the Django settings module itself. This will make it easier for multiple database support. Thanks to Alex Gaynor for the initial patch. This is backwards-compatible but will likely break third-party database backends. Specific API changes are: * BaseDatabaseWrapper.__init__() now takes a settings_dict instead of a settings module. It's called settings_dict to disambiguate, and for easy grepability. This should be a dictionary containing DATABASE_NAME, etc. * BaseDatabaseWrapper has a settings_dict attribute instead of an options attribute. BaseDatabaseWrapper.options is now BaseDatabaseWrapper['DATABASE_OPTIONS'] * BaseDatabaseWrapper._cursor() no longer takes a settings argument. * BaseDatabaseClient.__init__() now takes a connection argument (a DatabaseWrapper instance) instead of no arguments. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10026 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11Removed some empty modules that are no longer required after [8296].Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8301 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11Fixed #5461 -- Refactored the database backend code to use classes for the ↵Russell Keith-Magee
creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-25Fixed #5255 -- It's now possible again to use Django without a database. ↵Adrian Holovaty
This had temporarily gotten buggy after the django.core.management refactoring last week git-svn-id: http://code.djangoproject.com/svn/django/trunk@6002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Made various negligible formatting cleanups to the database backendsAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5983 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Refactored OPERATOR_MAPPING so that it exists as ↵Adrian Holovaty
django.db.connection.operators instead of django.db.backend.OPERATOR_MAPPING. Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Implemented BaseDatabaseFeatures and changed all code to access it -- ↵Adrian Holovaty
connection.features.foo instead of backend.foo git-svn-id: http://code.djangoproject.com/svn/django/trunk@5974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Removed backend.dictfetchall(), as it wasn't being used anywhereAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5970 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Removed backend.dictfetchmany(), as it wasn't being used anywhereAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Removed backend.dictfetchone(), as it wasn't being used anywhereAdrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5968 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Refactored quote_name() to DatabaseOperations.quote_name(). Refs #5106Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Refactored get_start_transaction_sql() to ↵Adrian Holovaty
DatabaseOperations.start_transaction_sql(). Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Refactored get_sql_sequence_reset() to ↵Adrian Holovaty
DatabaseOperations.sequence_reset_sql(). Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Refactored get_sql_flush() to DatabaseOperations.sql_flush(). Refs #5106Adrian Holovaty
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5963 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-20Refactored get_random_function_sql() to ↵Adrian Holovaty
DatabaseOperations.random_function_sql(). Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5962 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19Refactored get_pk_default_value() to DatabaseOperations.pk_default_value(). ↵Adrian Holovaty
Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5961 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19Refactored get_max_name_length() to DatabaseOperations.max_name_length(). ↵Adrian Holovaty
Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19Refactored get_limit_offset_sql() to DatabaseOperations.limit_offset_sql(). ↵Adrian Holovaty
Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19Refactored get_last_insert_id() to DatabaseOperations.last_insert_id(). Refs ↵Adrian Holovaty
#5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5958 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-08-19Refactored get_fulltext_search_sql() to ↵Adrian Holovaty
DatabaseOperations.fulltext_search_sql(). Refs #5106 git-svn-id: http://code.djangoproject.com/svn/django/trunk@5957 bcc190cf-cafb-0310-a4f2-bffc1f526a37