mò &ÜGc@sÃdklZlZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZd efd „ƒYZei eƒe_ d efd „ƒYZ d efd„ƒYZ dS((sutilsloggingtMapperPropertycBswtZdZd„Zd„Zed„Zed„Zd„Zd„Z d„Z d„Z d „Z d „Z d „ZRS( sþmanages the relationship of a Mapper to a single class attribute, as well as that attribute as it appears on individual instances of the class, including attribute instrumentation, attribute access, loading behavior, and dependency calculations.cKsdS(s/called when a statement is being constructed. N((tselft querycontexttkwargs((t=/home/holguin2/public_html/spyce/sqlalchemy/orm/interfaces.pytsetupscCs tƒ‚dS(sjcalled when the mapper receives a row. instance is the parent instance corresponding to the row. N(tNotImplementedError(Rt selectcontexttinstancetrowt identitykeytisnew((RtexecutescCsgS(N((Rttypetobjectt recursive((Rtcascade_iteratorscCsgS(N((RR Rt callable_R((Rtcascade_callablescCsdS(s¢Returns a WHERE clause suitable for this MapperProperty corresponding to the given key/value pair, where the key is a column or object property name, and value is a value to be matched. This is only picked up by PropertyLoaders. this is called by a Query's join_by method to formulate a set of key/value pairs into a WHERE criterion that spans multiple tables if needed.N(tNone(Rtquerytkeytvalue((Rt get_criterionscCs ||_dS(N(tparentR(RR((Rt set_parent!scCs||_|iƒdS(scalled after all mappers are compiled to assemble relationships between mappers, establish instrumented class attributesN(RRtdo_init(RRR((Rtinit#s cCs |i||dtdtƒdS(s{adapt this MapperProperty to a new parent, assuming the new parent is an inheriting descendant of the old parent. Rt setparentN(t newparentt_compile_propertyRRtFalse(RRR((Rtadapt_to_inherited(scCsdS(stemplate method for subclassesN((R((RR,scOsdS(sýcalled by the Mapper in response to the UnitOfWork calling the Mapper's register_dependencies operation. Should register with the UnitOfWork all inter-mapper dependencies as well as dependency processors (see UOW docs for more details)N((RtargsR((Rtregister_dependencies/scCs |iiƒS(sreturn True if this MapperProperty's mapper is the primary mapper for its class. This flag is used to indicate that the MapperProperty can define attribute instrumentation for the class at the class level (as opposed to the individual instance level.)N(RRt_is_primary_mapper(R((Rt is_primary4s(t__name__t __module__t__doc__RR RRRRRRR RR"R$(((RR s           tStrategizedPropertycBs;tZdZd„Zd„Zd„Zd„Zd„ZRS(sía MapperProperty which uses selectable strategies to affect loading behavior. There is a single default strategy selected, and alternate strategies can be selected at selection time through the usage of StrategizedOption objects.cCs(|i|iit|f|iiƒƒS(N(Rt _get_strategytcontextt attributestgettLoaderStrategytstrategyt __class__(RR*((Rt_get_context_strategy?scCsYy|i|SWnCtj o7||ƒ}|iƒt|_||i|<|SnXdS(N(Rt_all_strategiestclstKeyErrorR.RRt is_default(RR2R.((RR)As    cKs|i|ƒi||dS(N(RR0Rt setup_queryR(RRR((RRJscCs&|i|ƒi|||||ƒdS(N(RR0Rt process_rowRR R R (RRRR R R ((RR LscCs]h|_|iƒ|_|i|i|ii<|iiƒ|iƒo|iiƒndS(N(RR1tcreate_strategyR.R/RR$tinit_class_attribute(R((RRNs    (R%R&R'R0R)RR R(((RR(;s    tOperationContextcBs tZdZd„Zd„ZRS(sserves as a context during a query construction or instance loading operation. accepts MapperOption objects which may modify its state before proceeding.cCsL||_||_h|_tiƒ|_x|D]}|i|ƒq1WdS(N( tmapperRtoptionsR+tutiltSettrecursion_stacktoptt accept_option(RR:R;R?((Rt__init__Ys   cCsdS(N((RR?((RR@`s(R%R&R'RAR@(((RR9Vs  t MapperOptioncBs)tZdZd„Zd„Zd„ZRS(s0describes a modification to an OperationContext.cCsdS(N((RR*((Rtprocess_query_contextescCsdS(N((RR*((Rtprocess_selection_contextgscCsdS(N((RR((Rt process_queryis(R%R&R'RCRDRE(((RRBcs   tPropertyOptioncBsDtZdZd„Zd„Zd„Zd„Zd„Zd„ZRS(sa MapperOption that is applied to a property off the mapper or one of its child mappers, identified by a dot-separated key.cCs ||_dS(N(RR(RR((RRAoscCsdS(N((RR*tproperty((Rtprocess_query_propertyqscCsdS(N((RR*RG((Rtprocess_selection_propertysscCs|i||i|ƒƒdS(N(RRHR*t _get_property(RR*((RRCuscCs|i||i|ƒƒdS(N(RRIR*RJ(RR*((RRDwscCsuy |i}Wnatj oU|i}x9|iidƒD]%}|i |}t |ddƒ}q:W||_nX|S(Nt.R:( Rt_PropertyOption__proptproptAttributeErrorR*R:RtsplitttokentpropstgetattrR(RR*R:RMRP((RRJys   ( R%R&R'RARHRIRCRDRJ(((RRFls      tStrategizedOptioncBs)tZdZd„Zd„Zd„ZRS(sla MapperOption that affects which LoaderStrategy will be used for an operation by a StrategizedProperty.cCs4|iid|iƒ|iƒ|it|f