
0_c           @   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   BaseDatabaseFeatures(   t   cached_propertyi   (   t   Databaset   DatabaseFeaturesc           B   s  e  Z d 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 d     Z  e d    Z! e d    Z" e d    Z# d   Z$ e d    Z% e d    Z& e d    Z' RS(	   c         C   s9   |  j  j     } | j d  | j   } Wd QX| d S(   sG   Internal method used in Django tests. Don't rely on this from your codesG   SELECT ENGINE FROM INFORMATION_SCHEMA.ENGINES WHERE SUPPORT = 'DEFAULT'Ni    (   t
   connectiont   cursort   executet   fetchone(   t   selfR   t   result(    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   _mysql_storage_engine$   s    c         C   s   |  j  d k S(   s-   Confirm support for introspected foreign keyst   MyISAM(   R
   (   R   (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   can_introspect_foreign_keys,   s    c         C   s   |  j  j d k o t j d k S(   Ni   i   i   i   i   (   i   i   i   (   i   i   i   (   R   t   mysql_versionR   t   version_info(   R   (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   supports_microsecond_precision1   s    c         C   s9   |  j  j   $ } | j d  | j   d  k	 SWd  QXd  S(   Ns%   SELECT 1 FROM mysql.time_zone LIMIT 1(   R   R   R   R   t   None(   R   R   (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   has_zoneinfo_database7   s    c         O   s   d S(   Nt   IntegerField(    (   R   t   argst   kwargs(    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   introspected_boolean_field_type>   s    c         C   sI   |  j  j   4 } | j d  | j   } | o> | d d k SWd  QXd  S(   Ns   SELECT @@SQL_AUTO_IS_NULLi    i   (   R   R   R   R   (   R   R   R	   (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   is_sql_auto_is_null_enabledA   s    c         C   s   |  j  d k S(   sI   
        All storage engines except MyISAM support transactions.
        R   (   R
   (   R   (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   supports_transactionsH   s    c         C   sI   |  j  j   4 } | j d  | j   } | o> | d d k SWd  QXd  S(   Ns   SELECT @@LOWER_CASE_TABLE_NAMESi    (   R   R   R   R   (   R   R   R	   (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   ignores_table_name_caseO   s    (    ((   t   __name__t
   __module__t   empty_fetchmany_valuet   Falset   update_can_self_selectt   Truet   allows_group_by_pkt   related_fields_match_typet   allow_sliced_subqueriest   has_bulk_insertt   has_select_for_updatet   has_select_for_update_nowaitt   supports_forward_referencest   supports_regex_backreferencingt!   supports_date_lookup_using_stringt   can_introspect_autofieldt   can_introspect_binary_fieldt"   can_introspect_small_integer_fieldt   supports_index_column_orderingt   supports_timezonest-   requires_explicit_null_ordering_when_groupingt   allows_auto_pk_0t   uses_savepointst   can_release_savepointst   atomic_transactionst!   supports_column_check_constraintst   can_clone_databasest   supports_temporal_subtractiont   supports_select_intersectiont   supports_select_differencet%   supports_slicing_ordering_in_compoundR   R
   R   R   R   R   R   R   R   (    (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyR      sF   	N(   t    django.db.backends.base.featuresR    t   django.utils.functionalR   t   baseR   R   (    (    (    sC   /tmp/pip-unpacked-wheel-BAJOf3/django/db/backends/mysql/features.pyt   <module>   s   