Development of an internal social media platform with personalised dashboards for students
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 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. from django.db.backends.base.features import BaseDatabaseFeatures
  2. from django.db.utils import InterfaceError
  3. from django.utils.functional import cached_property
  4. class DatabaseFeatures(BaseDatabaseFeatures):
  5. empty_fetchmany_value = ()
  6. interprets_empty_strings_as_nulls = True
  7. uses_savepoints = True
  8. has_select_for_update = True
  9. has_select_for_update_nowait = True
  10. has_select_for_update_skip_locked = True
  11. has_select_for_update_of = True
  12. select_for_update_of_column = True
  13. can_return_id_from_insert = True
  14. can_introspect_autofield = True
  15. supports_subqueries_in_group_by = False
  16. supports_transactions = True
  17. supports_timezones = False
  18. has_native_duration_field = True
  19. can_defer_constraint_checks = True
  20. supports_partially_nullable_unique_constraints = False
  21. truncates_names = True
  22. supports_tablespaces = True
  23. supports_sequence_reset = False
  24. can_introspect_time_field = False
  25. atomic_transactions = False
  26. supports_combined_alters = False
  27. nulls_order_largest = True
  28. requires_literal_defaults = True
  29. closed_cursor_error_class = InterfaceError
  30. bare_select_suffix = " FROM DUAL"
  31. uppercases_column_names = True
  32. # select for update with limit can be achieved on Oracle, but not with the current backend.
  33. supports_select_for_update_with_limit = False
  34. supports_temporal_subtraction = True
  35. # Oracle doesn't ignore quoted identifiers case but the current backend
  36. # does by uppercasing all identifiers.
  37. ignores_table_name_case = True
  38. supports_index_on_text_field = False
  39. has_case_insensitive_like = False
  40. create_test_procedure_without_params_sql = """
  41. CREATE PROCEDURE "TEST_PROCEDURE" AS
  42. V_I INTEGER;
  43. BEGIN
  44. V_I := 1;
  45. END;
  46. """
  47. create_test_procedure_with_int_param_sql = """
  48. CREATE PROCEDURE "TEST_PROCEDURE" (P_I INTEGER) AS
  49. V_I INTEGER;
  50. BEGIN
  51. V_I := P_I;
  52. END;
  53. """
  54. supports_callproc_kwargs = True
  55. supports_over_clause = True
  56. max_query_params = 2**16 - 1
  57. @cached_property
  58. def has_fetch_offset_support(self):
  59. return self.connection.oracle_version >= (12, 2)
  60. @cached_property
  61. def allow_sliced_subqueries_with_in(self):
  62. return self.has_fetch_offset_support