
    YhR                        d dl Z ddlmZ  G d de      Z G d dee      Z G d d	e      Z G d
 de      Z G d de      Z G d de      Z	 G d de      Z
 G d de      Z G d de      Z G d de      Z G d de      Zi Zd Z eeej"                  ej$                  ej&                  ej(                  ej*                  ej,                  ej.                  ej0                  ej2                  ej4                  ej6                  ej*                  ej8                          ee	ej:                  ej<                  ej>                  ej@                  ejB                  ejD                  ejF                  ejH                  ejJ                  
        eeejL                  ejN                  ejP                  ejR                  ejT                  ejV                  ejX                          eeejZ                  ej\                  ej^                  ej`                          ee
ejb                  ejd                  ejf                  ejh                  ejj                  ejl                  ejn                         [[d Z8y)    N   )ERc                       e Zd ZdZy)
MySQLErrorz*Exception related to operation with MySQL.N__name__
__module____qualname____doc__     \/var/www/django-portfolio.reubendavern.link/venv/lib/python3.12/site-packages/pymysql/err.pyr   r      s    4r   r   c                       e Zd ZdZy)WarningzWException raised for important warnings like data truncations
    while inserting, etc.Nr   r   r   r   r   r   
   s    r   r   c                       e Zd ZdZy)ErrorzQException that is the base class of all other error exceptions
    (not Warning).Nr   r   r   r   r   r      s    r   r   c                       e Zd ZdZy)InterfaceErrorzkException raised for errors that are related to the database
    interface rather than the database itself.Nr   r   r   r   r   r      s    2r   r   c                       e Zd ZdZy)DatabaseErrorzAException raised for errors that are related to the
    database.Nr   r   r   r   r   r      s    r   r   c                       e Zd ZdZy)	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                       e Zd ZdZy)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   $   s    .r   r   c                       e Zd ZdZy)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   r   c                       e Zd ZdZy)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   s    r   r   c                       e Zd ZdZy)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   s    %r   r!   c                       e Zd ZdZy)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#   >   s    $r   r#   c                 $    |D ]  }| t         |<    y )N)	error_map)excerrorserrors      r   
_map_errorr)   H   s     	%r   c                    t        j                  d| dd       d   }| d   dk(  r| dd  j                  dd      }n| dd  j                  dd      }t        j	                  |      }||d	k  rt
        nt        } |||      )
Nz<hr      r   #   	   zutf-8replacei  )structunpackdecoder%   getr   r   )dataerrnoerrval
errorclasss       r   raise_mysql_exceptionr7      s    MM$Qq	*1-E Aw$ ab)4ab)4u%J&+dl]8H

UF
##r   )9r/   	constantsr   	Exceptionr   r   r   r   r   r   r   r   r   r!   r#   r%   r)   DB_CREATE_EXISTSSYNTAX_ERRORPARSE_ERRORNO_SUCH_TABLEWRONG_DB_NAMEWRONG_TABLE_NAMEFIELD_SPECIFIED_TWICEINVALID_GROUP_FUNC_USEUNSUPPORTED_EXTENSIONTABLE_MUST_HAVE_COLUMNS"CANT_DO_THIS_DURING_AN_TRANSACTIONWRONG_COLUMN_NAMEWARN_DATA_TRUNCATEDWARN_NULL_TO_NOTNULLWARN_DATA_OUT_OF_RANGE
NO_DEFAULTPRIMARY_CANT_HAVE_NULLDATA_TOO_LONGDATETIME_FUNCTION_OVERFLOWTRUNCATED_WRONG_VALUE_FOR_FIELDILLEGAL_VALUE_FOR_TYPE	DUP_ENTRYNO_REFERENCED_ROWNO_REFERENCED_ROW_2ROW_IS_REFERENCEDROW_IS_REFERENCED_2CANNOT_ADD_FOREIGNBAD_NULL_ERRORWARNING_NOT_COMPLETE_ROLLBACKNOT_SUPPORTED_YETFEATURE_DISABLEDUNKNOWN_STORAGE_ENGINEDBACCESS_DENIED_ERRORACCESS_DENIED_ERRORCON_COUNT_ERRORTABLEACCESS_DENIED_ERRORCOLUMNACCESS_DENIED_ERRORCONSTRAINT_FAILEDLOCK_DEADLOCKr7   r   r   r   <module>ra      sJ    5 5gz 
J 
2U 2
E 
 .} .] M %} %$ $ 	
 OONN))  MM!!&& LL	 $$   	 $r   