summaryrefslogtreecommitdiff
path: root/django/db/backends/__init__.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-08-20 02:39:05 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-08-20 02:39:05 +0000
commite13ea3c70dc1a217d4e88e0a66f4311167f156c3 (patch)
treec4efddf6c0caa5987768c21f9422dd24a37e5d45 /django/db/backends/__init__.py
parent6d8e6090e598bcfafa7caffdee37e191d1ee7f4a (diff)
Refactored get_query_set_class() to DatabaseOperations.query_set_class(). Also added BaseDatabaseFeatures.uses_custom_queryset. Refs #5106
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/__init__.py')
-rw-r--r--django/db/backends/__init__.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py
index 2415d453ce..0a86ed1476 100644
--- a/django/db/backends/__init__.py
+++ b/django/db/backends/__init__.py
@@ -48,6 +48,7 @@ class BaseDatabaseFeatures(object):
supports_constraints = True
supports_tablespaces = False
uses_case_insensitive_names = False
+ uses_custom_queryset = False
class BaseDatabaseOperations(object):
"""
@@ -144,6 +145,15 @@ class BaseDatabaseOperations(object):
"""
return 'DEFAULT'
+ def query_set_class(self, DefaultQuerySet):
+ """
+ Given the default QuerySet class, returns a custom QuerySet class
+ to use for this backend. Returns None if a custom QuerySet isn't used.
+ See also BaseDatabaseFeatures.uses_custom_queryset, which regulates
+ whether this method is called at all.
+ """
+ return None
+
def quote_name(self, name):
"""
Returns a quoted version of the given table, index or column name. Does