diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2007-08-19 22:29:57 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2007-08-19 22:29:57 +0000 |
| commit | 38b5d7f23d8f7a39646a9b298f10941a70585031 (patch) | |
| tree | 67f7ef709f8aa02b4da346f46b9284b6ba976b5b /django/db/backends/postgresql/base.py | |
| parent | 7c41b19c8a11e4ce46608f25e097118ddb1b3f5e (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/postgresql/base.py')
| -rw-r--r-- | django/db/backends/postgresql/base.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 0238ce8c57..1c6f5ec978 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -5,7 +5,7 @@ Requires psycopg 1: http://initd.org/projects/psycopg1 """ from django.utils.encoding import smart_str, smart_unicode -from django.db.backends import BaseDatabaseWrapper, util +from django.db.backends import BaseDatabaseWrapper, BaseDatabaseOperations, util try: import psycopg as Database except ImportError, e: @@ -57,7 +57,12 @@ class UnicodeCursorWrapper(object): postgres_version = None +class DatabaseOperations(BaseDatabaseOperations): + pass + class DatabaseWrapper(BaseDatabaseWrapper): + ops = DatabaseOperations() + def _cursor(self, settings): set_tz = False if self.connection is None: @@ -157,9 +162,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 all tables in the database (without actually removing the tables |
