summaryrefslogtreecommitdiff
path: root/django/db/backends
AgeCommit message (Collapse)Author
2008-12-16Fixed #9814 -- Allowed SafeStrings to be saved to sqlite DB when running on ↵Karen Tracey
Python 2.6. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-16Fixed #9431 -- Added extra validation for VARCHAR-based fields on MySQL.Malcolm Tredinnick
max_length > 255 and unique=True is not permitted. Based on a patch from adamnelson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-11Reformatted PL/SQL flush left so "manage.py sqlall [app] | manage.py ↵Matt Boersma
dbshell" works with Oracle. Also some PEP8 cleanup. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9644 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-10If an SQL query doesn't specify any ordering, avoid the implicit sortMalcolm Tredinnick
that happens with MySQL when a "GROUP BY" clause is included. This is a backend-specific operation, so any other databases requiring similar encouragement can have a function added to their own backend code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-08Fixed obscure Oracle quoting issues pointed out by the ↵Matt Boersma
custom_columns_regress test case. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9612 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02Fixed #9706: made SlugField honor max_length in Oracle, matching the other ↵Ian Kelly
backends. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02Fixed a pair of bugs in determining the set of models to flush that were ↵Ian Kelly
causing test cause failures in Oracle after [9536]. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-12-02Fixed #9736 -- Added quoting to the SQL constraint names generated during ↵Russell Keith-Magee
table creation. This is to accommodate primary keys with spaces. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16Fixed #6052 -- Worked around a bug in MySQLdb with regards to handlingMalcolm Tredinnick
SafeUnicode (handle SafeString similarly, just to be safe). Based on a patch from sfllaw. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9467 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-16Fixed #3501 -- Fixed date filtering in querysets for nullable date fields. OnlyMalcolm Tredinnick
affects SQLite. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-14Refs #9408: Removed support for passing params as dicts in the oracle ↵Ian Kelly
backend. Wasn't documented, didn't work, isn't necessary. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-11-12Fixed #5079 -- Avoid converting Decimals to floats during save to the database.Karen Tracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-24Fixed #9307 -- Added the ability to pickle the Query class used by the OracleMalcolm Tredinnick
backend. This allows Querysets to be cached for Oracle and should provide a model for adding pickling support to other (external) database backends that need a custom Query class. Thanks to Justin Bronn for some assistance with this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9272 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-18Fixed #9136: Do slicing in Oracle with rownum instead of row_number() for a ↵Ian Kelly
speed improvement. Thanks, Guillaume Taglang. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9235 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-13Fixed Oracle introspection mapping of DATE columns, and added an entry for ↵Ian Kelly
Oracle 10g native float columns. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9231 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-10-10Fixed .distinct() not working with slicing in Oracle, due to the Ian Kelly
row numbers necessarily being distinct. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-17Fixed #9113 -- Improved exception message reporting when importing sqlite3 ↵Malcolm Tredinnick
fails. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9060 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-10Fixed an incorrectly named DatabaseOperations method. It was causing ↵Ian Kelly
non-Oracle backends to fail when running syncdb with tablespaces set. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-09db: Gave each DatabaseClient class an 'executable_name' attribute (e.g., ↵Adrian Holovaty
'psql' or 'mysql'), so that we can use it to make a more helpful error message. Refs #8978 git-svn-id: http://code.djangoproject.com/svn/django/trunk@8989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-04Fixed re-raising of ORA-01400 as an IntegrityError in a way that works on ↵Matt Boersma
Python 2.3 and 2.4 as well. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Fixed #8210 and #8664: moved `USStateField` and `PhoneNumberField` to ↵Jacob Kaplan-Moss
`django.contrib.localflavor.us`. This is a backwards-incompatible change, albeit a minor one; just add an aditional `import` and go on your way. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8819 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Corrected Oracle DatabaseError definition.Ian Kelly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8810 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Fixed escaping of wildcard characters in iexact lookups in Oracle.Ian Kelly
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8808 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Fixed #8354: the MySQL backend no longer raises a cryptic error. Instead, it ↵Jacob Kaplan-Moss
raises a less-cryptic error. Obiously this isn't a perfect solution by any means, but it'll do until we can revisit timezone handling in the future. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8802 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-09-01Fixed #8316 -- Put tighter restrictions on the type of Foreign Key fieldsMalcolm Tredinnick
created for MySQL (because MySQL + InnoDB has those restrictions). Patch from julianb. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29Fixed #8575 -- Catch one particular instance of OperationalError in MySQL andMalcolm Tredinnick
convert it to an IntegrityError, which seems like the more natural case (and is consistent with other backends). This makes exception handling in Django much easier. The solution is extensible for any other error codes we may wish to add going forwards. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8692 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Fixed #8592 -- Fixed a bug in the way savepoint usage was disabled forMalcolm Tredinnick
PostgreSQL < 8.0. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-28Fixed #8597 -- Allow the use of strings containing underscores and percentageMalcolm Tredinnick
signs in "iexact" queries on PostgreSQL again (this case was missed in [8536]). git-svn-id: http://code.djangoproject.com/svn/django/trunk@8646 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-26Fixed #8347 -- Added a few missing field type conversion to SQLite's inspectdbMalcolm Tredinnick
handling. Patch from trbs. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Fixed get_or_create test case for Oracle by re-raising the more specific ↵Matt Boersma
IntegrityError for "ORA-01400: Cannot insert NULL into [table.col]" git-svn-id: http://code.djangoproject.com/svn/django/trunk@8545 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Fixed #3575: use UPPER() instead ILIKE for postgres case-insensitive ↵Jacob Kaplan-Moss
comparisons. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8536 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-25Fixed #7464 -- Fixed the psycopg2 backend to handle SafeString values asMalcolm Tredinnick
parameters. Based on a patch from Digitalxero@gmail.com. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-24Fixed #7628 -- Oracle backend won't try to recreate existing sequences ↵Matt Boersma
during syncdb. Thanks, cmarshal. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Fixed #8214 -- Added back a stringification that was dropped during [8131].Malcolm Tredinnick
This restores filtering on dates in the admin, for example. Thanks to akfarrell and a small team of workers at the Portland Sprint. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Fixed #7536 -- Added NEWDECIMAL to introspection types in the mysql backend. ↵Brian Rosner
Thanks Jerome Etienne for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8475 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22Fixed Oracle backend limit/offset SQL to again use extra_select, properly ↵Matt Boersma
this time. This cleans up a test case failure, and hopefully gets contrib.gis working again. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8471 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-22Fixed #8485: Reordered imports in the database backends to ensure that the ↵Russell Keith-Magee
availability of the MySQL and Oracle backends is confirmed before any attempt is made to use the backend. Many thanks to Karen Tracey for her work in narrowing down a number of vague reports into a concrete problem. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8466 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-19Fixed Oracle backend not to use extra_select for limit/offset type queries, ↵Matt Boersma
which fixes a majority of the currently failing tests. Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8445 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-16Fixed #8355: Removed some whitespace that was apparently causing difficulty ↵Russell Keith-Magee
with script compilation. Thanks to bear330 for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15Reverted [8318] and [8329], since the change turned out to have no effect, uponMalcolm Tredinnick
closer examination of the C-library layer. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8380 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-15Fixed #8331 -- Added style parameter to sqlite backend implementation of ↵Russell Keith-Magee
sql_remove_table_constraints, missed in recent db backend refactor. Thanks to d00gs for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Fixed oracle-specific test DB creation code so the test suite will run again.Matt Boersma
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8330 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Fixed #8260 -- Changed [8318] to also work with MySQLdb 1.2.1p2.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Fixed a group of missing imports, aliases and parameter passings from theMalcolm Tredinnick
db.backend.creation refactoring. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Changed "exact" matches in MySQL to use the database's native collation.Malcolm Tredinnick
This effectively reverses the change in [7798]. It was proving too difficult to successfully manage all the side effects here and provide a satisfactory solution for everybody. Many thanks to arne, Martin von Löwis and, particular, Karen Tracey, for doing a lot of research and proto-patches here to establish what was possible and practical. This is backwards incompatible if you were relying on the behaviour after [7798]. The docs have been updated to indicate the solution. Refs #2170, #7789, #8102. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Convert binary-matched VARCHAR fields to unicode objects in the MySQL backend.Malcolm Tredinnick
This conforms to Djangos' policy of returning Unicode everywhere. Suggested by arne and Martin von Löwis. Refs #7789. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8318 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Do not use savepoints with PostgreSQL prior to 8.0.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8317 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-12Added savepoint support to the transaction code.Malcolm Tredinnick
This is a no-op for most databases. Only necessary on PostgreSQL so that we can do things which will possibly intentionally raise an IntegrityError and not have to rollback the entire transaction. Not supported for PostgreSQL versions prior to 8.0, so should be used sparingly in internal Django code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8314 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11Fixed stupid syntax error in [8303].Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11Fixed #8228: fixed a Python 2.3 compatibility from [8296].Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8303 bcc190cf-cafb-0310-a4f2-bffc1f526a37