
 XZ                 @   s   d  d l  Z  d  d l Z d  d l Z d  d l m Z d  d l m Z d  d l m Z d  d l	 m
 Z
 d  d l m Z m Z d  d l m Z d  d l m Z d  d	 l m Z Gd
 d   d e  Z d S)    N)import_module)settings)ImproperlyConfigured)utils)sixtimezone)parse_duration)RemovedInDjango20Warning)
force_textc               @   sl  e  Z d  Z d Z d Z i d d 6d d 6d d 6d d 6d d 6Z d d   Z d d   Z d d   Z d d   Z	 d d   Z
 d d   Z d d   Z d d   Z d d    Z d! d"   Z d# d$   Z d% d&   Z d' d(   Z d) d*   Z d+ d,   Z d- d.   Z d/ d0   Z d1 d2   Z d3 d4   Z d5 d6 d7  Z d8 d9   Z d: d;   Z d< d=   Z d> d? d@  Z dA dB   Z dC dD   Z dE dF   Z  dG dH   Z! dI dJ   Z" dK dL   Z# dM dN   Z$ dO dP   Z% dQ dR   Z& dS dT   Z' dU dV   Z( dW dX   Z) dY dZ   Z* d[ d\   Z+ d] d^   Z, d5 d_ d`  Z- da db   Z. dc dd   Z/ de df   Z0 dg dh di  Z1 d5 dj dk  Z2 dl dm   Z3 e3 Z4 dn do   Z5 dp dq   Z6 dr ds   Z7 dt du   Z8 dv dw   Z9 d> d> dx dy  Z: dz d{   Z; d| d}   Z< d~ d   Z= d d   Z> d d   Z? d d   Z@ d d   ZA d d   ZB d d   ZC d d   ZD d d   ZE d d   ZF d d   ZG d> S)BaseDatabaseOperationsz
    This class encapsulates all backend-specific differences, such as the way
    a backend performs ordering or calculates the ID of a recently-inserted
    row.
    zdjango.db.models.sql.compileri     ZSmallIntegerFieldl        ZIntegerFieldl                ZBigIntegerFieldr   ZPositiveSmallIntegerFieldZPositiveIntegerFieldc             C   s   | |  _  d  |  _ d  S)N)
connection_cache)selfr    r   P/home/ubuntu/projects/ifolica/build/django/django/db/backends/base/operations.py__init__!   s    	zBaseDatabaseOperations.__init__c             C   s   d S)z
        Returns any SQL needed to support auto-incrementing primary keys, or
        None if no SQL is necessary.

        This SQL is executed when a table is created.
        Nr   )r   tablecolumnr   r   r   autoinc_sql%   s    z"BaseDatabaseOperations.autoinc_sqlc             C   s
   t  |  S)z
        Returns the maximum allowed batch size for the backend. The fields
        are the fields going to be inserted in the batch, the objs contains
        all the objects to be inserted.
        )len)r   fieldsobjsr   r   r   bulk_batch_size.   s    z&BaseDatabaseOperations.bulk_batch_sizec             C   s   d S)z
        Returns an SQL query that retrieves the first cache key greater than the
        n smallest.

        This is used by the 'db' cache backend to determine where to start
        culling.
        z>SELECT cache_key FROM %s ORDER BY cache_key LIMIT 1 OFFSET %%sr   )r   r   r   r   cache_key_culling_sql6   s    z,BaseDatabaseOperations.cache_key_culling_sqlc             C   s   d S)z
        Given a field instance, returns the SQL necessary to cast the result of
        a union to that type. Note that the resulting string should contain a
        '%s' placeholder for the expression being cast.
        z%sr   )r   Zoutput_fieldr   r   r   unification_cast_sql@   s    z+BaseDatabaseOperations.unification_cast_sqlc             C   s   t  d   d S)z
        Given a lookup_type of 'year', 'month' or 'day', returns the SQL that
        extracts a value from the given date field field_name.
        zLsubclasses of BaseDatabaseOperations may require a date_extract_sql() methodN)NotImplementedError)r   lookup_type
field_namer   r   r   date_extract_sqlH   s    z'BaseDatabaseOperations.date_extract_sqlc             C   s   t  d   d S)zL
        Implements the date interval functionality for expressions
        zMsubclasses of BaseDatabaseOperations may require a date_interval_sql() methodN)r   )r   	timedeltar   r   r   date_interval_sqlO   s    z(BaseDatabaseOperations.date_interval_sqlc             C   s   t  d   d S)z
        Given a lookup_type of 'year', 'month' or 'day', returns the SQL that
        truncates the given date field field_name to a date object with only
        the given specificity.
        zIsubclasses of BaseDatabaseOperations may require a datetrunc_sql() methodN)r   )r   r   r    r   r   r   date_trunc_sqlU   s    z%BaseDatabaseOperations.date_trunc_sqlc             C   s   t  d   d S)zS
        Returns the SQL necessary to cast a datetime value to date value.
        zNsubclasses of BaseDatabaseOperations may require a datetime_cast_date() methodN)r   )r   r    tznamer   r   r   datetime_cast_date_sql]   s    z-BaseDatabaseOperations.datetime_cast_date_sqlc             C   s   t  d   d S)z
        Given a lookup_type of 'year', 'month', 'day', 'hour', 'minute' or
        'second', returns the SQL that extracts a value from the given
        datetime field field_name, and a tuple of parameters.
        zPsubclasses of BaseDatabaseOperations may require a datetime_extract_sql() methodN)r   )r   r   r    r%   r   r   r   datetime_extract_sqlc   s    z+BaseDatabaseOperations.datetime_extract_sqlc             C   s   t  d   d S)a
  
        Given a lookup_type of 'year', 'month', 'day', 'hour', 'minute' or
        'second', returns the SQL that truncates the given datetime field
        field_name to a datetime object with only the given specificity, and
        a tuple of parameters.
        zNsubclasses of BaseDatabaseOperations may require a datetime_trunk_sql() methodN)r   )r   r   r    r%   r   r   r   datetime_trunc_sqlk   s    z)BaseDatabaseOperations.datetime_trunc_sqlc             C   s   |  j  | |  S)z
        Given a lookup_type of 'hour', 'minute' or 'second', returns the SQL
        that extracts a value from the given time field field_name.
        )r!   )r   r   r    r   r   r   time_extract_sqlt   s    z'BaseDatabaseOperations.time_extract_sqlc             C   s   d S)z~
        Returns the SQL necessary to make a constraint "initially deferred"
        during a CREATE TABLE statement.
         r   )r   r   r   r   deferrable_sql{   s    z%BaseDatabaseOperations.deferrable_sqlc             C   s   | r t  d   n d Sd S)z
        Returns an SQL DISTINCT clause which removes duplicate rows from the
        result set. If any fields are given, only the given fields are being
        checked for duplicates.
        z<DISTINCT ON fields is not supported by this database backendZDISTINCTN)r   )r   r   r   r   r   distinct_sql   s    z#BaseDatabaseOperations.distinct_sqlc             C   s   d S)zC
        Returns the SQL command that drops a foreign key.
        zDROP CONSTRAINTr   )r   r   r   r   drop_foreignkey_sql   s    z*BaseDatabaseOperations.drop_foreignkey_sqlc             C   s   d S)z
        Returns any SQL necessary to drop the sequence for the given table.
        Returns None if no SQL is necessary.
        Nr   )r   r   r   r   r   drop_sequence_sql   s    z(BaseDatabaseOperations.drop_sequence_sqlc             C   s   | j    d S)z
        Given a cursor object that has just performed an INSERT...RETURNING
        statement into a table that has an auto-incrementing ID, returns the
        newly created ID.
        r   )Zfetchone)r   cursorr   r   r   fetch_returned_insert_id   s    z/BaseDatabaseOperations.fetch_returned_insert_idc             C   s   d S)a?  
        Given a column type (e.g. 'BLOB', 'VARCHAR'), and an internal type
        (e.g. 'GenericIPAddressField'), returns the SQL necessary to cast it
        before using it in a WHERE statement. Note that the resulting string
        should contain a '%s' placeholder for the column being searched against.
        z%sr   )r   Zdb_typeinternal_typer   r   r   field_cast_sql   s    z%BaseDatabaseOperations.field_cast_sqlc             C   s   g  S)z
        Returns a list used in the "ORDER BY" clause to force no ordering at
        all. Returning an empty list means that nothing will be included in the
        ordering.
        r   )r   r   r   r   force_no_ordering   s    z(BaseDatabaseOperations.force_no_orderingFc             C   s   | r
 d Sd Sd S)zY
        Returns the FOR UPDATE SQL clause to lock rows for an update operation.
        zFOR UPDATE NOWAITz
FOR UPDATENr   )r   Znowaitr   r   r   for_update_sql   s    z%BaseDatabaseOperations.for_update_sqlc             C   s   t  d   d S)z
        Returns the SQL WHERE clause to use in order to perform a full-text
        search of the given field_name. Note that the resulting string should
        contain a '%s' placeholder for the value being searched against.
        z=Full-text search is not implemented for this database backendN)r   )r   r    r   r   r   fulltext_search_sql   s    z*BaseDatabaseOperations.fulltext_search_sqlc                s   d d     t  | t t f  rC t   f d d   | D  } n4 | d k rX f  } n   f d d   | j   D } t j d  | | f S)	a  
        Returns a string of the query last executed by the given cursor, with
        placeholders replaced with actual values.

        `sql` is the raw query containing placeholders, and `params` is the
        sequence of parameters. These are used by default, but this method
        exists for database backends to provide a better implementation
        according to their own quoting schemes.
        c             S   s   t  |  d d d d S)NZstrings_onlyTerrorsreplace)r
   )sr   r   r   
to_unicode   s    z>BaseDatabaseOperations.last_executed_query.<locals>.to_unicodec             3   s   |  ] }   |  Vq d  S)Nr   ).0val)r9   r   r   	<genexpr>   s    z=BaseDatabaseOperations.last_executed_query.<locals>.<genexpr>Nc                s+   i  |  ]! \ } }   |    |   q Sr   r   )r:   kv)r9   r   r   
<dictcomp>   s   	 z>BaseDatabaseOperations.last_executed_query.<locals>.<dictcomp>zQUERY = %r - PARAMS = %r)
isinstancelisttupleitemsr   	text_type)r   r/   sqlparamsZu_paramsr   )r9   r   last_executed_query   s    "	z*BaseDatabaseOperations.last_executed_queryc             C   s   | j  S)a
  
        Given a cursor object that has just performed an INSERT statement into
        a table that has an auto-incrementing ID, returns the newly created ID.

        This method also receives the table name and the name of the primary-key
        column.
        )Z	lastrowid)r   r/   Z
table_nameZpk_namer   r   r   last_insert_id   s    z%BaseDatabaseOperations.last_insert_idNc             C   s   d S)z
        Returns the string to use in a query when performing lookups
        ("contains", "like", etc.). The resulting string should contain a '%s'
        placeholder for the column being searched against.
        z%sr   )r   r   r1   r   r   r   lookup_cast   s    z"BaseDatabaseOperations.lookup_castc             C   s   d S)z
        Returns the maximum number of items that can be passed in a single 'IN'
        list condition, or None if the backend does not impose a limit.
        Nr   )r   r   r   r   max_in_list_size   s    z'BaseDatabaseOperations.max_in_list_sizec             C   s   d S)zm
        Returns the maximum length of table and column names, or None if there
        is no limit.
        Nr   )r   r   r   r   max_name_length   s    z&BaseDatabaseOperations.max_name_lengthc             C   s   t  d   d S)z
        Returns the value to use for the LIMIT when we are wanting "LIMIT
        infinity". Returns None if the limit clause can be omitted in this case.
        zJsubclasses of BaseDatabaseOperations may require a no_limit_value() methodN)r   )r   r   r   r   no_limit_value   s    z%BaseDatabaseOperations.no_limit_valuec             C   s   d S)z
        Returns the value to use during an INSERT statement to specify that
        the field should use its default value.
        DEFAULTr   )r   r   r   r   pk_default_value  s    z'BaseDatabaseOperations.pk_default_valuec                sU   y d d l    Wn t k
 r0 t d   Yn! X  f d d     j |  D Sd S)ai  
        Takes an SQL script that may contain multiple lines and returns a list
        of statements to feed to successive cursor.execute() calls.

        Since few databases are able to process raw SQL scripts in a single
        cursor.execute() call and PEP 249 doesn't talk about this use case,
        the default implementation is conservative.
        r   NzEsqlparse is required if you don't split your SQL statements manually.c                s+   g  |  ]! } | r   j  | d  d  q S)strip_commentsT)format)r:   	statement)sqlparser   r   
<listcomp>  s   	z=BaseDatabaseOperations.prepare_sql_script.<locals>.<listcomp>)rR   ImportErrorr   split)r   rE   r   )rR   r   prepare_sql_script	  s    	z)BaseDatabaseOperations.prepare_sql_scriptc             C   s   | S)z
        Returns the value of a CLOB column, for backends that return a locator
        object that requires additional processing.
        r   )r   valuer   r   r   process_clob  s    z#BaseDatabaseOperations.process_clobc             C   s   d S)a  
        For backends that support returning the last insert ID as part
        of an insert query, this method returns the SQL and params to
        append to the INSERT query. The returned fragment should
        contain a format string to hold the appropriate column.
        Nr   )r   r   r   r   return_insert_id$  s    z'BaseDatabaseOperations.return_insert_idc             C   s4   |  j  d k r$ t |  j  |  _  n  t |  j  |  S)z
        Returns the SQLCompiler class corresponding to the given name,
        in the namespace corresponding to the `compiler_module` attribute
        on this backend.
        N)r   r   compiler_modulegetattr)r   Zcompiler_namer   r   r   compiler-  s    zBaseDatabaseOperations.compilerc             C   s   t  d   d S)z
        Returns a quoted version of the given table, index or column name. Does
        not quote the given name if it's already been quoted.
        zFsubclasses of BaseDatabaseOperations may require a quote_name() methodN)r   )r   namer   r   r   
quote_name7  s    z!BaseDatabaseOperations.quote_namec             C   s   d S)zH
        Returns an SQL expression that returns a random value.
        zRANDOM()r   )r   r   r   r   random_function_sql>  s    z*BaseDatabaseOperations.random_function_sqlc             C   s   t  d   d S)an  
        Returns the string to use in a query when performing regular expression
        lookups (using "regex" or "iregex"). The resulting string should
        contain a '%s' placeholder for the column being searched against.

        If the feature is not supported (or part of it is not supported), a
        NotImplementedError exception can be raised.
        zHsubclasses of BaseDatabaseOperations may require a regex_lookup() methodN)r   )r   r   r   r   r   regex_lookupD  s    	z#BaseDatabaseOperations.regex_lookupc             C   s   d |  j  |  S)z
        Returns the SQL for starting a new savepoint. Only required if the
        "uses_savepoints" feature is True. The "sid" parameter is a string
        for the savepoint id.
        zSAVEPOINT %s)r^   )r   sidr   r   r   savepoint_create_sqlO  s    z+BaseDatabaseOperations.savepoint_create_sqlc             C   s   d |  j  |  S)zE
        Returns the SQL for committing the given savepoint.
        zRELEASE SAVEPOINT %s)r^   )r   ra   r   r   r   savepoint_commit_sqlW  s    z+BaseDatabaseOperations.savepoint_commit_sqlc             C   s   d |  j  |  S)zG
        Returns the SQL for rolling back the given savepoint.
        zROLLBACK TO SAVEPOINT %s)r^   )r   ra   r   r   r   savepoint_rollback_sql]  s    z-BaseDatabaseOperations.savepoint_rollback_sqlc             C   s   d S)z
        Returns the SQL that will set the connection's time zone.

        Returns '' if the backend doesn't support time zones.
        r*   r   )r   r   r   r   set_time_zone_sqlc  s    z(BaseDatabaseOperations.set_time_zone_sqlc             C   s   t  d   d S)a  
        Returns a list of SQL statements required to remove all data from
        the given database tables (without actually removing the tables
        themselves).

        The returned value also includes SQL statements required to reset DB
        sequences passed in :param sequences:.

        The `style` argument is a Style object as returned by either
        color_style() or no_style() in django.core.management.color.

        The `allow_cascade` argument determines whether truncation may cascade
        to tables with foreign keys pointing the tables being truncated.
        PostgreSQL requires a cascade even if these tables are empty.
        zGsubclasses of BaseDatabaseOperations must provide an sql_flush() methodN)r   )r   styleZtables	sequencesZallow_cascader   r   r   	sql_flushk  s    z BaseDatabaseOperations.sql_flushc             C   s   g  S)a  
        Returns a list of the SQL statements required to reset sequences
        passed in :param sequences:.

        The `style` argument is a Style object as returned by either
        color_style() or no_style() in django.core.management.color.
        r   )r   rf   rg   r   r   r   sequence_reset_by_name_sql}  s    z1BaseDatabaseOperations.sequence_reset_by_name_sqlc             C   s   g  S)z
        Returns a list of the SQL statements required to reset sequences for
        the given models.

        The `style` argument is a Style object as returned by either
        color_style() or no_style() in django.core.management.color.
        r   )r   rf   Z
model_listr   r   r   sequence_reset_sql  s    z)BaseDatabaseOperations.sequence_reset_sqlc             C   s   d S)zL
        Returns the SQL statement required to start a transaction.
        zBEGIN;r   )r   r   r   r   start_transaction_sql  s    z,BaseDatabaseOperations.start_transaction_sqlTc             C   s   | s
 d Sd S)zJ
        Returns the SQL statement required to end a transaction.
        z	ROLLBACK;zCOMMIT;r   )r   successr   r   r   end_transaction_sql  s    z*BaseDatabaseOperations.end_transaction_sqlc             C   s   d S)a(  
        Returns the SQL that will be used in a query to define the tablespace.

        Returns '' if the backend doesn't support tablespaces.

        If inline is True, the SQL is appended to a row; otherwise it's appended
        to the entire CREATE TABLE or CREATE INDEX statement.
        r*   r   )r   Z
tablespaceinliner   r   r   tablespace_sql  s    	z%BaseDatabaseOperations.tablespace_sqlc             C   s.   t  |  j d d  j d d  j d d  S)z)Prepares a value for use in a LIKE query.\z\\%z\%_z\_)r
   r7   )r   xr   r   r   prep_for_like_query  s    z*BaseDatabaseOperations.prep_for_like_queryc             C   s   | S)z
        Certain backends do not accept some values for "serial" fields
        (for example zero in MySQL). This method will raise a ValueError
        if the value is invalid, otherwise returns validated value.
        r   )r   rW   r   r   r   validate_autopk_value  s    z,BaseDatabaseOperations.validate_autopk_valuec             C   s   t  | t j  r |  j |  St  | t j  r> |  j |  St  | t j  r] |  j |  St  | t j  r| |  j	 |  S| Sd S)a9  
        Transforms a value to something compatible with the backend driver.

        This method only depends on the type of the value. It's designed for
        cases where the target type isn't known, such as .raw() SQL queries.
        As a consequence it may not work perfectly in all circumstances.
        N)
r@   datetimeadapt_datetimefield_valuedateadapt_datefield_valuetimeadapt_timefield_valuedecimalDecimaladapt_decimalfield_value)r   rW   r   r   r   adapt_unknown_value  s    z*BaseDatabaseOperations.adapt_unknown_valuec             C   s   | d k r d St  j |  S)z
        Transforms a date value to an object compatible with what is expected
        by the backend driver for date columns.
        N)r   rD   )r   rW   r   r   r   ry     s    z,BaseDatabaseOperations.adapt_datefield_valuec             C   s   | d k r d St  j |  S)z
        Transforms a datetime value to an object compatible with what is expected
        by the backend driver for datetime columns.
        N)r   rD   )r   rW   r   r   r   rw     s    z0BaseDatabaseOperations.adapt_datetimefield_valuec             C   s;   | d k r d St  j |  r. t d   n  t j |  S)z
        Transforms a time value to an object compatible with what is expected
        by the backend driver for time columns.
        Nz-Django does not support timezone-aware times.)r   Zis_aware
ValueErrorr   rD   )r   rW   r   r   r   r{     s
    z,BaseDatabaseOperations.adapt_timefield_valuec             C   s   t  j | | |  S)z
        Transforms a decimal.Decimal value to an object compatible with what is
        expected by the backend driver for decimal (numeric) columns.
        )r   Zformat_number)r   rW   Z
max_digitsZdecimal_placesr   r   r   r~     s    z/BaseDatabaseOperations.adapt_decimalfield_valuec             C   s
   | p	 d S)z|
        Transforms a string representation of an IP address into the expected
        type for the backend driver.
        Nr   )r   rW   r   r   r   adapt_ipaddressfield_value  s    z1BaseDatabaseOperations.adapt_ipaddressfield_valuec             C   sR   t  j | d d  } t  j | d d  } |  j |  } |  j |  } | | g S)z
        Returns a two-elements list with the lower and upper bound to be used
        with a BETWEEN operator to query a DateField value using a year
        lookup.

        `value` is an int, containing the looked-up year.
                 )rv   rx   ry   )r   rW   firstsecondr   r   r   !year_lookup_bounds_for_date_field  s
    z8BaseDatabaseOperations.year_lookup_bounds_for_date_fieldc             C   s   t  j  | d d  } t  j  | d d d d d d  } t j rr t j   } t j | |  } t j | |  } n  |  j |  } |  j |  } | | g S)z
        Returns a two-elements list with the lower and upper bound to be used
        with a BETWEEN operator to query a DateTimeField value using a year
        lookup.

        `value` is an int, containing the looked-up year.
        r   r   r      ;   i?B )rv   r   ZUSE_TZr   Zget_current_timezoneZ
make_awarerw   )r   rW   r   r   tzr   r   r   %year_lookup_bounds_for_datetime_field  s    !	z<BaseDatabaseOperations.year_lookup_bounds_for_datetime_fieldc             C   s   g  S)z
        Get a list of functions needed to convert field data.

        Some field types on some backends do not provide data in the correct
        format, this is the hook for converter functions.
        r   )r   
expressionr   r   r   get_db_converters  s    z(BaseDatabaseOperations.get_db_convertersc             C   sA   | d  k	 r= t  t j |  t j d   } t |  } n  | S)Ni@B )strr|   r}   r   )r   rW   r   r   contextr   r   r   convert_durationfield_value!  s    "z2BaseDatabaseOperations.convert_durationfield_valuec             C   s#   t  j d t d d |  j |  S)NzRcheck_aggregate_support has been deprecated. Use check_expression_support instead.
stacklevel   )warningswarnr	   check_expression_support)r   Zaggregate_funcr   r   r   check_aggregate_support'  s    z.BaseDatabaseOperations.check_aggregate_supportc             C   s   d S)a6  
        Check that the backend supports the provided expression.

        This is used on specific backends to rule out known expressions
        that have problematic or nonexistent implementations. If the
        expression has a known problem, the backend should raise
        NotImplementedError.
        Nr   )r   r   r   r   r   r   .  s    	z/BaseDatabaseOperations.check_expression_supportc             C   s   d | } | j  |  S)a  Combine a list of subexpressions into a single expression, using
        the provided connecting operator. This is required because operators
        can vary between backends (e.g., Oracle with %% and &) and between
        subexpression types (e.g., date expressions)
        z %s )join)r   	connectorsub_expressionsconnr   r   r   combine_expression9  s    
z)BaseDatabaseOperations.combine_expressionc             C   s   |  j  | |  S)N)r   )r   r   r   r   r   r   combine_duration_expressionB  s    z2BaseDatabaseOperations.combine_duration_expressionc             C   s   d S)z~
        Some backends require special syntax to insert binary content (MySQL
        for example uses '_binary %s').
        z%sr   )r   rW   r   r   r   binary_placeholder_sqlE  s    z-BaseDatabaseOperations.binary_placeholder_sqlc             C   s   | S)zjAllow modification of insert parameters. Needed for Oracle Spatial
        backend due to #10888.
        r   )r   placeholderrF   r   r   r   modify_insert_paramsL  s    z+BaseDatabaseOperations.modify_insert_paramsc             C   s   |  j  | S)z
        Given an integer field internal type (e.g. 'PositiveIntegerField'),
        returns a tuple of the (min_value, max_value) form representing the
        range of the column type bound to the field.
        )integer_field_ranges)r   r1   r   r   r   integer_field_rangeR  s    z*BaseDatabaseOperations.integer_field_rangec             C   sS   |  j  j j r? | \ } } | \ } } d | | f | | f St d |   d  S)Nz	(%s - %s)z-This backend does not support %s subtraction.)r   featuresZsupports_temporal_subtractionr   )r   r1   ZlhsZrhsZlhs_sqlZ
lhs_paramsZrhs_sqlZ
rhs_paramsr   r   r   subtract_temporalsZ  s
    z)BaseDatabaseOperations.subtract_temporals )r   r      )r   r            )r   r   )r   r   )r   r   )H__name__
__module____qualname____doc__rZ   r   r   r   r   r   r   r!   r#   r$   r&   r'   r(   r)   r+   r,   r-   r.   r0   r2   r3   r4   r5   rG   rH   rI   rJ   rK   rL   rN   rV   rX   rY   r\   r^   r_   r`   rb   rc   rd   re   rh   ri   rj   rk   rm   ro   rt   Zprep_for_iexact_queryru   r   ry   rw   r{   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      s   
	
				
	


				r   )rv   r|   r   	importlibr   Zdjango.confr   Zdjango.core.exceptionsr   Zdjango.db.backendsr   Zdjango.utilsr   r   Zdjango.utils.dateparser   Zdjango.utils.deprecationr	   Zdjango.utils.encodingr
   objectr   r   r   r   r   <module>   s   