
i4Vdc           @   sJ   d  d l  m Z d  d l m Z d  d l m Z d e f d     YZ d S(   i(   t   StdDev(   t   ProgrammingError(   t   cached_propertyt   BaseDatabaseFeaturesc           B   s  e  Z e Z e Z e Z g  Z e Z e Z	 e Z
 e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z e Z  e Z! e Z" e Z# e Z$ e Z% e Z& e Z' e Z( e Z) e Z* e Z+ e Z, e Z- e Z. e Z/ e Z0 e Z1 e Z2 e Z3 e Z4 e Z5 e Z6 e Z7 e Z8 e Z9 e Z: e Z; e Z< e Z= e Z> e Z? e Z@ e ZA e ZB e ZC eD ZE e ZF e ZG d  ZH e ZI e ZJ e ZK e ZL e ZM d   ZN eO d    ZP eO d    ZQ d e d  ZS RS(   t    c         C   s   | |  _  d  S(   N(   t
   connection(   t   selfR   (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/db/backends/base/features.pyt   __init__   s    c         C   s   |  j  j   w } | j d  |  j  j t  | j d  |  j  j   |  j  j t  | j d  | j   \ } | j d  Wd QX| d k S(   s!   Confirm support for transactions.s"   CREATE TABLE ROLLBACK_TEST (X INT)s(   INSERT INTO ROLLBACK_TEST (X) VALUES (8)s"   SELECT COUNT(X) FROM ROLLBACK_TESTs   DROP TABLE ROLLBACK_TESTNi    (   R   t   cursort   executet   set_autocommitt   Falset   rollbackt   Truet   fetchone(   R   R   t   count(    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/db/backends/base/features.pyt   supports_transactions   s    c         C   s:   y! |  j  j j t d   t SWn t k
 r5 t SXd S(   s7   Confirm support for STDDEV and related stats functions.i   N(   R   t   opst   check_expression_supportR    R   t   NotImplementedErrorR   (   R   (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/db/backends/base/features.pyt   supports_stddev   s
    c         C   s    |  j  r | r | j r d Sd S(   s  
        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.
        t   NullBooleanFieldt   BooleanField(   t   can_introspect_nullt   null(   R   t   fieldt   created_separately(    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/db/backends/base/features.pyt   introspected_boolean_field_type   s    N(T   t   __name__t
   __module__R   t   gis_enabledt   allows_group_by_pkt   allows_group_by_selected_pkst   empty_fetchmany_valueR   t   update_can_self_selectt!   interprets_empty_strings_as_nullst$   supports_nullable_unique_constraintst.   supports_partially_nullable_unique_constraintst   can_use_chunked_readst   can_return_id_from_insertt   has_bulk_insertt   uses_savepointst   can_release_savepointst6   can_combine_inserts_with_and_without_auto_increment_pkt   related_fields_match_typet   allow_sliced_subqueriest   has_select_for_updatet   has_select_for_update_nowaitt   supports_select_relatedt#   test_db_allows_multiple_connectionst   supports_unspecified_pkt   supports_forward_referencest   truncates_namest   has_real_datatypet   supports_subqueries_in_group_byt   supports_bitwise_ort   has_native_uuid_fieldt   has_native_duration_fieldt   driver_supports_timedelta_argst   supports_microsecond_precisiont   supports_regex_backreferencingt!   supports_date_lookup_using_stringt   supports_timezonest   has_zoneinfo_databaset-   requires_explicit_null_ordering_when_groupingt   nulls_order_largestt   supports_1000_query_parameterst   allows_auto_pk_0t   can_defer_constraint_checkst(   supports_mixed_date_datetime_comparisonst   supports_tablespacest   supports_sequence_resett   can_introspect_max_lengthR   t   can_introspect_defaultt   can_introspect_foreign_keyst   can_introspect_autofieldt    can_introspect_big_integer_fieldt   can_introspect_binary_fieldt   can_introspect_decimal_fieldt   can_introspect_ip_address_fieldt%   can_introspect_positive_integer_fieldt"   can_introspect_small_integer_fieldt   can_introspect_time_fieldt   can_distinct_on_fieldst"   autocommits_when_autocommit_is_offt   atomic_transactionst   can_rollback_ddlt   supports_combined_alterst   supports_foreign_keyst!   supports_column_check_constraintst   supports_paramstyle_pyformatt   requires_literal_defaultst   connection_persists_old_columnsR   t   closed_cursor_error_classt   has_case_insensitive_liket   requires_sqlparse_for_splittingt   bare_select_suffixt   implied_column_nullt   uppercases_column_namest%   supports_select_for_update_with_limitt   greatest_least_ignores_nullst   can_clone_databasesR   R   R   R   t   NoneR   (    (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/db/backends/base/features.pyR      s   		N(   t   django.db.models.aggregatesR    t   django.db.utilsR   t   django.utils.functionalR   t   objectR   (    (    (    sn   /var/www/html/phendo-backend/phendo_python/env/lib/python2.7/site-packages/django/db/backends/base/features.pyt   <module>   s   