%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/
Upload File :
Create Path :
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyo

�
��4]c@sdZddlmZddlZddlmZddlmZddlmZdd	lm	Z	ej
e�Zd
�Z
dZdZd
efd��YZdefd��YZe�e_defd��YZdefd��YZdeefd��YZdS(s@Path tracking utilities, representing mapper graph traversals.

i����(tchainNi(tclass_mapperi(texc(t
inspection(tutilcCs
tj|�S(N(tPathRegistrytdeserialize(tpath((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt_unreduce_pathst*t_sa_defaultRcBs�eZdZeZeZd�Zd�Zd�Zdd�Z
d�Zed��Z
d�Zd�Zd	�Zd
�Zd�Zed��Zed
��Zed��Zd�Zd�Zd�ZRS(s�Represent query load paths and registry functions.

    Basically represents structures like:

    (<User mapper>, "orders", <Order mapper>, "items", <Item mapper>)

    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|||�||||jf<dS(Nsset '%s' on path '%s' to '%s'(tlogtdebugtnatural_path(Rt
attributestkeytvalue((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pytset?scCs3tjd|||�|j||jf|�dS(Ns$setdefault '%s' on path '%s' to '%s'(RRt
setdefaultR(RRRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRCscCs+||jf}||kr#||S|SdS(N(R(RRRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pytgetGscCs
t|j�S(N(tlenR(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__len__NscCs
t|j�S(N(RR(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pytlengthQsccsG|j}x7tdt|�d�D]}||||dfVq"WdS(Niii(RtrangeR(RRti((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pytpairsUs	cCsdx]gtdt|j�d�D]}|j|^qD]"}|jr6|j|�r6tSq6WtSdS(Nii(RRRt	is_mappertisatTruetFalse(RtmapperRtpath_mapper((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pytcontains_mapperZs<cCs||jf|kS(N(R(RRR((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pytcontainsascCst|j�ffS(N(Rt	serialize(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt
__reduce__dscCs�|j}ttggtdt|�d�D]}||^q+D]}|j^q?gtdt|�d�D]}||j^qjdg��S(Niii(RtlisttzipRRtclass_RR(RRRtm((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR&gs
	BcCs�|dkrdSttg|D]=\}}t|�|dk	rQt|�j|ndf^q��}|r�|ddkr�|dd!}n|j|�S(Ni����i(RttupleRRtattrstcoerce(tclsRtmclsRtp((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRpsMcCst|j|�S(N(tEntityRegistrytroot(R/R"((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt
per_mapper�scCstjd�||j�S(NcSs||S(N((tprevtnext((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt<lambda>�t(RtreduceR3(R/traw((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR.�scCsZ|jdt�r t||�S|jdt�rCt|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.pyRA�s

cCstjd�|j|�S(NcSs||S(N((R5R6((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR7�R8(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_rootRRRRRRtpropertyRRR$R%R'R&tclassmethodRR4R.RARBRE(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRs(												tRootRegistrycBs3eZdZdZZeZeZeZ	d�Z
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.pyRL�s
R>cBs/eZd�ZeZeZd�Zd�ZRS(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�|jjj�D]!}t|jj||j�Vq-Wn]|jjr�|jjjr�|Vx:|jjj	D]!}t|jj||j�Vq�Wn|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_superclasses�s""cCs
t��dS(N(tNotImplementedError(RRN((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRO�s(	RDRFRSR!RPR RHRXRO(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyR>�s
		tPropRegistrycBseeZd�Zd�Zejd��Zejd��Zed��Z	ed��Z
d�ZRS(cCstj|d�}|js&|jr9|j|j}n_|jr�|jr�|j|jk	r�|j|jkr�|dj|j�}|j|}q�n||_||_|j	|f|_	|j
|f|_
d|jj	|jjf|_|jj
|_
d|j	f|_dS(Ni����tloader(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.pyRS�s 		cCsdjd�|jD��S(Ns -> css|]}t|�VqdS(N(tstr(t.0telem((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pys	<genexpr>�s(tjoinR(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyt__str__�scCst|jd�S(NR"(thasattrR`(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRP�scCs
|jjS(N(R`R"(R((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRN�scCs|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.pytentity_path�scCs1t|ttf�r |j|St||�SdS(N(t
isinstancetinttsliceRR2(RRN((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRO�s(RDRFRSRkRtmemoized_propertyRPRNRJR"RmRO(((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRZ�s		R2cBsMeZeZeZd�Zed��Zd�Z	e	Z
d�Zd�ZRS(cCs�||_||_|j|_||_|j|f|_|jr�|jr�|jj|jdj�r�|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|j�jS(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|ttf�r |j|Stj||�SdS(N(RnRoRpRtdictRO(RRN((sO/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/path_registry.pyRO(scCst||�||<}|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<module>	s 	~5

Zerion Mini Shell 1.0