ok

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/
Upload File :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyc

�
�6�Rc@s�dZddlmZmZmZmZmZddlmZm	Z	ddl
TybddlmZm
Z
mZmZmZmZmZmZmZmZmZmZmZmZWnwek
r)eZeeeed�f\ZZ
ZZe e!e"df\ZZZZe#e$e%e&f\ZZZZnXddl'Z'y
e'j(Z(Wne)k
r_e'j'Z(nXye*Wn!e+k
r�ddl,m-Z*nXd�Z.d	�Z/d
�Z0d�Z1d�Z2e1Z3d
�Z4d�Z5d�Z6d�Z7d�Z8d�Z9d�Z:i#e1e6e3e
6e4e6e5e6e:e6e:e6ee6e7e6e9e(6e6e6e2e6e7e6e.e6e;e<6e=e>6e0e*6eej?6eej@6eejA6eejB6eejC6eejD6eejE6eejF6eejG6eejH6e/ejI6eJejK6eLejM6eNejO6ePejQ6e	jRe$fgejS6e	jRe$fgejT6e	jRe$fgejU6e	jRe$fgejV6ZWy.ddlXmYZYeYeWejD<eYeWejE<Wnek
r�nXdS(s�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().

i����(tstring_literaltescape_sequencetescape_dicttescapetNULL(t
FIELD_TYPEtFLAG(t*(tIntTypetLongTypet	FloatTypetNoneTypet	TupleTypetListTypetDictTypetInstanceTypet
StringTypetUnicodeTypet
ObjectTypetBooleanTypet	ClassTypetTypeTypeN(tSetcCstt|��S(N(tstrtint(tstd((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pytBool2Str=scCs,tg|jd�D]}|r|^q�S(Nt,(tsettsplit(Rti((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pytStr2Set?scCstdj|�|�S(NR(Rtjoin(RR((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pytSet2StrBscCs
t|�S(s*Convert something into a string via str().(R(RR((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt	Thing2StrEscCs
|j�S(s�Convert a unicode object to a string using the default encoding.
    This is only used as a placeholder for the real function, which
    is connection-dependent.(tencode(RR((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pytUnicode2StrIscCsd|S(Ns%.15g((toR((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt	Float2StrQscCstS(sConvert None to NULL.(R(R&R((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt	None2NULLTscCs
t||�S(s�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((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt
Thing2LiteralXscs�|j�kr#�|j|��St|d��j��}|sht|�fd��j��}n|s�t|��S�|d�|j<�|d|��S(sL

    Convert an Instance to a string representation.  If the __str__()
    method produces acceptable output, then you don't need to add the
    class to conversions; it will be handled by the default
    converter. If the exact class is not found in d, it will use the
    first class it can find for which o is an instance.

    cSst|�tkot||�S(N(ttypeRt
isinstance(txR&((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt<lambda>pscs/t|�tko.t||�o.�|tk	S(N(R*RR+tInstance2Str(R,R&(R(sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyR-tsi(t	__class__tfiltertkeysR(R&Rtcl((RsE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyR.bscCstjd|�S(Ntc(tarray(R((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt
char_array~scCst|j�|�S(N(R)ttostring(R&R((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt	array2Str�scCsddjt||��S(Ns(%s)R(R!R(ttR((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pytquote_tuple�s(tDecimal(Zt__doc__t_mysqlRRRRRtMySQLdb.constantsRRt
MySQLdb.timesttypesRR	R
RRR
RRRRRRRRtImportErrorRtlongtfloatR*tNonettupletlisttdicttbytesRtobjecttboolR4t	ArrayTypetAttributeErrorRt	NameErrortsetsRRR R"R#R%tLong2IntR'R(R)R.R5R7R9tDateTime2literaltDateTimeTypetDateTimeDelta2literaltDateTimeDeltaTypetTINYtSHORTtLONGtFLOATtDOUBLEtDECIMALt
NEWDECIMALtLONGLONGtINT24tYEARtSETtmysql_timestamp_convertert	TIMESTAMPtDateTime_or_NonetDATETIMEtTimeDelta_or_NonetTIMEtDate_or_NonetDATEtBINARYtBLOBtSTRINGt
VAR_STRINGtVARCHARtconversionstdecimalR:(((sE/opt/alt/python27/lib64/python2.7/site-packages/MySQLdb/converters.pyt<module>!s�(
b
$"



								
				


















Zerion Mini Shell 1.0