
v^.                 @   s7   d  d l  m Z d  d l m Z Gd d   d  Z d S)    )ProgrammingError)cached_propertyc               @   s  e  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 Z. d Z/ d Z0 d Z1 d Z2 d Z3 d Z4 d Z5 d Z6 d Z7 d Z8 d Z9 d Z: d Z; d Z< d Z= d Z> d Z? d Z@ d ZA d ZB d ZC d ZD d ZE d ZF d ZG d ZH d ZI d ZJ eK ZL d ZM d ZN d ZO d ZP d ZQ d ZR d ZS d ZT d ZU d ZV d ZW d ZX d ZY d ZZ d Z[ d Z\ d Z] d Z^ d Z_ d Z` d Za d Zb d Zc ed   Ze d Zf d Zg d Zh d Zi d Zj d Zk d Zl d Zm d	 d
   Zn eo d d    Zp eo d d    Zq d d   Zr d S)BaseDatabaseFeaturesFTNZBigAutoFieldZSmallAutoFieldZBooleanField    c             C   s   | |  _  d  S)N)
connection)selfr    r	   B/tmp/pip-build-8lau8j11/django/django/db/backends/base/features.py__init__'  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_execution*  s    z8BaseDatabaseFeatures.supports_explaining_query_executionc          	   C   s   |  j  j   w } | j d  |  j  j d  | j d  |  j  j   |  j  j d  | j d  | j   \ } | j d  Wd QRX| 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executeZset_autocommitrollbackZ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_pksZ_metaZmanaged)r   modelr	   r	   r
   %allows_group_by_selected_pks_on_model=  s    	z:BaseDatabaseFeatures.allows_group_by_selected_pks_on_model)s__name__
__module____qualname__Zgis_enabledZallows_group_by_pkr   Zempty_fetchmany_valueZupdate_can_self_selectZ!interprets_empty_strings_as_nullsZ$supports_nullable_unique_constraintsZ.supports_partially_nullable_unique_constraintsZcan_use_chunked_readsZcan_return_columns_from_insertZ'can_return_multiple_columns_from_insertZ can_return_rows_from_bulk_insertZhas_bulk_insertZuses_savepointsZcan_release_savepointsZ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select_for_update_of_columnZ#test_db_allows_multiple_connectionsZsupports_unspecified_pkZsupports_forward_referencesZtruncates_namesZhas_real_datatypeZsupports_subqueries_in_group_byZhas_native_uuid_fieldZhas_native_duration_fieldZsupports_temporal_subtractionZsupports_regex_backreferencingZ!supports_date_lookup_using_stringZsupports_timezonesZhas_zoneinfo_databaseZ-requires_explicit_null_ordering_when_groupingZnulls_order_largestZmax_query_paramsZallows_auto_pk_0Zcan_defer_constraint_checksZ(supports_mixed_date_datetime_comparisonsZsupports_tablespacesZsupports_sequence_resetZcan_introspect_defaultZcan_introspect_foreign_keysZcan_introspect_autofieldZ can_introspect_big_integer_fieldZcan_introspect_binary_fieldZcan_introspect_decimal_fieldZcan_introspect_duration_fieldZcan_introspect_ip_address_fieldZ%can_introspect_positive_integer_fieldZ"can_introspect_small_integer_fieldZcan_introspect_time_fieldZ introspected_big_auto_field_typeZ"introspected_small_auto_field_typeZintrospected_boolean_field_typeZsupports_index_column_orderingZ!can_introspect_materialized_viewsZcan_distinct_on_fieldsZatomic_transactionsZcan_rollback_ddlZ!supports_atomic_references_renameZsupports_combined_altersZsupports_foreign_keysZcan_create_inline_fkZ!supports_column_check_constraintsZ supports_table_check_constraintsZ can_introspect_check_constraintsZsupports_paramstyle_pyformatZrequires_literal_defaultsZconnection_persists_old_columnsr   Zclosed_cursor_error_classZhas_case_insensitive_likeZbare_select_suffixZimplied_column_nullZ%supports_select_for_update_with_limitZgreatest_least_ignores_nullsZcan_clone_databasesZignores_table_name_caseZfor_update_after_fromZsupports_select_unionZsupports_select_intersectionZsupports_select_differenceZ%supports_slicing_ordering_in_compoundZ supports_parentheses_in_compoundZ supports_aggregate_filter_clauseZsupports_index_on_text_fieldZsupports_over_clauseZ#supports_frame_range_fixed_distanceZsupports_cast_with_precisionZtime_cast_precisionZ(create_test_procedure_without_params_sqlZ(create_test_procedure_with_int_param_sqlZsupports_callproc_kwargsZ!db_functions_convert_bytes_to_strsetZsupported_explain_formatsZvalidates_explain_optionsZsupports_default_in_lead_lagZsupports_ignore_conflictsZrequires_casted_case_in_updatesZsupports_partial_indexesZ%supports_functions_in_partial_indexesZ*allows_multiple_constraints_on_same_fieldsZ&supports_boolean_expr_in_select_clauser   r   r   r   r   r	   r	   r	   r
   r      s   	r   N)Zdjango.db.utilsr   Zdjango.utils.functionalr   r   r	   r	   r	   r
   <module>   s   