관리-도구
편집 파일: converters.cpython-38.pyc
U )�e � @ @ s� d Z ddlmZ ddlmZ ddlmZmZ ddlm Z m Z mZmZm Z mZmZmZ ddlmZ ddlZed�Zz ejZW n ek r� ejZY nX dd � Zd d� Zdd � Zdd� Zdd� Zdd� Zdd� Zdd� Zej e!fde"ffZ#e$ee%eeeeee&ee ee eee e'eeeej(e$ej)e$ej*e$ej+e%ej,e%ej-eej.eej/e$ej0e$ej1e$ej2eej3eej4eej5eej6e!ej7e!ej8e!ej9e!ej:e!ej;e!ej<e!ej=e!i Z>dS )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 | rdS dS )N� 1� 0� ��s�dr r �B/opt/hc_python/lib64/python3.8/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 s t | �S )z*Convert something into a string via str().)�strr r r r � Thing2StrD s r c C s0 t | �}|dkrtd| ��d|kr,|d7 }|S )N)�infz-inf�nanz%s can not be used with MySQL�eZe0)�reprr )�or r r r r � Float2StrI s r"