g|dZddlmZddlmZddlmZmZddlm Z m Z m Z m Z m Z mZmZmZddlmZddlZedZ ej,ZdZd Zd Zd Zd Zd ZdZdZej@e!fde"ffZ#ie$ee%eeeeee&ee ee e e e e'eeeejPe$ejRe$ejTe$ejVe%ejXe%ejZeej\eej^e$ej`e$ejbe$ejdeejfeejheejjeejle!ejne!ejpe!ejre!ejte!ejve!ejxe!ejze!iZ>y#e$rej&ZYpwxYw)aMySQLdb 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(). )Decimalstring_literal) FIELD_TYPEFLAG)Date DateTimeTypeDateTime2literalDateTimeDeltaTypeDateTimeDelta2literalDateTime_or_NoneTimeDelta_or_None Date_or_None)ProgrammingErrorNc|rdSdS)N10sds C/opt/hc_python/lib64/python3.12/site-packages/MySQLdb/converters.pyBool2Strr;s4$c6tdj|S)N,)rjoinrs rSet2Strr?s #((1+ &&rct|S)z*Convert something into a string via str().)strrs r Thing2Strr!Ds q6MrcRt|}|dvrtd|zd|vr|dz }|S)N)infz-infnanz%s can not be used with MySQLee0)reprr)orrs r Float2Strr)Is: QA "">BCC !| T  Hrcy)zConvert None to NULL.sNULLrr(rs r None2NULLr,Rs rct|S)zConvert 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+s r Thing2Literalr.Ws ! rct|dS)Nf)formatr+s rDecimal2Literalr2_s !S>rc6t|j|S)N)r.tostringr+s r array2Strr5cs q ))r)?__doc__decimalrMySQLdb._mysqlrMySQLdb.constantsrr MySQLdb.timesrr r r r r rrMySQLdb._exceptionsrarraytypeNoneType ArrayTypeAttributeErrorrrr!r)r,r.r2r5BINARYbytesr _bytes_or_strintfloatboolsetTINYSHORTLONGFLOATDOUBLEDECIMAL NEWDECIMALLONGLONGINT24YEAR TIMESTAMPDATETIMETIMEDATE TINY_BLOB MEDIUM_BLOB LONG_BLOBBLOBSTRING VAR_STRINGVARCHARJSON conversionsrrrr_s=@).   1 :I '    * ++u%c{3 !! 9! i!y !  ( !  - !"!,!! _!OOS!c!OOS!e!u! !!"7#!$cOOS*)OO&OO\%E%OOUu5OOUA! g Is F&&F;:F;