Files
serveur-d-authentification/venv/lib/python3.10/site-packages/MySQLdb/__pycache__/connections.cpython-310.pyc

190 lines
12 KiB
Plaintext
Raw Normal View History

o
2026-09-08 11:07:02 +00:00
k<><6B>j<EFBFBD>4<00>@s<>dZddlZddlmZmZddlmZmZmZm Z m
Z
m Z m Z m Z mZmZddddd d
<EFBFBD>Ze<01>d <0B>Zd d <0A>ZGdd<0F>dej<14>ZdS)a
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.
<EFBFBD>N<>)<02>cursors<72>_mysql)
<EFBFBD>Warning<6E>Error<6F>InterfaceError<6F> DataError<6F> DatabaseError<6F>OperationalError<6F>IntegrityError<6F> InternalError<6F>NotSupportedError<6F>ProgrammingError<6F>utf8<66>cp1252<35>koi8_r<5F>koi8_u)<05>utf8mb4<62>utf8mb3<62>latin1<6E>koi8r<38>koi8uz^(\d+)cCs t<00>|<00>}|rt|<01>d<01><01>SdS)z<>Returns the leading numeric part of a string.
>>> numeric_part("20-alpha")
20
>>> numeric_part("foo")
>>> numeric_part("16b")
16
rN)<04>re_numeric_part<72>match<63>int<6E>group)<02>s<>m<>r<00>v/home/sorel/systeme_gestion_cerfig/serveur-d-authentification/venv/lib/python3.10/site-packages/MySQLdb/connections.py<70> numeric_part#s
r cs<>eZdZdZejZ<06>fdd<03>Z  d!dd<08>Zd d
<EFBFBD>Z d d <0C>Z
d d<0E>Z d"dd<10>Z dd<12>Z dd<14>Zdd<16>Zdd<18>Zdd<1A>Zd"<22>fdd<1C> Zdd<1E>Zdd <20>ZeZeZeZeZeZeZeZeZeZeZ<1E>ZS)#<23>
Connectionz MySQL Database Connection ObjectcsJddlm}m}ddlm}m}|<02><06>}d|vr|<07>d<04>|d<d|vr*|<07>d<06>|d<d|vr3|d}n|}i} |<08><08>D]\}
} t |
t
<EFBFBD>rRt | t <0B>rR| d d <09>| |
<q;| | |
<q;| |d<|<07>d
|j <0C>} |<07> d d <0C>} |<07>d d <0C>}|<07>dd<0F>}|<07>dd <0C>}|<07>dd<12>|_|<02> dd<01>}||jO}|<07>dd<0F>}|r<>||jO}||d<|<07>dd<12>}|j|i|<07><01>t<12>j|i|<07><01>| |_dd<17>|<08><08>D<00>|_tdd<19>|<00><17><00>d<1A>d d<1B>D<00><01>|_d|_| s<>|<00><1B>} |<00>| |<0E>|r<>|<00>|<10>|<0F>r |j|j|j |j!|j"|j#|j$fD]}||j%|<q<>t&|j%|j'<|j(|j)@|_*|j*<2A>r |d u<01>r |<00>+|<13>g|_,d S)a<>
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.
:param str host: host to connect
:param str user: user to connect as
:param str password: password to use
:param str passwd: alias of password (deprecated)
:param str database: database to use
:param str db: alias of database (deprecated)
:param int port: TCP/IP port to connect to
:param str unix_socket: location of unix_socket to use
:param dict conv: conversion dictionary, see MySQLdb.converters
:param int connect_timeout:
number of seconds to wait before the connection attempt fails.
:param bool compress: if set, compression is enabled
:param str named_pipe: if set, a named pipe is used to connect (Windows only)
:param str init_command:
command which is run once the connection is created
:param str read_default_file:
file from which default client values are read
:param str read_default_group:
configuration group to use from the default file
:param type cursorclass:
class object, used to create cursors (keyword only)
:param bool 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 bytes. Unicode objects will always
be encoded to the connection's character set regardless of
this setting.
Default to True.
:param str charset:
If supplied, the connection character set will be changed
to this character set.
:param str collation:
If ``charset`` and ``collation`` are both supplied, the
character set and collation for the current connection
will be set.
If omitted, empty string, or None, the default collation
for the ``charset`` is implied.
:param str auth_plugin:
If supplied, the connection default authentication plugin will be
changed to this value. Example values:
`mysql_native_password` or `caching_sha2_password`
:param str sql_mode:
If supplied, the session SQL mode will be changed to this
setting.
For more details and legal values, see the MySQL documentation.
:param int client_flag:
flags to use or 0 (see MySQL docs or constants/CLIENTS.py)
:param bool multi_statements:
If True, enable multi statements for clients >= 4.1.
Defaults to True.
:param str ssl_mode:
specify the security settings for connection to the server;
see the MySQL documentation for more details
(mysql_option(), MYSQL_OPT_SSL_MODE).
Only one of 'DISABLED', 'PREFERRED', 'REQUIRED',
'VERIFY_CA', 'VERIFY_IDENTITY' can be specified.
:param dict 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.
Since mysqlclient 2.2.4, ssl=True is alias of ssl_mode=REQUIRED
for better compatibility with PyMySQL and MariaDB.
:param str server_public_key_path:
specify the path to a file RSA public key file for caching_sha2_password.
See https://dev.mysql.com/doc/refman/9.0/en/caching-sha2-pluggable-authentication.html
:param bool local_infile:
sets ``MYSQL_OPT_LOCAL_INFILE`` in ``mysql_options()`` enabling LOAD LOCAL INFILE from any path; zero disables;
:param str local_infile_dir:
sets ``MYSQL_OPT_LOAD_DATA_LOCAL_DIR`` in ``mysql_options()`` enabling LOAD LOCAL INFILE from any path;
if ``local_infile`` is set to ``True`` then this is ignored;
supported for mysql version >= 8.0.21
:param bool autocommit:
If False (default), autocommit is disabled.
If True, autocommit is enabled.
If None, autocommit isn't set and server default is used.
:param bool binary_prefix:
If set, the '_binary' prefix will be used for raw byte query
arguments (e.g. Binary). This is disabled by default.
There are a number of undocumented, non-standard methods. See the
documentation for the MySQL C API for some hints on what they do.
r)<02>CLIENT<4E>
FIELD_TYPE)<02> conversions<6E> _bytes_or_str<74>db<64>database<73>passwd<77>password<72>convN<76> cursorclass<73>charset<65><00> collation<6F> use_unicodeT<65>sql_mode<64> binary_prefixF<78> client_flag<61>multi_statements<74>
autocommitcSs"i|] \}}t|<01>tur||<02>qSr)<02>typer)<03>.0<EFBFBD>k<>vrrr<00>
<dictcomp><3E>s
 <04>z'Connection.__init__.<locals>.<dictcomp>cSsg|]}t|<01><01>qSr)r )r6<00>nrrr<00>
<listcomp><3E>sz'Connection.__init__.<locals>.<listcomp><3E>.<2E><00>ascii)-<2D>MySQLdb.constantsr"r#<00>MySQLdb.convertersr$r%<00>copy<70>pop<6F>items<6D>
isinstancer<00>list<73>default_cursor<6F>get<65>_binary_prefix<69> MULTI_RESULTS<54>MULTI_STATEMENTS<54>_set_attributes<65>super<65>__init__r+<00>encoders<72>tuple<6C>get_server_info<66>split<69>_server_version<6F>encoding<6E>character_set_name<6D>set_character_set<65> set_sql_mode<64>STRING<4E>
VAR_STRING<EFBFBD>VARCHAR<41> TINY_BLOB<4F> MEDIUM_BLOB<4F> LONG_BLOB<4F>BLOB<4F> converter<65>str<74>JSON<4F>server_capabilities<65> TRANSACTIONS<4E>_transactionalr4<00>messages)<15>self<6C>args<67>kwargsr"r#r$r%<00>kwargs2r*<00>conv2r7r8r+r,r.r/r0r2r3r4<00>t<><01> __class__rrrM8sxm

     
 
 <08><06> 
<08> 


zConnection.__init__Nr-<00><> cKs(|r|sd}||_||_||_||_dS)zset some attributes for otel<65> localhostN)<04>host<73>userr'r&)rerorpr)r'<00>port<72> unix_socketrgrrrrK<00>s 
zConnection._set_attributescCs|S<00>Nr<00>rerrr<00> __enter__szConnection.__enter__cCs |<00><00>dSrs)<01>close)re<00>exc_type<70> exc_value<75> tracebackrrr<00>__exit__ s zConnection.__exit__cCs*t|<01>}|<00><01>|krtj<03>||<01>dSdSrs)<05>bool<6F>get_autocommitr<00>
connectionr4)re<00>onrrrr4 s <04>zConnection.autocommitcCs|p|j|<00>S)z<>
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.
)r+)rer+rrr<00>cursorszConnection.cursorcCs$t|t<01>r t|<01>}tj<04>||<01>dSrs)rD<00> bytearray<61>bytesrr}<00>query)rer<>rrrr<>s
zConnection.querycCs.t|ttf<02>s J<00>|<00>|<01>}|jrd|S|S)Ns_binary)rDr<>r<><00>string_literalrH)re<00>bs<62>xrrr<00>_bytes_literal s

zConnection._bytes_literalcCsdd<02>t|j|<01><02>S)Ns(%s)<29>,)<03>join<69>map<61>literal)rerjrrr<00>_tuple_literal'szConnection._tuple_literalcCs<>t|t<01>r|<00>|<01>|j<04><01>}n5t|t<05>r|<00>|<01>}n*t|t<07>r%|<00>|<01>}nt|tt f<02>r2|<00>
|<01>}n|<00> ||j <0C>}t|t<01>rD|<02>|j<04>}t|t<07>sKJ<00>|S)aIf 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.
) rDr_r<><00>encoderSr<>r<>r<>rOrEr<><00>escaperN)re<00>orrrrr<>*s

 
  
 zConnection.literalcCs|<00>d<01>dS)ziExplicitly begin a connection.
This method is not used when autocommit=False (default).
sBEGINN)r<>rtrrr<00>beginAszConnection.begincsDt<00><00>|<01>t<02>||<01>|_|r |<00>d|<01>d|<02><00><04>|<00><06>dSdS)z,Set the connection character set to charset.z
SET NAMES z COLLATE N)rLrU<00>_charset_to_encodingrGrSr<><00> store_result)rer,r.rkrrrUHs  <04>zConnection.set_character_setcCs,|jdkr td<02><01>|<00>d|<00>|<00><03>dS)zNSet the connection sql_mode. See MySQL documentation for
legal values.<2E><02>rz!server is too old to set sql_modezSET SESSION sql_mode='%s'N)rRr r<>r<>)rer0rrrrVPs
 zConnection.set_sql_modecCs.|jdkrdS|<00>d<03>|<00><02>}|<01>d<04>}|S)z<>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.r<>rz SHOW WARNINGSr)rRr<>r<><00> fetch_row)re<00>r<>warningsrrr<00> show_warningsXs


zConnection.show_warnings)NNNr-rmNrs) <20>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r<00>CursorrFrMrKrurzr4rr<>r<>r<>r<>r<>rUrVr<>rrrr rr
r r rr <00> __classcell__rrrkrr!3s< @
<EFBFBD>
   r!)r<><00>rer-rr<00> _exceptionsrrrrr r
r r r rr<><00>compilerr r}r!rrrr<00><module>s0<06>