diff options
Diffstat (limited to 'django/db/backends/__init__.py')
| -rw-r--r-- | django/db/backends/__init__.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/django/db/backends/__init__.py b/django/db/backends/__init__.py index 579bf80aaf..9a1fe30925 100644 --- a/django/db/backends/__init__.py +++ b/django/db/backends/__init__.py @@ -470,6 +470,14 @@ class BaseDatabaseIntrospection(object): def __init__(self, connection): self.connection = connection + def get_field_type(self, data_type, description): + """Hook for a database backend to use the cursor description to + match a Django field type to a database column. + + For Oracle, the column data_type on its own is insufficient to + distinguish between a FloatField and IntegerField, for example.""" + return self.data_types_reverse[data_type] + def table_name_converter(self, name): """Apply a conversion to the name for the purposes of comparison. @@ -560,4 +568,3 @@ class BaseDatabaseValidation(object): def validate_field(self, errors, opts, f): "By default, there is no backend-specific validation" pass - |
