o
    ˜¨Êhß  ã                   @   sX   d dl Z d dlmZ d dlmZ d dlmZ d dlmZ ddl	m
Z
 G dd	„ d	eƒZdS )
é    N)Útransaction)ÚBaseDatabaseFeatures)ÚOperationalError)Úcached_propertyé   )ÚDatabasec                       sB  e 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ejdkZejdkZdZejdkZeZejd	kZejdkZejd
kZejdkZejdkZ dZ!dZ"ejdkZ#e#Z$ddddœZ%dhZ&e'dd„ ƒZ(e'dd„ ƒZ)e'‡ fdd„ƒZ*e'dd„ ƒZ+e,e- .d¡ƒZ/e,e- .d¡ƒZ0e'dd„ ƒZ1e,e- .d¡ƒZ2‡  Z3S )ÚDatabaseFeatures)é   é	   FTiç  r	   )r	   é   r   )r	   é#   é   )r	   é   r   )r	   é   r   )r	   é   r   )r	   é   r   )r	   r   r   )r	   é   r   ÚnocaseÚbinary)ÚciÚcsÚnon_defaultz9expressions.tests.FTimeDeltaTests.test_mixed_comparisons1c                 C   sP   dhh d£h d£dœ}t jdk r| ddhi¡ | j ¡ r&| dd	d
hi¡ |S )NzZmodel_fields.test_decimalfield.DecimalFieldTests.test_fetch_from_db_without_float_rounding>   ú4schema.tests.SchemaTests.test_unique_and_reverse_m2mú<schema.tests.SchemaTests.test_unique_no_unnecessary_fk_dropsúHschema.tests.SchemaTests.test_alter_field_default_doesnt_perform_queriesúKschema.tests.SchemaTests.test_rename_column_renames_deferred_sql_references>   úIdb_functions.math.test_round.RoundTests.test_null_with_negative_precisionúJdb_functions.math.test_round.RoundTests.test_float_with_negative_precisionúLdb_functions.math.test_round.RoundTests.test_decimal_with_negative_precisionúLdb_functions.math.test_round.RoundTests.test_integer_with_negative_precision)z6SQLite stores values rounded to 15 significant digits.z5SQLite naively remakes the table on field alteration.z6SQLite doesn't support negative precision for ROUND().)r	   é   z*Nondeterministic failure on SQLite < 3.27.zIexpressions_window.tests.WindowFunctionTests.test_subquery_row_range_rankzOthe sqlite backend's close() method is a no-op when using an in-memory databasezJservers.test_liveserverthread.LiveServerThreadTest.test_closes_connectionszGservers.tests.LiveServerTestCloseConnectionTest.test_closes_connections)r   Úsqlite_version_infoÚupdateÚ
connectionÚis_in_memory_db)ÚselfÚskips© r'   úU/var/www/html/env/lib/python3.10/site-packages/django/db/backends/sqlite3/features.pyÚdjango_test_skips;   s*   ÿó
ÿÿÿ
ýþÿz"DatabaseFeatures.django_test_skipsc                 C   ó
   t jdkS )N)r	   é   r   ©r   r!   ©r%   r'   r'   r(   Ú!supports_atomic_references_renamel   ó   
z2DatabaseFeatures.supports_atomic_references_renamec                    s   i t ƒ j¥dddddœ¥S )NÚ	AutoFieldÚBigIntegerFieldÚ	CharField)ÚBigAutoFieldÚDurationFieldÚGenericIPAddressFieldÚSmallAutoField)ÚsuperÚintrospected_field_typesr-   ©Ú	__class__r'   r(   r8   p   s   ÿûz)DatabaseFeatures.introspected_field_typesc              	   C   sŽ   | j  ¡ �8}zt | j j¡� | d¡ W d   ƒ n1 sw   Y  W n ty4   Y W d   ƒ dS w W d   ƒ dS 1 s@w   Y  dS )NzSELECT JSON('{"a": "b"}')FT)r#   Úcursorr   ÚatomicÚaliasÚexecuter   )r%   r;   r'   r'   r(   Úsupports_json_fieldz   s   ÿ€û€
üúz$DatabaseFeatures.supports_json_fieldr?   c                 C   r*   )N)r	   r   r,   r-   r'   r'   r(   Úcan_return_columns_from_insert‡   r/   z/DatabaseFeatures.can_return_columns_from_insertr@   )4Ú__name__Ú
__module__Ú__qualname__Úminimum_database_versionÚ#test_db_allows_multiple_connectionsÚsupports_unspecified_pkÚsupports_timezonesÚmax_query_paramsÚsupports_transactionsÚatomic_transactionsÚcan_rollback_ddlÚcan_create_inline_fkÚsupports_paramstyle_pyformatÚrequires_literal_defaultsÚcan_clone_databasesÚsupports_temporal_subtractionÚignores_table_name_caseÚsupports_cast_with_precisionÚtime_cast_precisionÚcan_release_savepointsÚhas_case_insensitive_liker   r!   Úcan_alter_table_rename_columnÚcan_alter_table_drop_columnÚ supports_parentheses_in_compoundÚ!supports_pragma_foreign_key_checkÚcan_defer_constraint_checksÚ%supports_functions_in_partial_indexesÚsupports_over_clauseÚ#supports_frame_range_fixed_distanceÚ supports_aggregate_filter_clauseÚ supports_order_by_nulls_modifierÚorder_by_nulls_firstÚsupports_json_field_containsÚsupports_update_conflictsÚ%supports_update_conflicts_with_targetÚtest_collationsÚdjango_test_expected_failuresr   r)   r.   r8   r?   ÚpropertyÚoperatorÚ
attrgetterÚcan_introspect_json_fieldÚhas_json_object_functionr@   Ú can_return_rows_from_bulk_insertÚ__classcell__r'   r'   r9   r(   r      sl    








ýý
0
	
	
ÿr   )rg   Ú	django.dbr   Ú django.db.backends.base.featuresr   Údjango.db.utilsr   Údjango.utils.functionalr   Úbaser   r   r'   r'   r'   r(   Ú<module>   s    