o
    U6d                     @   s  d dl Z ddlmZ G dd deZG dd deeZG dd	 d	eZG d
d deZG dd deZG dd deZ	G dd deZ
G dd deZG dd deZG dd deZG dd deZi Zdd Zeeejejejejejejejejejejejejej ee	ejejejej ej!ej"ej#ej$ej%
 eeej&ej'ej(ej)ej*ej+ej, eeej-ej.ej/ej0 ee
ej1ej2ej3ej4ej5ej6ej7 [[dd Z8dS )    N   )ERc                   @      e Zd ZdZdS )
MySQLErrorz*Exception related to operation with MySQL.N__name__
__module____qualname____doc__ r   r   bC:\Users\jesus\OneDrive\Desktop\erpjis_fastapi\backend\jisbackend\Lib\site-packages\pymysql/err.pyr          r   c                   @   r   )WarningzWException raised for important warnings like data truncations
    while inserting, etc.Nr   r   r   r   r   r   
   r   r   c                   @   r   )ErrorzQException that is the base class of all other error exceptions
    (not Warning).Nr   r   r   r   r   r      r   r   c                   @   r   )InterfaceErrorzkException raised for errors that are related to the database
    interface rather than the database itself.Nr   r   r   r   r   r      r   r   c                   @   r   )DatabaseErrorzAException raised for errors that are related to the
    database.Nr   r   r   r   r   r      r   r   c                   @   r   )	DataErrorzException raised for errors that are due to problems with the
    processed data like division by zero, numeric value out of range,
    etc.Nr   r   r   r   r   r      r   r   c                   @   r   )OperationalErrora;  Exception raised for errors that are related to the database's
    operation and not necessarily under the control of the programmer,
    e.g. an unexpected disconnect occurs, the data source name is not
    found, a transaction could not be processed, a memory allocation
    error occurred during processing, etc.Nr   r   r   r   r   r   $   r   r   c                   @   r   )IntegrityErrorzException raised when the relational integrity of the database
    is affected, e.g. a foreign key check fails, duplicate key,
    etc.Nr   r   r   r   r   r   ,   r   r   c                   @   r   )InternalErrorzException raised when the database encounters an internal
    error, e.g. the cursor is not valid anymore, the transaction is
    out of sync, etc.Nr   r   r   r   r   r   2   r   r   c                   @   r   )ProgrammingErrorzException raised for programming errors, e.g. table not found
    or already exists, syntax error in the SQL statement, wrong number
    of parameters specified, etc.Nr   r   r   r   r   r   8   r   r   c                   @   r   )NotSupportedErrorzException raised in case a method or database API was used
    which is not supported by the database, e.g. requesting a
    .rollback() on a connection that does not support transaction or
    has transactions turned off.Nr   r   r   r   r   r   >   r   r   c                 G   s   |D ]}| t |< qd S )N)	error_map)excerrorserrorr   r   r   
_map_errorH   s   
r   c                 C   sX   t d| dd d }| dd  dd}t|}|d u r'|dk r%tnt}|||)	Nz<hr      r   	   zutf-8replacei  )structunpackdecoder   getr   r   )dataerrnoZerrvalZ
errorclassr   r   r   raise_mysql_exception   s   

r&   )9r    	constantsr   	Exceptionr   r   r   r   r   r   r   r   r   r   r   r   r   ZDB_CREATE_EXISTSZSYNTAX_ERRORPARSE_ERRORZNO_SUCH_TABLEZWRONG_DB_NAMEZWRONG_TABLE_NAMEZFIELD_SPECIFIED_TWICEZINVALID_GROUP_FUNC_USEUNSUPPORTED_EXTENSIONZTABLE_MUST_HAVE_COLUMNSZ"CANT_DO_THIS_DURING_AN_TRANSACTIONZWRONG_COLUMN_NAMEZWARN_DATA_TRUNCATEDZWARN_NULL_TO_NOTNULLZWARN_DATA_OUT_OF_RANGE
NO_DEFAULTZPRIMARY_CANT_HAVE_NULLZDATA_TOO_LONGZDATETIME_FUNCTION_OVERFLOWZTRUNCATED_WRONG_VALUE_FOR_FIELDZILLEGAL_VALUE_FOR_TYPEZ	DUP_ENTRYZNO_REFERENCED_ROWZNO_REFERENCED_ROW_2ZROW_IS_REFERENCEDZROW_IS_REFERENCED_2ZCANNOT_ADD_FOREIGNZBAD_NULL_ERRORZWARNING_NOT_COMPLETE_ROLLBACKZNOT_SUPPORTED_YETZFEATURE_DISABLEDZUNKNOWN_STORAGE_ENGINEZDBACCESS_DENIED_ERRORZACCESS_DENIED_ERRORZCON_COUNT_ERRORZTABLEACCESS_DENIED_ERRORZCOLUMNACCESS_DENIED_ERRORZCONSTRAINT_FAILEDZLOCK_DEADLOCKr&   r   r   r   r   <module>   s    
