8dZddlmZddlmZdZGddeZGddeZGd d eZGd d eZ Gd deZ GddeZ GddeZ GddeZ Gdde ZGddeZGddeZGddeZGddeZGdd eZGd!d"eZGd#d$eZGd%d&eeZGd'd(eZGd)d*eZGd+d,eZGd-d.eZGd/d0eZGd1d2eZGd3d4eZdZ Gd5d6eZ!Gd7d8e!Z"Gd9d:e"Z#Gd;de$Z%Gd?d@e$Z&GdAdBe$Z'GdCdDe$Z(GdEdFe$Z)GdGdHe$Z*GdIdJe+Z,GdKdLe-Z.GdMdNe/Z0dS)OzExceptions used with SQLAlchemy. The base exception class is :exc:`.SQLAlchemyError`. Exceptions which are raised as a result of DBAPI exceptions are all subclasses of :exc:`.DBAPIError`. ) _preloaded)compatNcReZdZdZdZfdZdZejfdZ dZ dZ dZ xZ S) SQLAlchemyErrorzGeneric error class.Nc|dd}|||_tt|j|i|dS)Ncode)poprsuperr__init__)selfargkwr __class__s /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/sqlalchemy/exc.pyr zSQLAlchemyError.__init__sKvvfd##  DI-ot$$-s9b99999c:|jsdSdtd|jdS)Nz3(Background on this error at: http://sqlalche.me/e//))r_version_tokenr s r _code_strzSQLAlchemyError._code_str!s2y 2 #NNIII  rc@t|jdkrs|jd}|r0t|tjrtj|d}n2tjs|st|}ntj|}|St|jS)Nrzutf-8) lenargs isinstancer binary_typesdecode_backslashreplacepy3kstr text_type)r as_unicodetexts r_messagezSQLAlchemyError._message.s ty>>Q  9Q> !rcp||}|jr|d|}|S)N )r%rr)r r#messages r _sql_messagezSQLAlchemyError._sql_messageRs=-- ++ 9 z3CircularDependencyError.__init__..s(*C*Cq477*C*C*C*C*C*Crr)joinrr cyclesedges)r r(rOrPmsgrs rr z CircularDependencyError.__init__se ; w*C*CF*C*C*C!C!CC CGGG  wT :::  rcF|jd|j|j|jdffSNr)rrOrPrrs r __reduce__z"CircularDependencyError.__reduce__s"~dk4:ty|LLLr)NNr0r1r2r3r rTr9rrrFrFsF$MMMMMrrFceZdZdZdS) CompileErrorz2Raised when an error occurs during SQL compilationNr8r9rrrWrWs<<<>>rNrUr9rrrsrss<    ?????rrsceZdZdZdZdZdS)NoReferencedColumnErrorzRRaised by ``ForeignKey`` when the referred ``Column`` cannot be located. cXt||||_||_dSr+)rqr ru column_name)r r(rvcnames rr z NoReferencedColumnError.__init__s-!!$000 rcD|j|jd|j|jffSrS)rrrur{rs rrTz"NoReferencedColumnError.__reduce__s& N Yq\4?D,< =  rNrUr9rrryrys< !!!      rryceZdZdZdS)NoSuchTableErrorz7Table does not exist or is not visible to a connection.Nr8r9rrrr sAAAArrceZdZdZdS)UnreflectableTableErrorzUTable exists but can't be reflected for some reason. .. versionadded:: 1.2 Nr8r9rrrr$r:rrceZdZdZdS)UnboundExecutionErrorzASQL was attempted without a database connection to execute it on.Nr8r9rrrr,sKKKKrrceZdZdZdS) DontWrapMixina8A mixin class which, when applied to a user-defined Exception class, will not be wrapped inside of :exc:`.StatementError` if the error is emitted within the process of executing a statement. E.g.:: from sqlalchemy.exc import DontWrapMixin class MyCustomException(Exception, DontWrapMixin): pass class MySpecialType(TypeDecorator): impl = String def process_bind_param(self, value, dialect): if value == 'invalid': raise MyCustomException("invalid!") Nr8r9rrrr0srrcteZdZdZdZ dZ dZ dZ d dZdZ dZ e j ddZ dS) StatementErroravAn error occurred during execution of a SQL statement. :class:`StatementError` wraps the exception raised during execution, and features :attr:`.statement` and :attr:`.params` attributes which supply context regarding the specifics of the statement which had an issue. The wrapped exception object is available in the :attr:`.orig` attribute. NFct|||||_||_||_||_||_g|_dS)NrM)rr statementparamsorigismultihide_parametersdetail)r r(rrrrrrs rr zStatementError.__init__bsN   wT :::"   . rc:|j|dSr+)rappend)r rQs r add_detailzStatementError.add_detailts 3rch|j|jd|j|j|j|j|jffSrS)rrrrrrrrs rrTzStatementError.__reduce__ws9 N !   $    rzsqlalchemy.sql.utilc2||g}|jr|s)tjsdtj|jz}n d|jz}|||jrW|jr|dn:||jd|j }|d|z| }|r||d d|j D|zS) Nr.z [SQL: %s]z3[SQL parameters hidden due to hide_parameters=True] )rz[parameters: %r] cg|]}d|zS)z(%s)r9)rJdets r z/StatementError._sql_message..s>>>3&3,>>>r) r%rrr safe_bytestringrrr _repr_paramsrrrNr)r utilr#details stmt_detail params_reprcode_strs rr)zStatementError._sql_messages===J=778 > E ;fk ;)F,BN-- *DN: NN; ' ' '{ E'ENNM#'"3"3 R#4##KNN#5 #CDDD>>##  % NN8 $ $ $yy>>$+>>>HIIIr)FNN)r0r1r2r3rrrrr rrTr dependenciesr)r9rrrrJs  IN FE D%G $       Z233JJ43JJJrrcLeZdZdZdZe ddZdZ ddZdS) DBAPIErrora Raised when the execution of a database operation fails. Wraps exceptions raised by the DB-API underlying the database operation. Driver-specific implementations of the standard DB-API exception types are wrapped by matching sub-types of SQLAlchemy's :class:`DBAPIError` when possible. DB-API's ``Error`` type maps to :class:`DBAPIError` in SQLAlchemy, otherwise the names are identical. Note that there is no guarantee that different DB-API implementations will raise the same exception type for any given error condition. :class:`DBAPIError` features :attr:`~.StatementError.statement` and :attr:`~.StatementError.params` attributes which supply context regarding the specifics of the statement which had an issue, for the typical case when the error was raised within the context of emitting a SQL statement. The wrapped exception object is available in the :attr:`~.StatementError.orig` attribute. Its type and properties are DB-API implementation specific. dbapiFNc t|trt|trt|tr|S|t|trE|rCt d|jjd|jjd|j d|||||j |St||s4|r2t d|jjd|jjd||||||St} |jj D]O} | j} |r|j | | } | | vr%t| | t r | | }nP|||||||j |S)N(.) r)rrr)rr)connection_invalidatedrrr)r BaseException Exceptionrrrrr1r0rrglobals__mro__dbapi_exception_translation_mapget issubclassr) clsrrrdbapi_base_errrrdialectrglobsuper_names rinstancezDBAPIError.instances t] + + 4>tY4O4O  m , , K  $00 Y %~111/// !  $3#     n55 ) %~111///  $3#    99D.0  "BFFdD4<rsH2H2H2H2H2iH2H2H2VO      }    ///// ///  ..... ... MMMMMoMMM@=====?===     ,   &FFFFFoFFF        ,$KKKKK?KKK/"""""/""" (((((-((( AAAAA"5AAAOOOOO*OOO ? ? ? ? ?- ? ? ?     .   $BBBBB*BBB1LLLLL/LLLF.SJSJSJSJSJ_SJSJSJlH=H=H=H=H=H=H=H=VZ J   } ] M }  55555-55555555";555r