From a642b4ada22a697b7c2715e818f0ffad1b40f247 Mon Sep 17 00:00:00 2001 From: Boulder Sprinters Date: Sat, 4 Nov 2006 20:41:11 +0000 Subject: [PATCH] Add get_max_name_length() method to all backend/base.py git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@3975 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/ado_mssql/base.py | 3 +++ django/db/backends/mysql/base.py | 3 +++ django/db/backends/oracle/base.py | 3 +++ django/db/backends/postgresql/base.py | 3 +++ django/db/backends/postgresql_psycopg2/base.py | 3 +++ django/db/backends/sqlite3/base.py | 3 +++ 6 files changed, 18 insertions(+) diff --git a/django/db/backends/ado_mssql/base.py b/django/db/backends/ado_mssql/base.py index afe2d19981..54a91b8ff1 100644 --- a/django/db/backends/ado_mssql/base.py +++ b/django/db/backends/ado_mssql/base.py @@ -134,6 +134,9 @@ def get_drop_foreignkey_sql(): def get_pk_default_value(): return "DEFAULT" +def get_max_name_length(): + return None + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py index 04e5814988..80c26ee953 100644 --- a/django/db/backends/mysql/base.py +++ b/django/db/backends/mysql/base.py @@ -179,6 +179,9 @@ def get_drop_foreignkey_sql(): def get_pk_default_value(): return "DEFAULT" +def get_max_name_length(): + return None + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index ee0d86a53e..22137115fa 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -128,6 +128,9 @@ def get_drop_foreignkey_sql(): def get_pk_default_value(): return "DEFAULT" +def get_max_name_length(): + return 30 + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'LIKE %s', diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py index 5355781e81..e22e752550 100644 --- a/django/db/backends/postgresql/base.py +++ b/django/db/backends/postgresql/base.py @@ -111,6 +111,9 @@ def get_drop_foreignkey_sql(): def get_pk_default_value(): return "DEFAULT" +def get_max_name_length(): + return None + # 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 4c835d89fc..5a1d321a70 100644 --- a/django/db/backends/postgresql_psycopg2/base.py +++ b/django/db/backends/postgresql_psycopg2/base.py @@ -104,6 +104,9 @@ def get_drop_foreignkey_sql(): def get_pk_default_value(): return "DEFAULT" +def get_max_name_length(): + return None + OPERATOR_MAPPING = { 'exact': '= %s', 'iexact': 'ILIKE %s', diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 3fe7eb43ac..d7b659a69e 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -144,6 +144,9 @@ def get_drop_foreignkey_sql(): def get_pk_default_value(): return "NULL" +def get_max_name_length(): + return None + def _sqlite_date_trunc(lookup_type, dt): try: dt = util.typecast_timestamp(dt)