Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
MySQLdb
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/MySQLdb/connections.pyc
mò €äSNc�����������@���s«���d��Z��d�k�Z�d�k�l�Z�l�Z�l�Z�l�Z�l�Z�l�Z�l �Z �l �Z �l�Z�l�Z�d�k �Z �d�k�Z�d�k�Z�d�„��Z�e�i�d�ƒ�Z�d�„��Z�d�e�i�f�d�„��ƒ��YZ�d�S(���s�� This module implements connections for MySQLdb. Presently there is only one class: Connection. Others are unlikely. However, you might want to make your own subclasses. In most cases, you will probably override Connection.default_cursor with a non-standard Cursor class. N( ���s���Warnings���Errors���InterfaceErrors ���DataErrors ���DatabaseErrors���OperationalErrors���IntegrityErrors ���InternalErrors���NotSupportedErrors���ProgrammingErrorc���������C���sJ���|�|�f�}�|�o�|�i�i�|�ƒ�n�|��i�i�|�ƒ�~�~��|�|�‚�d�S(���s,�� If cursor is not None, (errorclass, errorvalue) is appended to cursor.messages; otherwise it is appended to connection.messages. Then errorclass is raised with errorvalue as the value. You can override this with your own error handler by assigning it to the instance. N(���t ���errorclasst ���errorvaluet���errort���cursort���messagest���appendt ���connection(���R���R���R����R���R���(����(����t7���/usr/lib/python2.4/site-packages/MySQLdb/connections.pyt���defaulterrorhandler���s�����s���^(\d+)c���������C���s1���t��i�|��ƒ�}�|�o�t�|�i�d�ƒ�ƒ�Sn�d�S(���sž���Returns the leading numeric part of a string. >>> numeric_part("20-alpha") 20 >>> numeric_part("foo") >>> numeric_part("16b") 16 i���N(���t���re_numeric_partt���matcht���st���mt���intt���groupt���None(���R���R���(����(����R���t���numeric_part(���s �����t ���Connectionc�����������B���sÍ���t��Z�d��Z�e�i�Z�d�„��Z�e�d�„�Z�d�„��Z �d�„��Z �d�„��Z�d�„��Z�e �e�i�d�ƒ�p �d�„��Z�n�d �„��Z�d �„��Z�d�„��Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�e�Z�RS(���s ���MySQL Database Connection Objectc������������sê��d�k��l�}�l�}�d�k�l�}�d�k�l�}�l�}�d�k�}�|�i �ƒ��}�|�i�d�ƒ�o�|�d�}�n�|�}�h��} �xS�|�i�ƒ��D]E�\�}�}�t�|�t�ƒ�o�t�|�t�ƒ�o�|�| �|�<q�|�| �|�<q�W| �|�d�<|�i�d�|��i�ƒ�|��_�|�i�d�d�ƒ�}�|�o �t�}�n�t�}�|�i�d �|�ƒ�}�|�i�d �d�ƒ�}�|�i�d�d�ƒ�}�t �g��}�t"�i#�ƒ��i$�d �ƒ�d� D]�}�|�t&�|�ƒ�qj~�ƒ�}�|�d�j�o�|�|�i(�O}�n�|�d�j�o�|�|�i)�O}�n�|�|�d�<t*�t+�|��ƒ�i,�|�|�Ž��t.�g��}�|�i�ƒ��D]0�\�}�}�t/�|�ƒ�t�j �o�|�|�|�f�qüqü~�ƒ�|��_0�t �g��}�|��i1�ƒ��i$�d �ƒ�d� D]�}�|�t&�|�ƒ�q\~�ƒ�|��_2�|�|��ƒ�‰��‡��d�†��}�‡��d�†��}�d�„��}�|�ƒ��} �|�ƒ��|��_8�}�|�ƒ��|��_9�} �|�p�|��i:�ƒ��}�n�|��i;�|�ƒ�|�o�|��i<�|�ƒ�n�|�ox�|��i=�|�i>�i?�d�| �f�ƒ�|��i=�|�iA�i?�d�| �f�ƒ�|��i=�|�iB�i?�d�| �f�ƒ�|��i=�|�iC�i?�d�| �f�ƒ�n�| �|��i0�|�iD�<|�|��i0�|�iE�<|��iF�|�iG�@|��_H�|��iH�o�|��iI�t�ƒ�n�g��|��_J�d�S(���s �� Create a connection to the database. It is strongly recommended that you only use keyword parameters. Consult the MySQL C API documentation for more information. host string, host to connect user string, user to connect as passwd string, password to use db string, database to use port integer, TCP/IP port to connect to unix_socket string, location of unix_socket to use conv conversion dictionary, see MySQLdb.converters connect_timeout number of seconds to wait before the connection attempt fails. compress if set, compression is enabled named_pipe if set, a named pipe is used to connect (Windows only) init_command command which is run once the connection is created read_default_file file from which default client values are read read_default_group configuration group to use from the default file cursorclass class object, used to create cursors (keyword only) use_unicode If True, text-like columns are returned as unicode objects using the connection's character set. Otherwise, text-like columns are returned as strings. columns are returned as normal strings. Unicode objects will always be encoded to the connection's character set regardless of this setting. charset If supplied, the connection character set will be changed to this character set (MySQL-4.1 and newer). This implies use_unicode=True. sql_mode If supplied, the session SQL mode will be changed to this setting (MySQL-4.1 and newer). For more details and legal values, see the MySQL documentation. client_flag integer, flags to use or 0 (see MySQL docs or constants/CLIENTS.py) ssl dictionary or mapping, contains SSL connection parameters; see the MySQL documentation for more details (mysql_ssl_set()). If this is set, and the client does not support SSL, NotSupportedError will be raised. local_infile integer, non-zero enables LOAD LOCAL INFILE; zero disables There are a number of undocumented, non-standard methods. See the documentation for the MySQL C API for some hints on what they do. (���s���CLIENTs ���FIELD_TYPE(���s���conversions(���s���proxys���WeakValueDictionaryNt���convt���cursorclasst���charsett����t���use_unicodet���sql_modet���client_flagi����t���.i���i���i���i���c�������������s���d��‡��d�†�}��|��S(���Nc������������s ���ˆ��i�|��ƒ�S(���N(���t���dbt���string_literalt���obj(���R���t���dummy(���R���(����R���R���Ä���s����(���R���R���(���R���(���R���(����R���t���_get_string_literalÃ���s����c�������������s���d��‡�‡��d�†�‰��ˆ��S(���Nc������������s���ˆ��i�|��i�ˆ�i�ƒ�ƒ�S(���N(���R���t���literalt���ut���encodet���unicode_literalR���(���R ���R���(���R���R"���(����R���R"���É���s����(���R���R"���(���R"���(���R���(���R"���R���t���_get_unicode_literalÈ���s����c�������������s���‡��d�†��‰��ˆ��S(���Nc������������s���|��i�ˆ��i�ƒ�S(���N(���R���t���decodet���string_decoderR���(���R���(���R%���(����R���R%���Î���s����(���R%���(���R%���(����(���R%���R���t���_get_string_decoderÍ���s����(���i���i���(���i���i����(K���t ���constantst���CLIENTt ���FIELD_TYPEt ���converterst���conversionst���weakreft���proxyt���WeakValueDictionaryt���typest���kwargst���copyt���kwargs2t���has_keyR���t���conv2t���itemst���kt���vt ���isinstanceR ���t���listt���popt���selft���default_cursorR���R���t���TrueR���t���FalseR���t���getR���t���tuplet���_[1]t���_mysqlt���get_client_infot���splitt���nR���t���client_versiont���MULTI_STATEMENTSt ���MULTI_RESULTSt���superR���t���__init__t���argst���dictt���typet���encoderst���get_server_infot���_server_versionR���R���R#���R&���R���R"���R%���t���character_set_namet���set_character_sett���set_sql_modet ���convertert���STRINGR���R���t ���VAR_STRINGt���VARCHARt���BLOBt ���StringTypet���UnicodeTypet���server_capabilitiest���TRANSACTIONSt���_transactionalt ���autocommitR���(���R;���RK���R0���R+���R)���R���R���RA���R���R%���R4���R&���R"���R���R���R���R#���R-���R/���R���R2���R6���RE���R.���R(���R7���R���RF���(����(���R���R���RJ���>���sp����S� � @ SC ! c���������C���s���|�p�|��i��|��ƒ�S(���sÔ��� Create a cursor on which queries may be performed. The optional cursorclass parameter is used to create the Cursor. By default, self.cursorclass=cursors.Cursor is used. N(���R���R;���(���R;���R���(����(����R���R���ê���s�����c���������C���s ���|��i�ƒ��S(���N(���R;���R���(���R;���(����(����R���t ���__enter__õ���s����c���������C���s#���|�o�|��i�ƒ��n�|��i�ƒ��d��S(���N(���t���excR;���t���rollbackt���commit(���R;���R`���t���valuet���tb(����(����R���t���__exit__÷���s����c���������C���s���|��i�|�|��i�ƒ�S(���s�� If o is a single object, returns an SQL literal as a string. If o is a non-string sequence, the items of the sequence are converted and returned as a sequence. Non-standard. For internal use; do not use this in your applications. N(���R;���t���escapet���oRN���(���R;���Rg���(����(����R���R���ý���s���� �c���������C���s.���d�k��l�}�|�d�t�d�ƒ�|��i�d�ƒ�d�S(���s„���Explicitly begin a connection. Non-standard. DEPRECATED: Will be removed in 1.3. Use an SQL BEGIN statement instead.(���s���warns2���begin() is non-standard and will be removed in 1.3i���t���BEGINN(���t���warningst���warnt���DeprecationWarningR;���t���query(���R;���Rj���(����(����R���t���begin ��s ����� t ���warning_countc���������C���s@���d�k��l�}�|��i�ƒ��}�|�o�|�|�i�ƒ��d�ƒ�Sn�d�Sd�S(���sp���Return the number of warnings generated from the last query. This is derived from the info() method.(���s���atoiiÿÿÿÿi����N(���t���stringt���atoiR;���t���infoRD���(���R;���Rq���Rp���(����(����R���Rn�����s����� c���������C���sž���|��i�ƒ��|�j�oo�y�t�t�|��ƒ�i�|�ƒ�Wq‚�t�j �oB�|��i�d�j��o�t�d�ƒ�‚�n�|��i �d�|�ƒ�|��i �ƒ��q‚�Xn�|�|��i�_�|�|��i�_�d�S(���s÷���Set the connection character set to charset. The character set can only be changed in MySQL-4.1 and newer. If you try to change the character set from the current value in an older version, NotSupportedError will be raised.i���i���s ���server is too old to set charsets���SET NAMES %sN(���i���i���( ���R;���RQ���R���RI���R���RR���t���AttributeErrorRP���t���NotSupportedErrorRl���t���store_resultR%���R"���(���R;���R���(����(����R���RR�����s�����c���������C���s?���|��i�d�j��o�t�d�ƒ�‚�n�|��i�d�|�ƒ�|��i�ƒ��d�S(���sN���Set the connection sql_mode. See MySQL documentation for legal values.i���i���s!���server is too old to set sql_modes���SET SESSION sql_mode='%s'N(���i���i���(���R;���RP���Rs���Rl���R���Rt���(���R;���R���(����(����R���RS���/��s �����c���������C���sD���|��i�d�j��o�f��Sn�|��i�d�ƒ�|��i�ƒ��}�|�i�d�ƒ�}�|�S(���sæ���Return detailed information about warnings as a sequence of tuples of (Level, Code, Message). This is only supported in MySQL-4.1 and up. If your server is an earlier version, an empty sequence is returned.i���i���s ���SHOW WARNINGSi����N(���i���i���(���R;���RP���Rl���Rt���t���rt ���fetch_rowRi���(���R;���Ru���Ri���(����(����R���t ���show_warnings7��s������ ( ���t���__name__t ���__module__t���__doc__t���cursorst���CursorR<���RJ���R���R���R_���Re���R���Rm���t���hasattrRB���R���Rn���RR���RS���Rw���t���Warningt���Errort���InterfaceErrort ���DatabaseErrort ���DataErrort���OperationalErrort���IntegrityErrort ���InternalErrort���ProgrammingErrorRs���R���t���errorhandler(����(����(����R���R���8���s0���� ¬ (���Rz���R{���t���_mysql_exceptionsR~���R���R€���R‚���R���Rƒ���R„���R…���Rs���R†���R/���RB���t���reR���t���compileR ���R���R���R���(���R‚���R���R€���R…���R„���RB���R���R~���Rƒ���R{���R���R/���R‰���R†���R ���Rs���R���R���(����(����R���t���?���s��� C