σ ΓΜ4]c@sƒdZddlmZddlmZeefZdejfd„ƒYZ e Z dejfd„ƒYZ dej fd „ƒYZ d ejfd „ƒYZd ejfd „ƒYZde fd„ƒYZde fd„ƒYZdej fd„ƒYZdej fd„ƒYZdej fd„ƒYZdej fd„ƒYZdej fd„ƒYZd„Zejdƒd„ƒZdS( sSQLAlchemy ORM exceptions.i(texc(tutiltStaleDataErrorcBseZdZRS(saAn operation encountered database state that is unaccounted for. Conditions which cause this to happen include: * A flush may have attempted to update or delete rows and an unexpected number of rows were matched during the UPDATE or DELETE statement. Note that when version_id_col is used, rows in UPDATE or DELETE statements are also matched against the current known version identifier. * A mapped object with version_id_col was refreshed, and the version number coming back from the database does not match that of the object itself. * A object is detached from its parent object, however the object was previously attached to a different parent identity which was garbage collected, and a decision cannot be made if the new parent was really the most recent "parent". (t__name__t __module__t__doc__(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRst FlushErrorcBseZdZRS(s0A invalid condition was detected during flush().(RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR-st UnmappedErrorcBseZdZRS(s?Base for exceptions that involve expected mappings not present.(RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR1stObjectDereferencedErrorcBseZdZRS(sPAn operation cannot complete due to an object being garbage collected. (RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR5stDetachedInstanceErrorcBseZdZdZRS(sSAn attempt to access unloaded attributes on a mapped instance that is detached.tbhk3(RRRtcode(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR <stUnmappedInstanceErrorcBs2eZdZejdƒdd„ƒZd„ZRS(s;An mapping operation was requested for an unknown instance.ssqlalchemy.orm.basecCs’|sŽy9|jt|ƒƒtt|ƒƒ}d||f}WqŽtk rŠtt|ƒƒ}t|tƒr‹|dt|ƒ7}q‹qŽXntj||ƒdS(Ns“Class %r is mapped, but this instance lacks instrumentation. This occurs when the instance is created before sqlalchemy.orm.mapper(%s) was called.s;; was a class (%s) supplied where an instance was required?(t class_mapperttypet_safe_cls_nametUnmappedClassErrort_default_unmappedt isinstanceRt__init__(tselftbasetobjtmsgtname((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRFs cCs|jd|jdffS(Ni(t __class__tNonetargs(R((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyt __reduce__[sN(RRRRt dependenciesRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR Cs RcBs#eZdZdd„Zd„ZRS(s8An mapping operation was requested for an unknown class.cCs)|st|ƒ}ntj||ƒdS(N(RRR(RtclsR((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRbscCs|jd|jdffS(Ni(RRR(R((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRgsN(RRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR_s tObjectDeletedErrorcBs2eZdZejdƒdd„ƒZd„ZRS(sιA refresh operation failed to retrieve the database row corresponding to an object's known primary key identity. A refresh operation proceeds when an expired attribute is accessed on an object, or when :meth:`.Query.get` is used to retrieve an object which is, upon retrieval, detected as expired. A SELECT is emitted for the target row based on primary key; if no row is returned, this exception is raised. The true meaning of this exception is simply that no row exists for the primary key identifier associated with a persistent object. The row may have been deleted, or in some cases the primary key updated to a new value, outside of the ORM's management of the target object. ssqlalchemy.orm.basecCs3|sd|j|ƒ}ntjj||ƒdS(NsDInstance '%s' has been deleted, or its row is otherwise not present.(t state_strtsa_exctInvalidRequestErrorR(RRtstateR((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRscCs|jd|jdffS(Ni(RRR(R((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR‰sN(RRRRRRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRks  tUnmappedColumnErrorcBseZdZRS(s5Mapping operation was requested on an unknown column.(RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR$st NoResultFoundcBseZdZRS(s2A database result was required but none was found.(RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR%‘stMultipleResultsFoundcBseZdZRS(sCA single database result was required but more than one were found.(RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR&•stLoaderStrategyExceptioncBseZdZd„ZRS(s2A loader strategy for an attribute does not exist.cCsn|dkr,tjj|d||fƒn>tjj|dtj|ƒ|tj|ƒtj|ƒfƒdS(NsCan't find strategy %s for %ssuCan't apply "%s" strategy to property "%s", which is a "%s"; this loader strategy is intended to be used with a "%s".(RR!R"RRtclsname_as_plain_name(Rtapplied_to_property_typetrequesting_propertyt applies_totactual_strategy_typet strategy_key((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRœs     (RRRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyR'™scCsdydj|j|jfƒ}Wn>tk r_t|ddƒ}|dkr`t|ƒ}q`nX|S(Nt.R(tjoinRRtAttributeErrortgetattrRtrepr(Rtcls_name((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRΉs  ssqlalchemy.orm.basecCsdy|j|ƒj}Wn-tk r/i}ntk rEi}nXt|ƒ}|s`d|SdS(NsClass '%s' is not mapped(tmanager_of_classtmapperstNO_STATEt TypeErrorR(RRR5R((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyRΓs     N(RtRR!RR0tKeyErrorR6tSQLAlchemyErrorRtConcurrentModificationErrorRR"RRR R RRR$R%R&R'RRR(((sE/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/exc.pyts$  "