summaryrefslogtreecommitdiff
path: root/django/db/backends/sqlite3/base.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-08-19 22:29:57 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-08-19 22:29:57 +0000
commit38b5d7f23d8f7a39646a9b298f10941a70585031 (patch)
tree67f7ef709f8aa02b4da346f46b9284b6ba976b5b /django/db/backends/sqlite3/base.py
parent7c41b19c8a11e4ce46608f25e097118ddb1b3f5e (diff)
Began implementing BaseDatabaseOperations class for every database backend. This class will be used to hold the database-specific methods that currently live at the module level in each backend. Only autoinc_sql() has been implemented so far.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5950 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/backends/sqlite3/base.py')
-rw-r--r--django/db/backends/sqlite3/base.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index 9f4df08f07..5579d9d9ee 100644
--- a/django/db/backends/sqlite3/base.py
+++ b/django/db/backends/sqlite3/base.py
@@ -2,7 +2,7 @@
SQLite3 backend for django. Requires pysqlite2 (http://pysqlite.org/).
"""
-from django.db.backends import BaseDatabaseWrapper, util
+from django.db.backends import BaseDatabaseWrapper, BaseDatabaseOperations, util
try:
try:
from sqlite3 import dbapi2 as Database
@@ -34,7 +34,12 @@ Database.register_converter("TIMESTAMP", util.typecast_timestamp)
Database.register_converter("decimal", util.typecast_decimal)
Database.register_adapter(decimal.Decimal, util.rev_typecast_decimal)
+class DatabaseOperations(BaseDatabaseOperations):
+ pass
+
class DatabaseWrapper(BaseDatabaseWrapper):
+ ops = DatabaseOperations()
+
def _cursor(self, settings):
if self.connection is None:
kwargs = {
@@ -143,9 +148,6 @@ def get_max_name_length():
def get_start_transaction_sql():
return "BEGIN;"
-def get_autoinc_sql(table):
- return None
-
def get_sql_flush(style, tables, sequences):
"""
Return a list of SQL statements required to remove all data from