summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3
AgeCommit message (Collapse)Author
2013-09-06Adding 'sqlmigrate' command and quote_parameter to support it.Andrew Godwin
2013-09-06Fixed #10164 -- Made AutoField increase monotonically on SQLiteChris Wilson
Thanks malte for the report.
2013-09-02Replaced "not PY3" by "PY2", new in six 1.4.0.Aymeric Augustin
2013-08-30Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette
2013-08-29Fixed #20989 -- Removed explicit list comprehension inside dict() and tuple()Tim Graham
Thanks jeroen.pulles at redslider.net for the suggestion and helper script.
2013-08-29Fixed #20984 -- Stopped decoding bytes in sqlite3 adapter on Python 3Claude Paroz
Thanks lvella at gmail.com for the report.
2013-08-11Support index_together during model creationAndrew Godwin
2013-08-09Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/core/management/commands/flush.py django/core/management/commands/syncdb.py django/db/models/loading.py docs/internals/deprecation.txt docs/ref/django-admin.txt docs/releases/1.7.txt
2013-07-27Fixed a number of minor misspellings.Julien Phalip
2013-07-22Merge branch 'master' into schema-alterationAndrew Godwin
Conflicts: django/db/backends/mysql/introspection.py django/db/backends/oracle/creation.py django/db/backends/postgresql_psycopg2/creation.py django/db/models/base.py django/db/models/loading.py
2013-07-08A large number of stylistic cleanups across django/db/Alex Gaynor
2013-07-02Make get_constraints return columns in orderAndrew Godwin
2013-07-02Merge branch 'master' into schema-alterationAndrew Godwin
2013-07-01Removed some conditional code only needed under Python 2.6.Aymeric Augustin
2013-06-28Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/db/backends/__init__.py django/db/models/fields/related.py tests/field_deconstruction/tests.py
2013-06-28Support 'pyformat' style parameters in raw queries, Refs #10070Shai Berger
Add support for Oracle, fix an issue with the repr of RawQuerySet, add tests and documentations. Also added a 'supports_paramstyle_pyformat' database feature, True by default, False for SQLite. Thanks Donald Stufft for review of documentation.
2013-06-26Fixed #20462 - Replaced the str() cast introduced in 273dc55 by force_text()Loic Bistuer
2013-06-26Fixed #20462 -- null/non-string regex lookups are now consistentAndrew Clark
Thanks to noirbizarre for the report and initial patch.
2013-06-22Fixed #20587 -- Made convert_values handle None valuesGilberto Gonçalves
2013-06-19Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/db/models/loading.py
2013-06-11Revert "Fixed #20462 - Fixed sqlite regex lookups for null values and ↵Tim Graham
non-string fields." This reverts commit 64041f0e6e7a773574d7cde978d16305200004ea. lookup.tests.LookupTests.test_regex_non_string fails under Postgres. We should also try to rewrite the test using an existing model.
2013-06-11Fixed #20462 - Fixed sqlite regex lookups for null values and non-string fields.Axel Haustant
2013-06-10Added a stealth option to flush to allow cascades.Aymeric Augustin
This allows using flush on a subset of the tables without having to manually cascade to all tables with foreign keys to the tables being truncated, when they're known to be empty. On databases where truncate is implemented with DELETE FROM, this doesn't make a difference. The cascade is allowed, not mandatory.
2013-05-29Start adding operations that work and tests for themAndrew Godwin
2013-05-09Split out a BaseAppCache, make AppCache borg again, add _meta.app_cacheAndrew Godwin
2013-04-18Merge branch 'master' into schema-alterationAndrew Godwin
Conflicts: django/db/backends/__init__.py django/db/backends/mysql/base.py django/db/backends/oracle/base.py django/db/backends/oracle/creation.py django/db/backends/postgresql_psycopg2/base.py django/db/backends/sqlite3/base.py django/db/models/fields/related.py
2013-03-23Fixed #9055 -- Standardized behaviour of parameter escaping in db cursorsClaude Paroz
Previously, depending on the database backend or the cursor type, you'd need to double the percent signs in the query before passing it to cursor.execute. Now cursor.execute consistently need percent doubling whenever params argument is not None (placeholder substitution will happen). Thanks Thomas Güttler for the report and Walter Doekes for his work on the patch.
2013-03-11Implemented an 'atomic' decorator and context manager.Aymeric Augustin
Currently it only works in autocommit mode. Based on @xact by Christophe Pettus.
2013-03-11Added support for savepoints in SQLite.Aymeric Augustin
Technically speaking they aren't usable yet.
2013-03-11Added an API to control database-level autocommit.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-03-02Add introspection support for BinaryFieldClaude Paroz
2013-03-02Add a BinaryField model fieldClaude Paroz
Thanks Michael Jung, Charl Botha and Florian Apolloner for review and help on the patch.
2013-02-28Implemented persistent database connections.Aymeric Augustin
Thanks Anssi Kääriäinen and Karen Tracey for their inputs.
2013-02-27Refactored database exceptions wrapping.Aymeric Augustin
Squashed commit of the following: commit 2181d833ed1a2e422494738dcef311164c4e097e Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 27 14:28:39 2013 +0100 Fixed #15901 -- Wrapped all PEP-249 exceptions. commit 5476a5d93c19aa2f928c497d39ce6e33f52694e2 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Tue Feb 26 17:26:52 2013 +0100 Added PEP 3134 exception chaining. Thanks Jacob Kaplan-Moss for the suggestion. commit 9365fad0a650328002fb424457d675a273c95802 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Tue Feb 26 17:13:49 2013 +0100 Improved API for wrapping database errors. Thanks Alex Gaynor for the proposal. commit 1b463b765f2826f73a8d9266795cd5da4f8d5e9e Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Tue Feb 26 15:00:39 2013 +0100 Removed redundant exception wrapping. This is now taken care of by the cursor wrapper. commit 524bc7345a724bf526bdd2dd1bcf5ede67d6bb5c Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Tue Feb 26 14:55:10 2013 +0100 Wrapped database exceptions in the base backend. This covers the most common PEP-249 APIs: - Connection APIs: close(), commit(), rollback(), cursor() - Cursor APIs: callproc(), close(), execute(), executemany(), fetchone(), fetchmany(), fetchall(), nextset(). Fixed #19920. commit a66746bb5f0839f35543222787fce3b6a0d0a3ea Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Tue Feb 26 14:53:34 2013 +0100 Added a wrap_database_exception context manager and decorator. It re-throws backend-specific exceptions using Django's common wrappers.
2013-02-18Factored out common code in database backends.Aymeric Augustin
2013-02-18Removed an unecessary function.Aymeric Augustin
It was introduced by the refactoring in 5a4e63e6 and made redundant by the refactoring in 18934677.
2013-02-16Fixed #17260 -- Added time zone aware aggregation and lookups.Aymeric Augustin
Thanks Carl Meyer for the review. Squashed commit of the following: commit 4f290bdb60b7d8534abf4ca901bd0844612dcbda Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 21:21:30 2013 +0100 Used '0:00' instead of 'UTC' which doesn't always exist in Oracle. Thanks Ian Kelly for the suggestion. commit 01b6366f3ce67d57a58ca8f25e5be77911748638 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 13:38:43 2013 +0100 Made tzname a parameter of datetime_extract/trunc_sql. This is required to work around a bug in Oracle. commit 924a144ef8a80ba4daeeafbe9efaa826566e9d02 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Wed Feb 13 14:47:44 2013 +0100 Added support for parameters in SELECT clauses. commit b4351d2890cd1090d3ff2d203fe148937324c935 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 22:30:22 2013 +0100 Documented backwards incompatibilities in the two previous commits. commit 91ef84713c81bd455f559dacf790e586d08cacb9 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 09:42:31 2013 +0100 Used QuerySet.datetimes for the admin's date_hierarchy. commit 0d0de288a5210fa106cd4350961eb2006535cc5c Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 09:29:38 2013 +0100 Used QuerySet.datetimes in date-based generic views. commit 9c0859ff7c0b00734afe7fc15609d43d83215072 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:25 2013 +0100 Implemented QuerySet.datetimes on Oracle. commit 68ab511a4ffbd2b811bf5da174d47e4dd90f28fc Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:14 2013 +0100 Implemented QuerySet.datetimes on MySQL. commit 22d52681d347a8cdf568dc31ed032cbc61d049ef Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:42:29 2013 +0100 Implemented QuerySet.datetimes on SQLite. commit f6800fd04c93722b45f9236976389e0b2fe436f5 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:43:03 2013 +0100 Implemented QuerySet.datetimes on PostgreSQL. commit 0c829c23f4cf4d6804cadcc93032dd4c26b8c65e Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:41:08 2013 +0100 Added datetime-handling infrastructure in the ORM layers. commit 104d82a7778cf3f0f5d03dfa53709c26df45daad Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Mon Feb 11 10:05:55 2013 +0100 Updated null_queries tests to avoid clashing with the __second lookup. commit c01bbb32358201b3ac8cb4291ef87b7612a2b8e6 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 23:07:41 2013 +0100 Updated tests of .dates(). Replaced .dates() by .datetimes() for DateTimeFields. Replaced dates with datetimes in the expected output for DateFields. commit 50fb7a52462fecf0127b38e7f3df322aeb287c43 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 21:40:09 2013 +0100 Updated and added tests for QuerySet.datetimes. commit a8451a5004c437190e264667b1e6fb8acc3c1eeb Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 22:34:46 2013 +0100 Documented the new time lookups and updated the date lookups. commit 29413eab2bd1d5e004598900c0dadc0521bbf4d3 Author: Aymeric Augustin <aymeric.augustin@m4x.org> Date: Sun Feb 10 16:15:49 2013 +0100 Documented QuerySet.datetimes and updated QuerySet.dates.
2013-01-12Return namedtuple from get_table_descriptionClaude Paroz
We don't make use of it currently to not break third-party db backends.
2013-01-11Fixed #19360 -- Raised an explicit exception for aggregates on date/time ↵Nick Sandford
fields in sqlite3 Thanks lsaffre for the report and Chris Medrela for the initial patch.
2012-12-18Merge remote-tracking branch 'core/master' into schema-alterationAndrew Godwin
Conflicts: django/db/models/loading.py django/db/models/options.py
2012-11-27Fixed #19274 -- Made db connection creation overridable in subclassesAnssi Kääriäinen
Connection creation was done in db backend ._cursor() call. This included taking a new connection if needed, initializing the session state for the new connection and finally creating the connection. To allow easier modifying of these steps in subclasses (for example to support connection pools) the _cursor() now calls get_new_connection() and init_connection_state() if there isn't an existing connection. This was done for all non-gis core backends. In addition the parameters used for taking a connection are now created by get_connection_params(). We should also do the same for gis backends and encourage 3rd party backends to use the same pattern. The pattern is not enforced in code, and as the backends are private API this will not be required by documentation either.
2012-11-24Fixed #19351 -- SQLite bulk_insert of more than 500 single-field objsAnssi Kääriäinen
2012-11-24Fixed SQLite's collapsing of same-valued instances in bulk_createAnssi Kääriäinen
SQLite used INSERT INTO tbl SELECT %s UNION SELECT %s, the problem was that there should have been UNION ALL instead of UNION. Refs #19351
2012-10-26Merge branch 'master' into schema-alterationAndrew Godwin
Conflicts: django/db/backends/__init__.py django/db/models/fields/related.py django/db/models/options.py
2012-10-22Fixed #19162 -- Wrong indentation.Jan Bednařík
2012-09-24Fix nullability changing codeAndrew Godwin
2012-09-22Fix introspection PK comment more.Andrew Godwin
2012-09-22Remove AppCache state handling, replace with swappable cachesAndrew Godwin
2012-09-18Stylistic fixes: triple-quoted docstrings, more commentsAndrew Godwin