The patch attached:
- Adds four new atttibutes to DatabaseFeatures (also setting the correct values for the backends bundled with Django):
supports_usecs # default value: True
time_field_needs_date # default value: False
interprets_empty_strings_as_nulls # default value: False
date_field_supports_time_value # default value: True
- Moves prep_for_like_query from a global lambda form at django/db/backends/__init__.py) to a method of DatabaseOperations
- Modifies contrib/sessions/backends/db.py and django/db/models/fields/__init__.py to use them instead of tests of the style if settings.DATABASE_BACKEND == 'oracle':....
If I understand things correctly this is a desirable thing to have.
Additionally this would allow moving forward with a MS SQL Server (that shares one trait with Oracle and another with MySQL and that has a particular LIKE query syntax) as a truly external backends i.e. reducing the need to patch Django itself to a minimum.
Tested with the Django trunk test suite on a Debian Etch -based environment:
- pysqlite2 2.3.2 + sqlite 3.3.8
- MySQLdb 1.2.1 + MySQL 5.0.32
- psycopg2 2.0.5 + PostgreSQL 8.1.11
(no Oracle installation at hand :( but hopefully somebody will be able test with that backend and report below)