You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

features.py 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import sys
  2. from django.db.backends.base.features import BaseDatabaseFeatures
  3. from .base import Database
  4. class DatabaseFeatures(BaseDatabaseFeatures):
  5. # SQLite can read from a cursor since SQLite 3.6.5, subject to the caveat
  6. # that statements within a connection aren't isolated from each other. See
  7. # https://sqlite.org/isolation.html.
  8. can_use_chunked_reads = True
  9. test_db_allows_multiple_connections = False
  10. supports_unspecified_pk = True
  11. supports_timezones = False
  12. max_query_params = 999
  13. supports_mixed_date_datetime_comparisons = False
  14. autocommits_when_autocommit_is_off = sys.version_info < (3, 6)
  15. can_introspect_autofield = True
  16. can_introspect_decimal_field = False
  17. can_introspect_duration_field = False
  18. can_introspect_positive_integer_field = True
  19. can_introspect_small_integer_field = True
  20. introspected_big_auto_field_type = 'AutoField'
  21. supports_transactions = True
  22. atomic_transactions = False
  23. can_rollback_ddl = True
  24. supports_atomic_references_rename = Database.sqlite_version_info >= (3, 26, 0)
  25. supports_paramstyle_pyformat = False
  26. supports_sequence_reset = False
  27. can_clone_databases = True
  28. supports_temporal_subtraction = True
  29. ignores_table_name_case = True
  30. supports_cast_with_precision = False
  31. time_cast_precision = 3
  32. can_release_savepoints = True
  33. # Is "ALTER TABLE ... RENAME COLUMN" supported?
  34. can_alter_table_rename_column = Database.sqlite_version_info >= (3, 25, 0)
  35. supports_parentheses_in_compound = False
  36. # Deferred constraint checks can be emulated on SQLite < 3.20 but not in a
  37. # reasonably performant way.
  38. supports_pragma_foreign_key_check = Database.sqlite_version_info >= (3, 20, 0)
  39. can_defer_constraint_checks = supports_pragma_foreign_key_check
  40. supports_functions_in_partial_indexes = Database.sqlite_version_info >= (3, 15, 0)