o
    b                     @   s`   d dl Z 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                       s  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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 dddd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Z+  Z,S )DatabaseFeaturesTFi     )r	      r   )r	      r   )r	      r   r	      r   )r	      r   )r	   r   r   Znocasebinary)cicsZnon_defaultc                 C   sL   dhh ddhd}t jdk r|ddhi | j r$|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_dropsHschema.tests.SchemaTests.test_alter_field_default_doesnt_perform_queriesKschema.tests.SchemaTests.test_rename_column_renames_deferred_sql_referenceszMmodel_fields.test_integerfield.PositiveIntegerFieldTests.test_negative_values)z6SQLite stores values rounded to 15 significant digits.z5SQLite naively remakes the table on field alteration.z!SQLite doesn't have a constraint.)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_connections)r   sqlite_version_infoupdate
connectionZis_in_memory_db)selfskips r   b/var/www/secure340b-portal/env/lib/python3.10/site-packages/django/db/backends/sqlite3/features.pydjango_test_skips5   s&   

z"DatabaseFeatures.django_test_skipsc                 C   s*   t  d drtjdkrdS tjdkS )Nr   z10.15.r   F)r	      r   )platformmac_ver
startswithr   r   r   r   r   r   !supports_atomic_references_renameT   s   
z2DatabaseFeatures.supports_atomic_references_renamec                    s   i t  jdddddS )NZ	AutoFieldZBigIntegerFieldZ	CharField)ZBigAutoFieldZDurationFieldZGenericIPAddressFieldZSmallAutoField)superintrospected_field_typesr$   	__class__r   r   r'   \   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   Zatomicaliasexecuter   )r   r*   r   r   r   supports_json_fieldf   s   
z$DatabaseFeatures.supports_json_fieldr-   )-__name__
__module____qualname__Zcan_use_chunked_readsZ#test_db_allows_multiple_connectionsZsupports_unspecified_pkZsupports_timezonesZmax_query_paramsZ(supports_mixed_date_datetime_comparisonsZsupports_transactionsZatomic_transactionsZcan_rollback_ddlZcan_create_inline_fkZsupports_paramstyle_pyformatZcan_clone_databasesZsupports_temporal_subtractionZignores_table_name_caseZsupports_cast_with_precisionZtime_cast_precisionZcan_release_savepointsr   r   Zcan_alter_table_rename_columnZ supports_parentheses_in_compoundZ!supports_pragma_foreign_key_checkZcan_defer_constraint_checksZ%supports_functions_in_partial_indexesZsupports_over_clauseZ#supports_frame_range_fixed_distanceZ supports_aggregate_filter_clauseZ supports_order_by_nulls_modifierZorder_by_nulls_firstZsupports_json_field_containsZtest_collationsr   r   r%   r'   r-   propertyoperator
attrgetterZcan_introspect_json_fieldZhas_json_object_function__classcell__r   r   r(   r   r      sV    








	
	r   )r2   r!   Z	django.dbr   Z django.db.backends.base.featuresr   Zdjango.db.utilsr   Zdjango.utils.functionalr   baser   r   r   r   r   r   <module>   s    