zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
U
£ý°dÿ ã@@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!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)ÚProgrammingErrorNcCs |rdSdS)Nó1ó0©©ÚsÚdrrúId:\z\workplace\vscode\pyvenv\venv\Lib\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)Ú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ÚtypeZNoneTypeZ    ArrayTypeÚAttributeErrorrrrr"r$r%r(r*ÚBINARYÚbytesrZ _bytes_or_strÚintÚfloatÚboolÚsetZTINYÚSHORTÚLONGÚFLOATÚDOUBLEZDECIMALZ
NEWDECIMALZLONGLONGZINT24ZYEARÚ    TIMESTAMPZDATETIMEZTIMEZDATEZ    TINY_BLOBZ MEDIUM_BLOBZ    LONG_BLOBZBLOBÚSTRINGZ
VAR_STRINGZVARCHARZJSONZ conversionsrrrrÚ<module>sª   (
 
     à