o
    |Üg  ã                   @   sÀ  d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	m
Z
mZmZmZmZmZmZ ddlmZ ddlZedƒZzejZW n eyI   ejZY nw dd	„ Zd
d„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zej e!fde"ffZ#i e$e“e%e“ee“ee“e&e“e	e“e
e“ee“e'e“ee“ej(e$“ej)e$“ej*e$“ej+e%“ej,e%“ej-e“ej.e“ej/e$ej0e$ej1e$ej2eej3eej4eej5eej6e!ej7e!ej8e!ej9e!ej:e!ej;e!ej<e!ej=e!i¥Z>dS )a¦  MySQLdb type conversion module

This module handles all the type conversions for MySQL. If the default
type conversions aren't what you need, you can make your own. The
dictionary conversions maps some kind of type to a conversion function
which returns the corresponding value:

Key: FIELD_TYPE.* (from MySQLdb.constants)

Conversion function:

    Arguments: string

    Returns: Python object

Key: Python type object (from types) or class

Conversion function:

    Arguments: Python object of indicated type or class AND
               conversion dictionary

    Returns: SQL literal value

    Notes: Most conversion functions can ignore the dictionary, but
           it is a required parameter. It is necessary for converting
           things like sequences and instances.

Don't modify conversions if you can avoid it. Instead, make copies
(with the copy() method), modify the copies, and then pass them to
MySQL.connect().
é    )ÚDecimal©Ústring_literal)Ú
FIELD_TYPEÚFLAG)ÚDateÚDateTimeTypeÚDateTime2literalÚDateTimeDeltaTypeÚDateTimeDelta2literalÚDateTime_or_NoneÚTimeDelta_or_NoneÚDate_or_None)ÚProgrammingErrorNc                 C   s   | rdS dS )Nó   1ó   0© ©ÚsÚdr   r   úL/var/www/html/api-tag/env/lib/python3.10/site-packages/MySQLdb/converters.pyÚBool2Str;   s   r   c                 C   s   t d | ¡ƒS )Nú,)r   Újoinr   r   r   r   ÚSet2Str?   s   r   c                 C   ó   t | ƒS )z*Convert something into a string via str().)Ústrr   r   r   r   Ú	Thing2StrD   s   r   c                 C   s0   t | ƒ}|dv rtd| ƒ‚d|vr|d7 }|S )N)Úinfz-infÚnanz%s can not be used with MySQLÚeÚe0)Úreprr   )Úor   r   r   r   r   Ú	Float2StrI   s   r$   c                 C   s   dS )zConvert None to NULL.s   NULLr   ©r#   r   r   r   r   Ú	None2NULLR   s   r&   c                 C   r   )zæConvert something into a SQL string literal.  If using
    MySQL-3.23 or newer, string_literal() is a method of the
    _mysql.MYSQL object, and this function will be overridden with
    that method when the connection is created.r   r%   r   r   r   ÚThing2LiteralW   s   r'   c                 C   s
   t | dƒS )NÚf)Úformatr%   r   r   r   ÚDecimal2Literal_   s   
r*   c                 C   s   t |  ¡ |ƒS )N)r'   Útostringr%   r   r   r   Ú	array2Strc   s   r,   )?Ú__doc__Údecimalr   ÚMySQLdb._mysqlr   ÚMySQLdb.constantsr   r   ÚMySQLdb.timesr   r   r	   r
   r   r   r   r   ÚMySQLdb._exceptionsr   ÚarrayÚtypeÚNoneTypeÚ	ArrayTypeÚAttributeErrorr   r   r   r$   r&   r'   r*   r,   ÚBINARYÚbytesr   Ú_bytes_or_strÚintÚfloatÚboolÚsetÚTINYÚSHORTÚLONGÚFLOATÚDOUBLEÚDECIMALÚ
NEWDECIMALÚLONGLONGÚINT24ÚYEARÚ	TIMESTAMPÚDATETIMEÚTIMEÚDATEÚ	TINY_BLOBÚMEDIUM_BLOBÚ	LONG_BLOBÚBLOBÚSTRINGÚ
VAR_STRINGÚVARCHARÚJSONÚconversionsr   r   r   r   Ú<module>   s’     (


ÿ	ÿþýüûúùø	÷
öõôóòñðï
à