o
    þÞhJ>  ã                   @   s*   d dl mZ d dlmZ G dd„ dƒZdS )é    )ÚProgrammingError)Úcached_propertyc                   @   sŒ  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Z5dZ6dddddd	d
dddddddddœZ7dZ8dZ9dZ:dZ;dZ<dZ=dZ>dZ?dZ@dZAdZBdZCdZDdZEdZFdZGdZHdZIdZJdZKeLZMd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ZbdZcdZddZedZfegƒ 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Z�dZ‚dZƒdZ„dZ…dZ†dZ‡dZˆddddddœZ‰dZŠdZ‹dZŒegƒ 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_defaultÚ
swedish_ciÚvirtualc                 C   s
   || _ d S )N)Ú
connection)Úselfr   © r   ú`/var/www/html/premium_crap/venv/lib/python3.10/site-packages/django/db/backends/base/features.pyÚ__init__Š  s   
zBaseDatabaseFeatures.__init__c                 C   s   | j jjduS )z5Does this backend support explaining query execution?N)r   ÚopsÚexplain_prefix)r   r   r   r   Ú#supports_explaining_query_execution�  s   z8BaseDatabaseFeatures.supports_explaining_query_executionc                 C   sŒ   | j  ¡ �5}| d¡ | j  d¡ | d¡ | j  ¡  | j  d¡ | d¡ | ¡ \}| d¡ W d  ƒ |dkS 1 s=w   Y  |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_TESTNr   )r   ÚcursorÚexecuteÚset_autocommitÚrollbackÚfetchone)r   r#   Úcountr   r   r   Úsupports_transactions’  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_versionÚgis_enabledÚallows_group_by_lobr*   Úallows_group_by_select_indexÚempty_fetchmany_valueÚupdate_can_self_selectÚ"delete_can_self_reference_subqueryÚ!interprets_empty_strings_as_nullsÚ$supports_nullable_unique_constraintsÚ.supports_partially_nullable_unique_constraintsÚ*supports_nulls_distinct_unique_constraintsÚ&supports_deferrable_unique_constraintsÚcan_use_chunked_readsÚcan_return_columns_from_insertÚ can_return_rows_from_bulk_insertÚhas_bulk_insertÚuses_savepointsÚcan_release_savepointsÚrelated_fields_match_typeÚallow_sliced_subqueries_with_inÚhas_select_for_updateÚhas_select_for_update_nowaitÚ!has_select_for_update_skip_lockedÚhas_select_for_update_ofÚhas_select_for_no_key_updateÚselect_for_update_of_columnÚ#test_db_allows_multiple_connectionsÚsupports_unspecified_pkÚsupports_forward_referencesÚtruncates_namesÚhas_real_datatypeÚsupports_subqueries_in_group_byÚ*ignores_unnecessary_order_by_in_subqueriesÚhas_native_uuid_fieldÚhas_native_duration_fieldÚsupports_temporal_subtractionÚsupports_regex_backreferencingÚ!supports_date_lookup_using_stringÚsupports_timezonesÚhas_zoneinfo_databaseÚ-requires_explicit_null_ordering_when_groupingÚnulls_order_largestÚ supports_order_by_nulls_modifierÚorder_by_nulls_firstÚmax_query_paramsÚallows_auto_pk_0Úcan_defer_constraint_checksÚsupports_tablespacesÚsupports_sequence_resetÚcan_introspect_defaultÚcan_introspect_foreign_keysÚintrospected_field_typesÚsupports_index_column_orderingÚ!can_introspect_materialized_viewsÚcan_distinct_on_fieldsÚatomic_transactionsÚcan_rollback_ddlÚ+schema_editor_uses_clientside_param_bindingÚsupports_combined_altersÚsupports_foreign_keysÚcan_create_inline_fkÚcan_rename_indexÚindexes_foreign_keysÚ!supports_column_check_constraintsÚ supports_table_check_constraintsÚ can_introspect_check_constraintsÚsupports_paramstyle_pyformatÚrequires_literal_defaultsÚsupports_expression_defaultsÚ"supports_default_keyword_in_insertÚ'supports_default_keyword_in_bulk_insertÚconnection_persists_old_columnsr   Úclosed_cursor_error_classÚhas_case_insensitive_likeÚbare_select_suffixÚimplied_column_nullÚ%supports_select_for_update_with_limitÚgreatest_least_ignores_nullsÚcan_clone_databasesÚignores_table_name_caseÚfor_update_after_fromÚsupports_select_unionÚsupports_select_intersectionÚsupports_select_differenceÚ%supports_slicing_ordering_in_compoundÚ supports_parentheses_in_compoundÚ#requires_compound_order_by_subqueryÚ supports_aggregate_filter_clauseÚsupports_index_on_text_fieldÚsupports_over_clauseÚ#supports_frame_range_fixed_distanceÚsupports_frame_exclusionÚ4only_supports_unbounded_with_preceding_and_followingÚsupports_cast_with_precisionÚtime_cast_precisionÚ(create_test_procedure_without_params_sqlÚ(create_test_procedure_with_int_param_sqlÚsupports_callproc_kwargsÚsetÚsupported_explain_formatsÚsupports_default_in_lead_lagÚsupports_ignore_conflictsÚsupports_update_conflictsÚ%supports_update_conflicts_with_targetÚrequires_casted_case_in_updatesÚsupports_partial_indexesÚ%supports_functions_in_partial_indexesÚsupports_covering_indexesÚsupports_expression_indexesÚcollate_as_index_expressionÚ*allows_multiple_constraints_on_same_fieldsÚ&supports_boolean_expr_in_select_clauseÚsupports_comparing_boolean_exprÚsupports_json_fieldÚcan_introspect_json_fieldÚ!supports_primitives_in_json_fieldÚhas_native_json_fieldÚhas_json_operatorsÚsupports_json_field_containsÚ-json_key_contains_list_matching_requires_listÚhas_json_object_functionÚsupports_collation_on_charfieldÚsupports_collation_on_textfieldÚ%supports_non_deterministic_collationsÚsupports_commentsÚsupports_comments_inlineÚ!supports_stored_generated_columnsÚ"supports_virtual_generated_columnsÚsupports_logical_xorÚ+prohibits_null_characters_in_text_exceptionÚsupports_unlimited_charfieldÚsupports_tuple_lookupsÚtest_collationsÚtest_now_utc_templateÚinsert_test_table_with_defaultsÚrounds_to_evenÚdjango_test_expected_failuresÚdjango_test_skipsr   r   r"   r)   r.   r   r   r   r   r      sJ   ñû

r   N)Ú	django.dbr   Údjango.utils.functionalr   r   r   r   r   r   Ú<module>   s    