ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 4]c@sSdZddlZddlmZddlmZddlmZddlmZddlmZej d d Z ej d d Z ej d dZ ej ddZ ej ddZej ddddZej ddddZej ddddZej ddddZej dddd Zej d!d"dd#Zej d$d%dd&Zej d'd(dd)Zej d*d+dd,Zej d-d.deeBeBeBeBZej d/d0deeAZej d1d2deeAZej d3d4deeAZej d5d6deeAZej d7d8deeAZd9Zd:ZdeZ ej d=Z!ej d>Z"ej d?Z#ej d@dAZ$ej dBdCZ%ej dDdEZ&ej dFdGZ'e(egZ)e(dee gZ+ej dHZ,ej dIZ-dJZ.dKZ/ej0eZ1ej0dLZ2dMZ3dNZ4dOZ5dPZ6dQZ7dRZ8dSZ9ej:e;dTZ<dUZ=dVZ>dWZ?dXZ@dYZAdZZBd[ZCejDd\ZEej:eFeGd]ZHeId^ZJd_e;fd`YZKdaeKfdbYZLdce;fddYZMdS(fs=Constants and rudimental functions used throughout the ORM. iNi(texci(t inspection(tutil(t expressiontPASSIVE_NO_RESULTsSymbol returned by a loader callable or other attribute/history retrieval operation when a value could not be determined, based on loader callable flags. t ATTR_WAS_SETsSymbol returned by a loader callable to indicate the retrieved value, or values, were assigned to their attributes on the target object. t ATTR_EMPTYs@Symbol used internally to indicate an attribute had no callable.tNO_VALUEsSymbol which may be placed as the 'previous' value of an attribute, indicating no value was loaded for an attribute when it was modified, and flags indicated we were not to load it. t NEVER_SETsSymbol which may be placed as the 'previous' value of an attribute indicating that the attribute had not been assigned to previously. t NO_CHANGEs]No callables or SQL should be emitted on attribute access and no state should change t canonicalit CALLABLES_OKsELoader callables can be fired off if a value is not present. tSQL_OKsBLoader callables can emit SQL at least on scalar value attributes.tRELATED_OBJECT_OKsZCallables can use SQL to load related objects as well as scalar value attributes. itINIT_OKsAttributes should be initialized with a blank value (None or an empty collection) upon get, if no other value can be obtained. itNON_PERSISTENT_OKs9Callables can be emitted if the parent is not persistent.itLOAD_AGAINST_COMMITTEDsUCallables should use committed values as primary/foreign keys during a load. i t NO_AUTOFLUSHs*Loader callables should disable autoflush.i@tNO_RAISEs0Loader callables should not raise any assertionsit PASSIVE_OFFs&Callables can be emitted in all cases.tPASSIVE_RETURN_NEVER_SETsPASSIVE_OFF ^ INIT_OKtPASSIVE_NO_INITIALIZEs'PASSIVE_RETURN_NEVER_SET ^ CALLABLES_OKtPASSIVE_NO_FETCHsPASSIVE_OFF ^ SQL_OKtPASSIVE_NO_FETCH_RELATEDsPASSIVE_OFF ^ RELATED_OBJECT_OKtPASSIVE_ONLY_PERSISTENTsPASSIVE_OFF ^ NON_PERSISTENT_OKt_sa_class_managert_sa_instance_statetmappert instrumentort EXT_CONTINUEtEXT_STOPtEXT_SKIPt ONETOMANYsIndicates the one-to-many direction for a :func:`.relationship`. This symbol is typically used by the internals but may be exposed within certain API features. t MANYTOONEsIndicates the many-to-one direction for a :func:`.relationship`. This symbol is typically used by the internals but may be exposed within certain API features. t MANYTOMANYsIndicates the many-to-many direction for a :func:`.relationship`. This symbol is typically used by the internals but may be exposed within certain API features. t NOT_EXTENSIONsSymbol indicating an :class:`InspectionAttr` that's not part of sqlalchemy.ext. Is assigned to the :attr:`.InspectionAttr.extension_type` attribute. tSET_DEFERRED_EXPIREDtDEFER_FOR_STATEcstjfd}|S(s1Mark a method as generative, e.g. method-chained.csI|dj}xD]}|||jqW|||d||S(Nii(t_clonet__name__(tfntargstkwtselft assertion(t assertions(sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pytgenerates  (Rt decorator(R-R.((R-sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt _generativescCs|jjtdS(N(t__dict__tgettDEFAULT_MANAGER_ATTRtNone(tcls((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pytmanager_of_classsR1cCstt|S(s'Return a string describing an instance.(t state_strtinstance_state(tinstance((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt instance_strscCs4|dkrdSd|jjt|jfSdS(s=Return a string describing an instance via its InstanceState.R4s <%s at 0x%x>N(R4tclass_R'tidtobj(tstate((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyR7s cCs%|dkrdSd|jjfSdS(sNReturn a string describing an instance's class via its InstanceState. R4s<%s>N(R4R;R'(R>((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pytstate_class_strs cCst|d|S(Nt.(R:(R9t attribute((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt attribute_strscCst|d|S(NR@(R7(R>RA((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pytstate_attribute_str scCs t|jS(sGiven an object, return the primary Mapper associated with the object instance. Raises :class:`sqlalchemy.orm.exc.UnmappedInstanceError` if no mapping is configured. This function is available via the inspection system as:: inspect(instance).mapper Using the inspection system will raise :class:`sqlalchemy.exc.NoInspectionAvailable` if the instance is not part of a mapping. (t object_stateR(R9((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt object_mapperscCs2t|}|dkr*tj|n|SdS(sGiven an object, return the :class:`.InstanceState` associated with the object. Raises :class:`sqlalchemy.orm.exc.UnmappedInstanceError` if no mapping is configured. Equivalent functionality is available via the :func:`.inspect` function as:: inspect(instance) Using the inspection system will raise :class:`sqlalchemy.exc.NoInspectionAvailable` if the instance is not part of a mapping. N(t_inspect_mapped_objectR4RtUnmappedInstanceError(R9R>((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyRD"s  cCs>yt|SWn)tjk r%dStjk r9dSXdS(N(R8RtUnmappedClassErrorR4tNO_STATE(R9((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyRF:s cCs8tj|t}|dk r%|jStj|dS(N(RtinspecttFalseR4RRRH(tclass_or_mappertinsp((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt_class_to_mapperFs cCs-tj|t}|dk r%|jSdSdS(s\Return the :class:`.Mapper` for the given class or None if the class is not mapped. N(RRJRKR4R(tentityRM((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt_mapper_or_noneNs cCs8tj|t}|dk o7|j o7|jp7|jS(shReturn True if the given object is a mapped class, :class:`.Mapper`, or :class:`.AliasedClass`. N(RRJRKR4tis_clause_elementt is_mappertis_aliased_class(RORM((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt_is_mapped_classZs  cCs't|dr|jStj|SdS(Ntkey(thasattrRURt_column_as_key(tattr((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt _attr_as_keygscCs[tj|t}t|drPt|jdrPg|jjD] }|^q@S|gSdS(Nt selectabletc(RRJRKRVRZR[(RORMR[((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt _orm_columnsns!cCs.tj|t}|dk o-t|dtS(NRS(RRJRKR4tgetattr(RORM((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt_is_aliased_classvscCstj|}|jr*|}|j}nC|jrE|j}|}n(t|drg|jj}}n|}yt ||SWn*t k rt j d||fnXdS(sReturn a class attribute given an entity and string name. May return :class:`.InstrumentedAttribute` or user-defined attribute. Rs Entity '%s' has no property '%s'N( RRJt is_selectableR[RSRORVRR;R]tAttributeErrortsa_exctInvalidRequestError(RORURMt description((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt_entity_descriptor{s      smanager.mappercCsby&t|}|jsdS|j}Wntjk r=dSX|rZ|jrZ|jn|SdS(N(R6t is_mappedR4RRRIt _new_mapperst_configure_all(R;t configuret class_managerR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt_inspect_mapped_classs    cCs`t|d|}|dkrXt|tsFtjd|fntj|n|SdS(sGiven a class, return the primary :class:`.Mapper` associated with the key. Raises :exc:`.UnmappedClassError` if no mapping is configured on the given class, or :exc:`.ArgumentError` if a non-class object is passed. Equivalent functionality is available via the :func:`.inspect` function as:: inspect(some_mapped_class) Using the inspection system will raise :class:`sqlalchemy.exc.NoInspectionAvailable` if the class is not mapped. Rhs Class object expected, got '%r'.N(RjR4t isinstancettypeRat ArgumentErrorRRH(R;RhR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt class_mappers tInspectionAttrcBsJeZdZdZeZeZeZeZeZ eZ eZ eZ e ZRS(s A base class applied to all ORM objects that can be returned by the :func:`.inspect` function. The attributes defined here allow the usage of simple boolean checks to test basic facts about the object returned. While the boolean checks here are basically the same as using the Python isinstance() function, the flags here can be used without the need to import all of these classes, and also such that the SQLAlchemy class system can change while leaving the flags here intact for forwards-compatibility. ((R't __module__t__doc__t __slots__RKR_RSt is_instanceRRt is_propertyt is_attributet_is_internal_proxyRQR#textension_type(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyRos  tInspectionAttrInfocBs eZdZejdZRS(sAdds the ``.info`` attribute to :class:`.InspectionAttr`. The rationale for :class:`.InspectionAttr` vs. :class:`.InspectionAttrInfo` is that the former is compatible as a mixin for classes that specify ``__slots__``; this is essentially an implementation artifact. cCsiS(sInfo dictionary associated with the object, allowing user-defined data to be associated with this :class:`.InspectionAttr`. The dictionary is generated when first accessed. Alternatively, it can be specified as a constructor argument to the :func:`.column_property`, :func:`.relationship`, or :func:`.composite` functions. .. versionchanged:: 1.0.0 :attr:`.MapperProperty.info` is also available on extension types via the :attr:`.InspectionAttrInfo.info` attribute, so that it can apply to a wider variety of ORM and extension constructs. .. seealso:: :attr:`.QueryableAttribute.info` :attr:`.SchemaItem.info` ((R+((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pytinfos(R'RpRqRtmemoized_propertyRy(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyRx st_MappedAttributecBseZdZdZRS(sVMixin for attributes which should be replaced by mapper-assigned attributes. ((R'RpRqRr(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyR{/s(RR(NRqtoperatortRRaRRtsqlRtsymbolRRRRRR R R R RRRRRRRRRRRR3tDEFAULT_STATE_ATTRt _INSTRUMENTORRRRR R!R"R#t frozensett _never_setR4t _none_sett_SET_DEFERRED_EXPIREDt_DEFER_FOR_STATER0R6t attrgetterR8t instance_dictR:R7R?RBRCRERDt _inspectstobjectRFRNRPRTRYR\R^Rdt dottedgettert _state_mapperRlRKRjtTrueRnRoRxR{(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt s                                     I"