ÿØÿà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@sdZddlmZddlZddlmZddlmZddlmZdd lm Z ej e Z d Z d Zd Zd efdYZdefdYZee_defdYZdefdYZdeefdYZdS(s@Path tracking utilities, representing mapper graph traversals. i(tchainNi(t class_mapperi(texc(t inspection(tutilcCs tj|S(N(t PathRegistryt deserialize(tpath((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt_unreduce_pathst*t _sa_defaultRcBseZdZeZeZdZdZdZddZ dZ e dZ dZdZd Zd Zd Zed Zed ZedZdZdZdZRS(sRepresent query load paths and registry functions. Basically represents structures like: (, "orders", , "items", ) These structures are generated by things like query options (joinedload(), subqueryload(), etc.) and are used to compose keys stored in the query._attributes dictionary for various options. They are then re-composed at query compile/result row time as the query is formed and as rows are fetched, where they again serve to compose keys to look up options in the context.attributes dictionary, which is copied from query._attributes. The path structure has a limited amount of caching, where each "root" ultimately pulls from a fixed registry associated with the first mapper, that also contains elements for each of its property keys. However paths longer than two elements, which are the exception rather than the rule, are generated on an as-needed basis. cCs|dk o|j|jkS(N(tNoneR(tselftother((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__eq__<scCs-tjd|||||||jft(RtreduceR3(R/traw((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR.scCsZ|jdtr t||S|jdtrCt|j|Stjd|dS(Nt:sinvalid token: %s(tendswitht_WILDCARD_TOKENt TokenRegistryt_DEFAULT_TOKENR3Rt ArgumentError(R ttoken((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRAs  cCstjd|j|S(NcSs||S(N((R5R6((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR7R8(RR9R(R R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__add__scCsd|jj|jfS(Ns%s(%r)(t __class__t__name__R(R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__repr__sN(RDt __module__t__doc__R!tis_tokentis_rootRRRR RRtpropertyRRR$R%R'R&t classmethodRR4R.RARBRE(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRs(            t RootRegistrycBs3eZdZdZZeZeZeZ dZ RS(sXRoot registry, defers to mappers so that paths are maintained per-root-mapper. cCs|jS(N(t_path_registry(R tentity((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt __getitem__s(( RDRFRGRRR!t has_entitytis_aliased_classR RIRO(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRLs  R>cBs/eZdZeZeZdZdZRS(cCs<||_||_|j|f|_|j|f|_dS(N(RAtparentRR(R RRRA((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__init__s  ccs|jj rU|jj rUx|jjjD]!}t|jj||jVq-Wn]|jjr|jjjr|Vx:|jjj D]!}t|jj||jVqWn|VdS(N( RRRQRIR"titerate_to_rootR>RARNt_is_with_polymorphict_with_polymorphic_entities(R tent((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pytgenerate_for_superclassess" "cCs tdS(N(tNotImplementedError(R RN((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyROs( RDRFRSR!RPR RHRXRO(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR>s   t PropRegistrycBseeZdZdZejdZejdZedZ edZ dZ RS(cCstj|d}|j s&|jr9|j|j}n_|jr|jr|j|jk r|j|jkr|dj|j}|j|}qn||_||_|j |f|_ |j |f|_ d|jj |jj f|_ |jj |_ d|j f|_dS(Nitloader(RtinspectRQt_use_mapper_pathRRtwith_polymorphic_mappersR"t_entity_for_mappertpropRRt_wildcard_tokent_wildcard_path_loader_keyt_default_path_loader_keyt _loader_key(R RRR`tinsptsubclass_entity((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRSs   cCsdjd|jDS(Ns -> css|]}t|VqdS(N(tstr(t.0telem((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pys s(tjoinR(R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__str__scCst|jdS(NR"(thasattrR`(R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRPscCs |jjS(N(R`R"(R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRNscCs|jS(N(RN(R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR"scCs ||jS(N(RN(R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt entity_pathscCs1t|ttfr |j|St||SdS(N(t isinstancetinttsliceRR2(R RN((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyROs ( RDRFRSRkRtmemoized_propertyRPRNRJR"RmRO(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRZs  R2cBsMeZeZeZdZedZdZ e Z dZ dZ RS(cCs||_||_|j|_||_|j|f|_|jr|jr|jj|jdjr|j|jf|_q|j|jdjf|_n |j|_||_dS(Ni( RRRRQRNRR"RRRm(R RRRN((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRSs      cCstj|jjS(N(RR\RNR"(R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR"scCstS(N(R (R ((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__bool__#scCs4t|ttfr |j|Stj||SdS(N(RnRoRpRtdictRO(R RN((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRO(s cCst||||<}|S(N(RZ(R Rtitem((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt __missing__.s( RDRFR!RQR RPRSRJR"Rrt __nonzero__RORu(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR2s   (RGt itertoolsRtloggingtbaseRR8RRRt getLoggerRDRRR=R?tobjectRRLR3R>RZRsR2(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt s   ~ 5