Plain is headed towards 1.0! Subscribe for development updates →

 1from __future__ import annotations
 2
 3from typing import TYPE_CHECKING
 4
 5from plain.models.backends.base.features import BaseDatabaseFeatures
 6
 7if TYPE_CHECKING:
 8    from plain.models.backends.postgresql.base import PostgreSQLDatabaseWrapper
 9
10
11class DatabaseFeatures(BaseDatabaseFeatures):
12    # Type checker hint: connection is always PostgreSQLDatabaseWrapper in this class
13    connection: PostgreSQLDatabaseWrapper
14
15    minimum_database_version = (12,)
16    allows_group_by_selected_pks = True
17    can_return_columns_from_insert = True
18    can_return_rows_from_bulk_insert = True
19    has_native_uuid_field = True
20    has_native_duration_field = True
21    has_native_json_field = True
22    can_defer_constraint_checks = True
23    has_select_for_update = True
24    has_select_for_update_nowait = True
25    has_select_for_update_of = True
26    has_select_for_update_skip_locked = True
27    has_select_for_no_key_update = True
28    supports_comments = True
29    supports_transactions = True
30    can_rollback_ddl = True
31    supports_combined_alters = True
32    supports_temporal_subtraction = True
33
34    requires_casted_case_in_updates = True
35    supports_over_clause = True
36    only_supports_unbounded_with_preceding_and_following = True
37    supports_aggregate_filter_clause = True
38    supported_explain_formats = {"JSON", "TEXT", "XML", "YAML"}
39    supports_deferrable_unique_constraints = True
40    supports_update_conflicts = True
41    supports_update_conflicts_with_target = True
42    supports_covering_indexes = True
43    can_rename_index = True
44
45    supports_unlimited_charfield = True