o
    `Zh                     @   s<   d dl mZmZ d dlmZ d dlmZ G dd deZdS )    )DatabaseErrorInterfaceError)BaseDatabaseFeatures)cached_propertyc                
       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dZdZdZdZdZdZdZdZdZdZ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Z0dZ1dZ2dZ3dZ4dZ5dZ6d	Z7d
dhddhddhh ddhdhdhdhdhd	Z8ddhZ9dZ:e; fddZ<e;dd Z=e;dd Z>e;d d! Z?e;d"d# Z@  ZAS )$DatabaseFeatures)   FTz
 FROM DUALz|
        CREATE PROCEDURE "TEST_PROCEDURE" AS
            V_I INTEGER;
        BEGIN
            V_I := 1;
        END;
    z
        CREATE PROCEDURE "TEST_PROCEDURE" (P_I INTEGER) AS
            V_I INTEGER;
        BEGIN
            V_I := P_I;
        END;
    z
        CREATE TABLE test_table_composite_pk (
            column_1 NUMBER(11) NOT NULL,
            column_2 NUMBER(11) NOT NULL,
            PRIMARY KEY (column_1, column_2)
        )
    i  z$CURRENT_TIMESTAMP AT TIME ZONE 'UTC'z4db_functions.text.test_sha224.SHA224Tests.test_basicz8db_functions.text.test_sha224.SHA224Tests.test_transformzVdb_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_week_before_1000zbdb_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_trunc_week_before_1000zadb_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_second_func_no_fractionalzmdb_functions.datetime.test_extract_trunc.DateFunctionWithTimeZoneTests.test_extract_second_func_no_fractional>   zHexpressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_nullzNexpressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_right_nullzCexpressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xorzHexpressions_window.tests.WindowFunctionTests.test_row_number_no_orderingz?model_fields.test_jsonfield.TestQuerying.test_usage_in_subqueryzMmigrations.test_operations.OperationTests.test_alter_field_pk_fk_db_collationzIgeneric_relations_regress.tests.GenericRelationTests.test_textlink_filterz?lookup.tests.LookupQueryingTests.test_aggregate_combined_lookup)	zOracle doesn't support SHA224.zwOracle doesn't correctly calculate ISO 8601 week numbering before 1583 (the Gregorian calendar was introduced in 1582).z>Oracle extracts seconds including fractional seconds (#33517).z#Oracle doesn't support bitwise XOR.z9Oracle requires ORDER BY in row_number, ANSI:SQL doesn't.z&Raises ORA-00600: internal error code.zGOracle doesn't support changing collations on indexed columns (#33671).z1Oracle doesn't support comparing NCLOB to NUMBER.z1Oracle doesn't support casting filters to NUMBER.zFannotations.tests.NonAggregateAnnotationTestCase.test_custom_functionsz^annotations.tests.NonAggregateAnnotationTestCase.test_custom_functions_can_ref_other_functionsz1INSERT INTO {} VALUES (DEFAULT, DEFAULT, DEFAULT)c                    s   i t  jdddddddS )NZ	CharFieldZBigIntegerFieldZIntegerFieldZDateTimeField)ZGenericIPAddressFieldZPositiveBigIntegerFieldZPositiveIntegerFieldZPositiveSmallIntegerFieldZSmallIntegerFieldZ	TimeField)superintrospected_field_typesself	__class__ Y/var/www/html/lang_env/lib/python3.10/site-packages/django/db/backends/oracle/features.pyr	      s   z)DatabaseFeatures.introspected_field_typesc                 C   s   dddd| j rddS d dS )NZ	BINARY_CIBINARYZ
SWEDISH_CI)cicsZnon_defaultZ
swedish_ciZvirtual)supports_collation_on_charfieldr
   r   r   r   test_collations   s   z DatabaseFeatures.test_collationsc                 C   s   | j  4}z|d W n" ty/ } z|jd jdkr*W Y d }~W d    dS  d }~ww 	 W d    dS 1 s<w   Y  d S )Nz,SELECT CAST('a' AS VARCHAR2(4001)) FROM dualr   i  FT)
connectioncursorexecuter   argscode)r   r   er   r   r   r      s   
$z0DatabaseFeatures.supports_collation_on_charfieldc                 C      | j jdkS )N)   r   Zoracle_versionr
   r   r   r   !supports_primitives_in_json_field      z2DatabaseFeatures.supports_primitives_in_json_fieldc                 C   r   )N)   r   r
   r   r   r   &supports_boolean_expr_in_select_clause   r   z7DatabaseFeatures.supports_boolean_expr_in_select_clause)B__name__
__module____qualname__Zminimum_database_versionZallows_group_by_lobZallows_group_by_select_indexZ!interprets_empty_strings_as_nullsZhas_select_for_updateZhas_select_for_update_nowaitZ!has_select_for_update_skip_lockedZhas_select_for_update_ofZselect_for_update_of_columnZcan_return_columns_from_insertZsupports_subqueries_in_group_byZ*ignores_unnecessary_order_by_in_subqueriesZsupports_transactionsZsupports_timezonesZhas_native_duration_fieldZcan_defer_constraint_checksZ.supports_partially_nullable_unique_constraintsZ&supports_deferrable_unique_constraintsZtruncates_namesZsupports_commentsZsupports_tablespacesZsupports_sequence_resetZ!can_introspect_materialized_viewsZatomic_transactionsZnulls_order_largestZrequires_literal_defaultsZ'supports_default_keyword_in_bulk_insertr   Zclosed_cursor_error_classZbare_select_suffixZ%supports_select_for_update_with_limitZsupports_temporal_subtractionZignores_table_name_caseZsupports_index_on_text_fieldZ(create_test_procedure_without_params_sqlZ(create_test_procedure_with_int_param_sqlZ,create_test_table_with_composite_primary_keyZsupports_callproc_kwargsZsupports_over_clauseZ#supports_frame_range_fixed_distanceZsupports_ignore_conflictsZmax_query_paramsZsupports_partial_indexesZ!supports_stored_generated_columnsZ"supports_virtual_generated_columnsZcan_rename_indexZ%supports_slicing_ordering_in_compoundZ#requires_compound_order_by_subqueryZ*allows_multiple_constraints_on_same_fieldsZsupports_comparing_boolean_exprZsupports_json_field_containsZsupports_collation_on_textfieldZtest_now_utc_templateZdjango_test_skipsZdjango_test_expected_failuresZinsert_test_table_with_defaultsr   r	   r   r   r   r!   __classcell__r   r   r   r   r      s    +
	


r   N)Z	django.dbr   r   Z django.db.backends.base.featuresr   Zdjango.utils.functionalr   r   r   r   r   r   <module>   s    