/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm
NameSizeModeActions
attributes.py671370644editdlrm
attributes.pyc621290644editdlrm
attributes.pyo618510644editdlrm
base.py148640644editdlrm
base.pyc155580644editdlrm
base.pyo155580644editdlrm
collections.py526140644editdlrm
collections.pyc634480644editdlrm
collections.pyo632260644editdlrm
dependency.py465560644editdlrm
dependency.pyc296240644editdlrm
dependency.pyo295330644editdlrm
deprecated_interfaces.py207510644editdlrm
deprecated_interfaces.pyc227760644editdlrm
deprecated_interfaces.pyo227760644editdlrm
descriptor_props.py282010644editdlrm
descriptor_props.pyc322160644editdlrm
descriptor_props.pyo322160644editdlrm
dynamic.py146660644editdlrm
dynamic.pyc153390644editdlrm
dynamic.pyo153390644editdlrm
evaluator.py54410644editdlrm
evaluator.pyc78190644editdlrm
evaluator.pyo78190644editdlrm
events.py944090644editdlrm
events.pyc1036650644editdlrm
events.pyo1036650644editdlrm
exc.py66100644editdlrm
exc.pyc88380644editdlrm
exc.pyo88380644editdlrm
identity.py102990644editdlrm
identity.pyc151090644editdlrm
identity.pyo151090644editdlrm
instrumentation.py181310644editdlrm
instrumentation.pyc216330644editdlrm
instrumentation.pyo215440644editdlrm
interfaces.py257660644editdlrm
interfaces.pyc302340644editdlrm
interfaces.pyo302340644editdlrm
loading.py322360644editdlrm
loading.pyc205740644editdlrm
loading.pyo205490644editdlrm
mapper.py1283440644editdlrm
mapper.pyc1004120644editdlrm
mapper.pyo1001980644editdlrm
path_registry.py92620644editdlrm
path_registry.pyc132560644editdlrm
path_registry.pyo132560644editdlrm
persistence.py656520644editdlrm
persistence.pyc467860644editdlrm
persistence.pyo467860644editdlrm
properties.py110430644editdlrm
properties.pyc121110644editdlrm
properties.pyo121110644editdlrm
query.py1725900644editdlrm
query.pyc1550140644editdlrm
query.pyo1549360644editdlrm
relationships.py1244420644editdlrm
relationships.pyc1053180644editdlrm
relationships.pyo1052930644editdlrm
scoping.py63930644editdlrm
scoping.pyc76800644editdlrm
scoping.pyo76800644editdlrm
session.py1287540644editdlrm
session.pyc1201170644editdlrm
session.pyo1199380644editdlrm
state.py310440644editdlrm
state.pyc322940644editdlrm
state.pyo322380644editdlrm
strategies.py846020644editdlrm
strategies.pyc630190644editdlrm
strategies.pyo626680644editdlrm
strategy_options.py555050644editdlrm
strategy_options.pyc527300644editdlrm
strategy_options.pyo525960644editdlrm
sync.py55360644editdlrm
sync.pyc46280644editdlrm
sync.pyo46280644editdlrm
unitofwork.py247350644editdlrm
unitofwork.pyc245650644editdlrm
unitofwork.pyo244890644editdlrm
util.py448590644editdlrm
util.pyc443630644editdlrm
util.pyo442110644editdlrm
__init__.py95420644editdlrm
__init__.pyc107590644editdlrm
__init__.pyo107590644editdlrm
Edit: /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyo (15558B)
ó ÃÌ4]c@sSdZddlZddlmZddlmZddlmZddlmZddlmZej d d ƒZ ej d d ƒZ ej d dƒZ ej ddƒZ ej ddƒZej ddddƒZej ddddƒZej ddddƒZej ddddƒZej dddd ƒZej d!d"dd#ƒZej d$d%dd&ƒZej d'd(dd)ƒZej d*d+dd,ƒZej d-d.deeBeBeBeBƒZej d/d0deeAƒZej d1d2deeAƒZej d3d4deeAƒZej d5d6deeAƒZej d7d8deeAƒZd9Zd:ZdeZ ej d=ƒZ!ej d>ƒZ"ej d?ƒZ#ej d@dAƒZ$ej dBdCƒZ%ej dDdEƒZ&ej dFdGƒZ'e(egƒZ)e(dee gƒZ+ej dHƒZ,ej dIƒZ-dJ„Z.dK„Z/ej0eƒZ1ej0dLƒZ2dM„Z3dN„Z4dO„Z5dP„Z6dQ„Z7dR„Z8dS„Z9ej:e;ƒdT„ƒZ<dU„Z=dV„Z>dW„Z?dX„Z@dY„ZAdZ„ZBd[„ZCejDd\ƒZEej:eFƒeGd]„ƒZHeId^„ZJd_e;fd`„ƒYZKdaeKfdb„ƒYZLdce;fdd„ƒYZMdS(fs=Constants and rudimental functions used throughout the ORM. iÿÿÿÿNi(texci(t inspection(tutil(t expressiontPASSIVE_NO_RESULTs¦Symbol 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_SETs•Symbol 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_VALUEsÂSymbol 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_SETsŽSymbol 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_OKs‹Attributes 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 assertionsi€t 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 ONETOMANYs®Indicates 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 MANYTOONEs®Indicates 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 MANYTOMANYs¯Indicates 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_EXTENSIONs§Symbol indicating an :class:`InspectionAttr` that's not part of sqlalchemy.ext. Is assigned to the :attr:`.InspectionAttr.extension_type` attribute. tSET_DEFERRED_EXPIREDtDEFER_FOR_STATEcstj‡fd†ƒ}|S(s1Mark a method as generative, e.g. method-chained.csI|djƒ}xˆD]}|||jƒqW|||d|Ž|S(Nii(t_clonet__name__(tfntargstkwtselft assertion(t assertions(sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pytgenerate×s  (Rt decorator(R-R.((R-sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt _generativeÔscCs|jjtdƒS(N(t__dict__tgettDEFAULT_MANAGER_ATTRtNone(tcls((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pytmanager_of_classäsR1cCstt|ƒƒ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_stríscCs4|dkrdSd|jjt|jƒƒfSdS(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.pyR7ós 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_strüs 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(s¥Given 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(sµGiven 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|dƒr|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|dƒrPt|jdƒrPg|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|dtƒS(NRS(RRJRKR4tgetattr(RORM((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/base.pyt_is_aliased_classvscCs¯tj|ƒ}|jr*|}|j}nC|jrE|j}|}n(t|dƒrg|jj}}n|}yt ||ƒSWn*t k rªt j d||fƒ‚nXdS(sŽReturn 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|jƒn|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_class™s    cCs`t|d|ƒ}|dkrXt|tƒsFtjd|fƒ‚ntj|ƒ‚n|SdS(sâGiven 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_mapper¨s 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.pyRoÄs  tInspectionAttrInfocBs eZdZejd„ƒZRS(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(sãInfo 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"