Loading django/db/backends/__init__.py +25 −0 Original line number Diff line number Diff line Loading @@ -616,6 +616,8 @@ class BaseDatabaseFeatures(object): supports_subqueries_in_group_by = True supports_bitwise_or = True supports_boolean_type = True supports_binary_field = True # Do time/datetime fields have microsecond precision? Loading Loading @@ -660,6 +662,9 @@ class BaseDatabaseFeatures(object): # Does the backend reset sequences between tests? supports_sequence_reset = True # Can the backend determine reliably the length of a CharField? can_introspect_max_length = True # Confirm support for introspected foreign keys # Every database can do this reliably, except MySQL, # which can't do it for MyISAM tables Loading @@ -668,6 +673,24 @@ class BaseDatabaseFeatures(object): # Can the backend introspect an AutoField, instead of an IntegerField? can_introspect_autofield = False # Can the backend introspect a BigIntegerField, instead of an IntegerField? can_introspect_big_integer_field = True # Can the backend introspect an BinaryField, instead of an TextField? can_introspect_binary_field = True # Can the backend introspect an IPAddressField, instead of an CharField? can_introspect_ip_address_field = False # Can the backend introspect a PositiveIntegerField, instead of an IntegerField? can_introspect_positive_integer_field = False # Can the backend introspect a SmallIntegerField, instead of an IntegerField? can_introspect_small_integer_field = False # Can the backend introspect a TimeField, instead of a DateTimeField? can_introspect_time_field = True # Support for the DISTINCT ON clause can_distinct_on_fields = False Loading Loading @@ -714,6 +737,8 @@ class BaseDatabaseFeatures(object): # Suffix for backends that don't support "SELECT xxx;" queries. bare_select_suffix = '' lowercases_column_names = False def __init__(self, connection): self.connection = connection Loading django/db/backends/mysql/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -172,11 +172,13 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_select_for_update_nowait = False supports_forward_references = False supports_long_model_names = False supports_boolean_type = False # XXX MySQL DB-API drivers currently fail on binary data on Python 3. supports_binary_field = six.PY2 supports_microsecond_precision = False supports_regex_backreferencing = False supports_date_lookup_using_string = False can_introspect_binary_field = False supports_timezones = False requires_explicit_null_ordering_when_grouping = True allows_auto_pk_0 = False Loading django/db/backends/oracle/base.py +3 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,8 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_bulk_insert = True supports_tablespaces = True supports_sequence_reset = False can_introspect_max_length = False can_introspect_time_field = False atomic_transactions = False supports_combined_alters = False nulls_order_largest = True Loading @@ -118,6 +120,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): connection_persists_old_columns = True closed_cursor_error_class = InterfaceError bare_select_suffix = " FROM DUAL" lowercases_column_names = True class DatabaseOperations(BaseDatabaseOperations): Loading django/db/backends/postgresql_psycopg2/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ class DatabaseFeatures(BaseDatabaseFeatures): uses_savepoints = True supports_tablespaces = True supports_transactions = True can_introspect_ip_address_field = True can_introspect_small_integer_field = True can_distinct_on_fields = True can_rollback_ddl = True supports_combined_alters = True Loading django/db/backends/sqlite3/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,8 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_foreign_keys = False supports_check_constraints = False autocommits_when_autocommit_is_off = True can_introspect_positive_integer_field = True can_introspect_small_integer_field = True supports_transactions = True atomic_transactions = False can_rollback_ddl = True Loading Loading
django/db/backends/__init__.py +25 −0 Original line number Diff line number Diff line Loading @@ -616,6 +616,8 @@ class BaseDatabaseFeatures(object): supports_subqueries_in_group_by = True supports_bitwise_or = True supports_boolean_type = True supports_binary_field = True # Do time/datetime fields have microsecond precision? Loading Loading @@ -660,6 +662,9 @@ class BaseDatabaseFeatures(object): # Does the backend reset sequences between tests? supports_sequence_reset = True # Can the backend determine reliably the length of a CharField? can_introspect_max_length = True # Confirm support for introspected foreign keys # Every database can do this reliably, except MySQL, # which can't do it for MyISAM tables Loading @@ -668,6 +673,24 @@ class BaseDatabaseFeatures(object): # Can the backend introspect an AutoField, instead of an IntegerField? can_introspect_autofield = False # Can the backend introspect a BigIntegerField, instead of an IntegerField? can_introspect_big_integer_field = True # Can the backend introspect an BinaryField, instead of an TextField? can_introspect_binary_field = True # Can the backend introspect an IPAddressField, instead of an CharField? can_introspect_ip_address_field = False # Can the backend introspect a PositiveIntegerField, instead of an IntegerField? can_introspect_positive_integer_field = False # Can the backend introspect a SmallIntegerField, instead of an IntegerField? can_introspect_small_integer_field = False # Can the backend introspect a TimeField, instead of a DateTimeField? can_introspect_time_field = True # Support for the DISTINCT ON clause can_distinct_on_fields = False Loading Loading @@ -714,6 +737,8 @@ class BaseDatabaseFeatures(object): # Suffix for backends that don't support "SELECT xxx;" queries. bare_select_suffix = '' lowercases_column_names = False def __init__(self, connection): self.connection = connection Loading
django/db/backends/mysql/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -172,11 +172,13 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_select_for_update_nowait = False supports_forward_references = False supports_long_model_names = False supports_boolean_type = False # XXX MySQL DB-API drivers currently fail on binary data on Python 3. supports_binary_field = six.PY2 supports_microsecond_precision = False supports_regex_backreferencing = False supports_date_lookup_using_string = False can_introspect_binary_field = False supports_timezones = False requires_explicit_null_ordering_when_grouping = True allows_auto_pk_0 = False Loading
django/db/backends/oracle/base.py +3 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,8 @@ class DatabaseFeatures(BaseDatabaseFeatures): has_bulk_insert = True supports_tablespaces = True supports_sequence_reset = False can_introspect_max_length = False can_introspect_time_field = False atomic_transactions = False supports_combined_alters = False nulls_order_largest = True Loading @@ -118,6 +120,7 @@ class DatabaseFeatures(BaseDatabaseFeatures): connection_persists_old_columns = True closed_cursor_error_class = InterfaceError bare_select_suffix = " FROM DUAL" lowercases_column_names = True class DatabaseOperations(BaseDatabaseOperations): Loading
django/db/backends/postgresql_psycopg2/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,8 @@ class DatabaseFeatures(BaseDatabaseFeatures): uses_savepoints = True supports_tablespaces = True supports_transactions = True can_introspect_ip_address_field = True can_introspect_small_integer_field = True can_distinct_on_fields = True can_rollback_ddl = True supports_combined_alters = True Loading
django/db/backends/sqlite3/base.py +2 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,8 @@ class DatabaseFeatures(BaseDatabaseFeatures): supports_foreign_keys = False supports_check_constraints = False autocommits_when_autocommit_is_off = True can_introspect_positive_integer_field = True can_introspect_small_integer_field = True supports_transactions = True atomic_transactions = False can_rollback_ddl = True Loading