mirror of
https://github.com/django/django.git
synced 2025-07-05 02:09:13 +00:00
[soc2009/multidb] Removed duplicate cache in the Oracle backend.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11417 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2899accd26
commit
b6ae173078
@ -8,9 +8,6 @@ import datetime
|
||||
from django.db.backends import util
|
||||
from django.utils.encoding import force_unicode
|
||||
|
||||
# Cache. Maps default query class to new Oracle query class.
|
||||
_classes = {}
|
||||
|
||||
def query_class(QueryClass, Database):
|
||||
"""
|
||||
Returns a custom django.db.models.sql.query.Query subclass that is
|
||||
@ -19,12 +16,6 @@ def query_class(QueryClass, Database):
|
||||
The 'Database' module (cx_Oracle) is passed in here so that all the setup
|
||||
required to import it only needs to be done by the calling module.
|
||||
"""
|
||||
global _classes
|
||||
try:
|
||||
return _classes[QueryClass]
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
class OracleQuery(QueryClass):
|
||||
def __reduce__(self):
|
||||
"""
|
||||
@ -133,7 +124,6 @@ def query_class(QueryClass, Database):
|
||||
|
||||
return sql, params
|
||||
|
||||
_classes[QueryClass] = OracleQuery
|
||||
return OracleQuery
|
||||
|
||||
def unpickle_query_class(QueryClass):
|
||||
|
Loading…
x
Reference in New Issue
Block a user