U
    `¼|ei:  ã                   @   s*   d dl mZ d dlmZ G dd„ dƒZdS )é    )ÚProgrammingError)Úcached_propertyc                   @   sf  e Zd ZdZdZdZdZdZg ZdZ	dZ
dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1dZ2dZ3dZ4dddddd	d
dddddddddœZ5dZ6dZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGeHZIdZJdZKdZLdZMdZNdZOdZPdZQdZRdZSdZTdZUdZVdZWdZXdZYdZZdZ[dZ\dZ]dZ^dZ_dZ`dZadZbecƒ ZddZedZfdZgdZhdZidZjdZkdZldZmdZndZodZpdZqdZrdZsdZtdZudZvdZwdZxdZydZzdZ{dZ|dZ}dZ~dZdZ€dZdddddœZ‚dZƒecƒ Z„i Z…dd„ Z†e‡dd„ ƒZˆe‡dd„ ƒZ‰dd„ ZŠdS )ÚBaseDatabaseFeaturesNFTÚ	AutoFieldÚBigAutoFieldÚBigIntegerFieldÚBinaryFieldÚBooleanFieldÚ	CharFieldÚDurationFieldÚGenericIPAddressFieldÚIntegerFieldÚPositiveBigIntegerFieldÚPositiveIntegerFieldÚPositiveSmallIntegerFieldÚSmallAutoFieldÚSmallIntegerFieldÚ	TimeField)r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   Ú é   )ÚciÚcsÚnon_defaultZ
swedish_cic                 C   s
   || _ d S )N)Ú
connection)Úselfr   © r   ú]/var/www/website-v5/atlas_env/lib/python3.8/site-packages/django/db/backends/base/features.pyÚ__init__p  s    zBaseDatabaseFeatures.__init__c                 C   s   | j jjdk	S )z5Does this backend support explaining query execution?N)r   ÚopsZexplain_prefix)r   r   r   r   Ú#supports_explaining_query_executions  s    z8BaseDatabaseFeatures.supports_explaining_query_executionc              	   C   sr   | j  ¡ Z}| d¡ | j  d¡ | d¡ | j  ¡  | j  d¡ | d¡ | ¡ \}| d¡ W 5 Q R X |dkS )z!Confirm support for transactions.z"CREATE TABLE ROLLBACK_TEST (X INT)Fz(INSERT INTO ROLLBACK_TEST (X) VALUES (8)Tz"SELECT COUNT(X) FROM ROLLBACK_TESTzDROP TABLE ROLLBACK_TESTr   )r   ÚcursorÚexecuteÚset_autocommitÚrollbackÚfetchone)r   r    Úcountr   r   r   Úsupports_transactionsx  s    




z*BaseDatabaseFeatures.supports_transactionsc                 C   s   | j s
dS |jjS )NF)Úallows_group_by_selected_pksÚ_metaÚmanaged)r   Úmodelr   r   r   Ú%allows_group_by_selected_pks_on_model†  s    z:BaseDatabaseFeatures.allows_group_by_selected_pks_on_model)‹Ú__name__Ú
__module__Ú__qualname__Úminimum_database_versionZgis_enabledZallows_group_by_lobr'   Zallows_group_by_select_indexZempty_fetchmany_valueZupdate_can_self_selectÚ!interprets_empty_strings_as_nullsZ$supports_nullable_unique_constraintsZ.supports_partially_nullable_unique_constraintsÚ&supports_deferrable_unique_constraintsÚcan_use_chunked_readsÚcan_return_columns_from_insertÚ can_return_rows_from_bulk_insertZhas_bulk_insertÚuses_savepointsÚcan_release_savepointsÚrelated_fields_match_typeZallow_sliced_subqueries_with_inZhas_select_for_updateZhas_select_for_update_nowaitZ!has_select_for_update_skip_lockedZhas_select_for_update_ofZhas_select_for_no_key_updateZselect_for_update_of_columnÚ#test_db_allows_multiple_connectionsÚsupports_unspecified_pkZsupports_forward_referencesÚtruncates_namesZhas_real_datatypeZsupports_subqueries_in_group_byÚ*ignores_unnecessary_order_by_in_subqueriesÚhas_native_uuid_fieldÚhas_native_duration_fieldÚsupports_temporal_subtractionZsupports_regex_backreferencingZ!supports_date_lookup_using_stringÚsupports_timezonesÚhas_zoneinfo_databaseZ-requires_explicit_null_ordering_when_groupingZnulls_order_largestÚ supports_order_by_nulls_modifierÚorder_by_nulls_firstÚmax_query_paramsZallows_auto_pk_0Úcan_defer_constraint_checksZsupports_tablespacesZsupports_sequence_resetZcan_introspect_defaultZcan_introspect_foreign_keysÚintrospected_field_typesÚsupports_index_column_orderingZ!can_introspect_materialized_viewsZcan_distinct_on_fieldsÚatomic_transactionsÚcan_rollback_ddlZ+schema_editor_uses_clientside_param_bindingÚ!supports_atomic_references_renameZsupports_combined_altersZsupports_foreign_keysÚcan_create_inline_fkZcan_rename_indexZindexes_foreign_keysZ!supports_column_check_constraintsÚ supports_table_check_constraintsZ can_introspect_check_constraintsZsupports_paramstyle_pyformatÚrequires_literal_defaultsZconnection_persists_old_columnsr   Zclosed_cursor_error_classÚhas_case_insensitive_likeZbare_select_suffixZimplied_column_nullÚ%supports_select_for_update_with_limitZgreatest_least_ignores_nullsÚcan_clone_databasesÚignores_table_name_caseZfor_update_after_fromZsupports_select_unionZsupports_select_intersectionZsupports_select_differenceZ%supports_slicing_ordering_in_compoundÚ supports_parentheses_in_compoundÚ#requires_compound_order_by_subqueryÚ supports_aggregate_filter_clauseZsupports_index_on_text_fieldÚsupports_over_clauseÚ#supports_frame_range_fixed_distanceZ4only_supports_unbounded_with_preceding_and_followingÚsupports_cast_with_precisionÚtime_cast_precisionZ(create_test_procedure_without_params_sqlZ(create_test_procedure_with_int_param_sqlÚ,create_test_table_with_composite_primary_keyÚsupports_callproc_kwargsÚsetZsupported_explain_formatsZsupports_default_in_lead_lagÚsupports_ignore_conflictsÚsupports_update_conflictsÚ%supports_update_conflicts_with_targetÚrequires_casted_case_in_updatesÚsupports_partial_indexesZ%supports_functions_in_partial_indexesÚsupports_covering_indexesÚsupports_expression_indexesÚcollate_as_index_expressionZ*allows_multiple_constraints_on_same_fieldsÚ&supports_boolean_expr_in_select_clauseÚsupports_comparing_boolean_exprÚsupports_json_fieldÚcan_introspect_json_fieldZ!supports_primitives_in_json_fieldÚhas_native_json_fieldZhas_json_operatorsÚsupports_json_field_containsZ-json_key_contains_list_matching_requires_listÚhas_json_object_functionÚsupports_collation_on_charfieldÚsupports_collation_on_textfieldZ%supports_non_deterministic_collationsÚsupports_commentsZsupports_comments_inlineÚsupports_logical_xorZ+prohibits_null_characters_in_text_exceptionÚsupports_unlimited_charfieldÚtest_collationsZtest_now_utc_templateÚdjango_test_expected_failuresÚdjango_test_skipsr   r   r   r&   r+   r   r   r   r   r      s4  ñü

r   N)Ú	django.dbr   Údjango.utils.functionalr   r   r   r   r   r   Ú<module>   s   