
    Bh                       S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SS	K	J
r
  SS
KJr  SSKJr  SSKJr  \(       a*  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr   " S S\5      r " S S\5      r\rg)a  

.. dialect:: mysql+cymysql
    :name: CyMySQL
    :dbapi: cymysql
    :connectstring: mysql+cymysql://<username>:<password>@<host>/<dbname>[?<options>]
    :url: https://github.com/nakagami/CyMySQL

.. note::

    The CyMySQL dialect is **not tested as part of SQLAlchemy's continuous
    integration** and may have unresolved issues.  The recommended MySQL
    dialects are mysqlclient and PyMySQL.

    )annotations)Any)Iterable)Optional)TYPE_CHECKING)Union   )MySQLDialect)MySQLDialect_mysqldb)BIT   )util)
Connection)DBAPIConnection)DBAPICursor)DBAPIModule)Dialect)PoolProxiedConnection)_ResultProcessorTypec                  *    \ rS rSr      SS jrSrg)_cymysqlBIT.   c                    SS jnU$ )z@Convert MySQL's 64 bit, variable length binary string to a long.c                H    U b  Sn[        U 5       H  nUS-  U-  nM     U$ U $ )Nr      )iter)valuevis      d/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sqlalchemy/dialects/mysql/cymysql.pyprocess-_cymysqlBIT.result_processor.<locals>.process4   s2     eAQ
A %L    )r   zOptional[Iterable[int]]returnzOptional[int] )selfdialectcoltyper!   s       r    result_processor_cymysqlBIT.result_processor/   s    
	 r#   r%   N)r'   r   r(   objectr$   z#Optional[_ResultProcessorType[Any]])__name__
__module____qualname____firstlineno__r)   __static_attributes__r%   r#   r    r   r   .   s    )/	,r#   r   c                      \ rS rSrSrSrSrSrSrSr	\
R                  " \R                  \\05      r\SS j5       rSS jrSS jr        SS	 jrS
rg)MySQLDialect_cymysql?   cymysqlTNFc                    [        S5      $ )Nr4   )
__import__)clss    r    import_dbapi!MySQLDialect_cymysql.import_dbapiJ   s    )$$r#   c                .    UR                   R                  $ N)
connectioncharset)r&   r<   s     r    _detect_charset$MySQLDialect_cymysql._detect_charsetN   s    $$,,,r#   c                    UR                   $ r;   )errno)r&   	exceptions     r    _extract_error_code(MySQLDialect_cymysql._extract_error_codeQ   s    r#   c                    [        XR                  R                  5      (       a  U R                  U5      S;   $ [        XR                  R                  5      (       a  gg)N)i  i  i  i  i  TF)
isinstanceloaded_dbapiOperationalErrorrC   InterfaceError)r&   er<   cursors       r    is_disconnect"MySQLDialect_cymysql.is_disconnectT   sY     a**;;<<++A. 3   ,,;;<< r#   r%   )r$   r   )r<   r   r$   str)rB   DBAPIModule.Errorr$   int)rJ   rO   r<   z7Optional[Union[PoolProxiedConnection, DBAPIConnection]]rK   zOptional[DBAPICursor]r$   bool)r,   r-   r.   r/   driversupports_statement_cachedescription_encodingsupports_sane_rowcountsupports_sane_multi_rowcountsupports_unicode_statementsr   update_copyr
   colspecsr   r   classmethodr8   r>   rC   rL   r0   r%   r#   r    r2   r2   ?   s    F#!#( "& 5 5[7IJH% %- L &	
 
r#   r2   N)__doc__
__future__r   typingr   r   r   r   r   baser
   mysqldbr   typesr    r   engine.baser   engine.interfacesr   r   r   r   r   sql.type_apir   r   r2   r'   r%   r#   r    <module>re      sc    #        )  )400,:4# "(/ (V r#   