
 X (                 @   sJ   d  d l  m Z d  d l m Z d  d l m Z Gd d   d e  Z d S)    )StdDev)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 eE ZF d ZG d ZH d ZI d ZJ d ZK d ZL d ZM d ZN d ZO d d   ZP eQ d d    ZR eQ d d	    ZS d
 d d d  ZT d
 S)BaseDatabaseFeaturesFT c             C   s   | |  _  d  S)N)
connection)selfr    r	   N/home/ubuntu/projects/ifolica/build/django/django/db/backends/base/features.py__init__   s    zBaseDatabaseFeatures.__init__c          	   C   s   |  j  j   w } | j d  |  j  j d  | j d  |  j  j   |  j  j d  | j d  | j   \ } | j d  Wd QX| 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>   y! |  j  j j t d   d SWn t k
 r9 d SYn Xd S)z7Confirm support for STDDEV and related stats functions.   TFN)r   opsZcheck_expression_supportr   NotImplementedError)r   r	   r	   r
   supports_stddev   s
    z$BaseDatabaseFeatures.supports_stddevNc             C   s    |  j  r | r | j r d Sd S)a  
        What is the type returned when the backend introspects a BooleanField?
        The optional arguments may be used to give further details of the field to be
        introspected; in particular, they are provided by Django's test suite:
        field -- the field definition
        created_separately -- True if the field was added via a SchemaEditor's AddField,
                              False if the field was created with the model

        Note that return value from this function is compared by tests against actual
        introspection results; it should provide expectations, not run an introspection
        itself.
        ZNullBooleanFieldZBooleanField)can_introspect_nullnull)r   fieldZcreated_separatelyr	   r	   r
   introspected_boolean_field_type   s    z4BaseDatabaseFeatures.introspected_boolean_field_type)U__name__
__module____qualname__Zgis_enabledZallows_group_by_pkZallows_group_by_selected_pksZ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_id_from_insertZcan_return_ids_from_bulk_insertZhas_bulk_insertZuses_savepointsZcan_release_savepointsZ6can_combine_inserts_with_and_without_auto_increment_pkZrelated_fields_match_typeZallow_sliced_subqueriesZhas_select_for_updateZhas_select_for_update_nowaitZsupports_select_relatedZ#test_db_allows_multiple_connectionsZsupports_unspecified_pkZsupports_forward_referencesZtruncates_namesZhas_real_datatypeZsupports_subqueries_in_group_byZsupports_bitwise_orZhas_native_uuid_fieldZhas_native_duration_fieldZsupports_temporal_subtractionZdriver_supports_timedelta_argsZsupports_microsecond_precisionZsupports_regex_backreferencingZ!supports_date_lookup_using_stringZsupports_timezonesZhas_zoneinfo_databaseZ-requires_explicit_null_ordering_when_groupingZnulls_order_largestZsupports_1000_query_parametersZallows_auto_pk_0Zcan_defer_constraint_checksZ(supports_mixed_date_datetime_comparisonsZsupports_tablespacesZsupports_sequence_resetZcan_introspect_max_lengthr   Z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_ip_address_fieldZ%can_introspect_positive_integer_fieldZ"can_introspect_small_integer_fieldZcan_introspect_time_fieldZcan_distinct_on_fieldsZ"autocommits_when_autocommit_is_offZatomic_transactionsZcan_rollback_ddlZsupports_combined_altersZsupports_foreign_keysZ!supports_column_check_constraintsZsupports_paramstyle_pyformatZrequires_literal_defaultsZconnection_persists_old_columnsr   Zclosed_cursor_error_classZhas_case_insensitive_likeZrequires_sqlparse_for_splittingZbare_select_suffixZimplied_column_nullZuppercases_column_namesZ%supports_select_for_update_with_limitZgreatest_least_ignores_nullsZcan_clone_databasesZignores_quoted_identifier_caser   r   r   r   r   r	   r	   r	   r
   r      s   	r   N)Zdjango.db.models.aggregatesr   Zdjango.db.utilsr   Zdjango.utils.functionalr   objectr   r	   r	   r	   r
   <module>   s   