U ó üeã@@sœdZddlmZddlmZddlmZmZddlm Z m Z m Z m Z m Z mZmZmZddlmZddlZedƒZz ejZWnek r”ejZYnXdd „Zd d „Zd d „Zdd„Zdd„Zdd„Zdd„Zdd„Zej e!fde"ffZ#e$ee%eeeeee&ee ee e e e 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!ejdS)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)ÚProgrammingErrorNcCs |rdSdS)Nó1ó0©©ÚsÚdrrúB/opt/hc_python/lib64/python3.8/site-packages/MySQLdb/converters.pyÚBool2Str;srcCstd |¡ƒS)Nú,)rÚjoinrrrrÚSet2Str?srcCst|ƒS)z*Convert something into a string via str().)ÚstrrrrrÚ Thing2StrDsrcCs0t|ƒ}|dkrtd|ƒ‚d|kr,|d7}|S)N)Úinfz-infÚnanz%s can not be used with MySQLÚeZe0)Úreprr)ÚorrrrrÚ Float2StrIs  r"cCsdS)zConvert None to NULL.sNULLr©r!rrrrÚ None2NULLRsr$cCst|ƒS)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.rr#rrrÚ Thing2LiteralWsr%cCs t|dƒS)NÚf)Úformatr#rrrÚDecimal2Literal_sr(cCst| ¡|ƒS)N)r%Útostringr#rrrÚ array2Strcsr*)?Ú__doc__ÚdecimalrZMySQLdb._mysqlrZMySQLdb.constantsrrZ MySQLdb.timesrrr r r r r rZMySQLdb._exceptionsrÚarrayÚtypeZNoneTypeÚ ArrayTypeÚAttributeErrorrrrr"r$r%r(r*ÚBINARYÚbytesrZ _bytes_or_strÚintÚfloatÚboolÚsetZTINYZSHORTÚLONGÚFLOATÚDOUBLEZDECIMALZ NEWDECIMALZLONGLONGZINT24ZYEARÚ TIMESTAMPZDATETIMEZTIMEZDATEZ TINY_BLOBZ MEDIUM_BLOBZ LONG_BLOBZBLOBÚSTRINGZ VAR_STRINGZVARCHARÚJSONZ conversionsrrrrÚsª  (    à