diff options
Diffstat (limited to 'django/db/backends')
-rw-r--r-- | django/db/backends/ado_mssql/base.py | 3 | ||||
-rw-r--r-- | django/db/backends/mysql/base.py | 3 | ||||
-rw-r--r-- | django/db/backends/oracle/base.py | 3 | ||||
-rw-r--r-- | django/db/backends/postgresql/base.py | 3 | ||||
-rw-r--r-- | django/db/backends/postgresql_psycopg2/base.py | 3 | ||||
-rw-r--r-- | django/db/backends/sqlite3/base.py | 3 | ||||
-rw-r--r-- | django/db/backends/util.py | 2 |
7 files changed, 19 insertions, 1 deletions
diff --git a/django/db/backends/ado_mssql/base.py b/django/db/backends/ado_mssql/base.py index b645b053bf..afe2d19981 100644 --- a/django/db/backends/ado_mssql/base.py +++ b/django/db/backends/ado_mssql/base.py @@ -131,6 +131,9 @@ def get_fulltext_search_sql(field_name): def get_drop_foreignkey_sql(): return "DROP CONSTRAINT" +def get_pk_default_value(): + return "DEFAULT" + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 4a13450c67..a522f24f2f 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -158,6 +158,9 @@ def get_fulltext_search_sql(field_name): def get_drop_foreignkey_sql(): return "DROP FOREIGN KEY" +def get_pk_default_value(): + return "DEFAULT" + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index e981805108..9943ac9610 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -114,6 +114,9 @@ def get_fulltext_search_sql(field_name): def get_drop_foreignkey_sql(): return "DROP FOREIGN KEY" +def get_pk_default_value(): + return "DEFAULT" + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index decb160ee9..5355781e81 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -108,6 +108,9 @@ def get_fulltext_search_sql(field_name): def get_drop_foreignkey_sql(): return "DROP CONSTRAINT" +def get_pk_default_value(): + return "DEFAULT" + # Register these custom typecasts, because Django expects dates/times to be # in Python's native (standard-library) datetime/time format, whereas psycopg # use mx.DateTime by default. diff --git a/django/db/backends/postgresql_psycopg2/base.py b/django/db/backends/postgresql_psycopg2/base.py index 697a33bb76..55cba81b70 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -114,6 +114,9 @@ def get_fulltext_search_sql(field_name): def get_drop_foreignkey_sql(): return "DROP CONSTRAINT" +def get_pk_default_value(): + return "DEFAULT" + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'ILIKE %s', diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 7b51967416..68452e1363 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -130,6 +130,9 @@ def get_fulltext_search_sql(field_name): def get_drop_foreignkey_sql(): return "" +def get_pk_default_value(): + return "NULL" + def _sqlite_date_trunc(lookup_type, dt): try: dt = util.typecast_timestamp(dt) diff --git a/django/db/backends/util.py b/django/db/backends/util.py index 3098a53556..74d33f42ca 100644 --- a/django/db/backends/util.py +++ b/django/db/backends/util.py @@ -1,7 +1,7 @@ import datetime from time import time -class CursorDebugWrapper: +class CursorDebugWrapper(object): def __init__(self, cursor, db): self.cursor = cursor self.db = db |