Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
‹EYc@s4dZddlmZddlmZmZmZmZmZ	m
Z
ddlmZm
Z
mZmZmZmZddlmZddlmZmZmZmZmZdd	lmZmZmZmZmZmZdd
l m!Z!ddlmZ"m#Z#m$Z$ddl%m&Z&dd
lm'Z'dddgZ(ej)Z*ej+ej,de-fd„ƒYƒƒZ.ddl/m0Z0de0fd„ƒYZ1de-fd„ƒYZ2de2fd„ƒYZ3ej+defd„ƒYƒZ4de2fd„ƒYZ5de2fd„ƒYZ6de-fd„ƒYZ7d ej8fd!„ƒYZ9d"S(#sñThe Query class and support.

Defines the :class:`.Query` class, the central
construct used by the ORM to construct database queries.

The :class:`.Query` class should not be confused with the
:class:`.Select` class, which defines database
SELECT operations at the SQL (non-ORM) level.  ``Query`` differs from
``Select`` in that it returns ORM-mapped objects and interacts with an
ORM session, whereas the ``Select`` construct interacts directly with the
database to return iterable result sets.

iÿÿÿÿ(tchaini(t
attributest
interfacest
object_mappertpersistencetexctloading(t_entity_descriptort_is_aliased_classt_is_mapped_classt_orm_columnst_generativetInspectionAttr(tPathRegistry(tAliasedClasst
ORMAdaptertjointwith_parenttaliasedi(tsqltutiltlogRtinspectt
inspection(t_interpret_as_from(Rt
expressiontvisitors(tColumnCollection(t
propertiestQuerytQueryContextRcBseZdZeZeZeZeZ	eZ
eZeZeZ
eZeZeZeZeZeZeZeƒZeZeZeZeZeZeZfZfZeZiZ eZ!eZ"e#j$ƒZ%Z&e#j$ƒZ'e#j$ƒZ(e#j$ƒZ)fZ*fZ+eZ,eZ-eZ.e/Z0ed„Z1ed„Z2d„Z3d„Z4d„Z5d„Z6d„Z7d„Z8e9ƒd	„ƒZ:d
„Z;d„Z<d„Z=e>d
„ƒZ?d„Z@d„ZAed„ZBd„ZCed„ZDd„ZEd„ZFd„ZGeed„ZHeed„ZId„ZJd„ZKd„ZLeeeed„ZMd„ZNe>d„ƒZOeeed„ZPeed„ZQd „ZRd!„ZSe>d"„ƒZTd#„ZUe9ƒd$„ƒZVd%„ZWe9ƒd&„ƒZXe9ƒd'„ƒZYe>d(„ƒZZe9ƒd)„ƒZ[e9eJƒeed*„ƒZ\e9ƒd+„ƒZ]d,„Z^d-„Z_e9ƒd.„ƒZ`e9ƒd/„ƒZae9ƒd0„ƒZbe9ƒd1„ƒZced2„Zde9ƒed3„ƒZee9ƒd4„ƒZfd5„Zge9ƒd6„ƒZhe9ƒd7„ƒZid8„ZjejZkd9„Zle9ƒd:„ƒZme9ƒd;„ƒZne#jod<d=eƒd>„ƒZpd?„Zqd@„Zre9ƒdA„ƒZsdB„Zte9ƒdCdD„ƒZudCdE„Zve9ƒdF„ƒZwe9ƒdG„ƒZxe9ƒeeedH„ƒZye9ƒdI„ƒZze9eKeLƒdJ„ƒZ{dK„Z|e9eKeLƒdL„ƒZ}e9eKeLƒdM„ƒZ~e9eKeLƒdN„ƒZdO„Z€dP„ZdQ„Z‚dR„ZƒdS„Z„dT„Z…dU„Z†dV„Z‡dW„Zˆe9eKeLƒdX„ƒZ‰dY„ZŠdZ„Z‹d[„ZŒd\„Ze9eKƒd]„ƒZŽe9eJƒd^„ƒZe9eJƒd_„ƒZd`„Z‘e9eKƒda„ƒZ’e9eKƒdb„ƒZ“e9eKƒdc„ƒZ”e9eKƒdd„ƒZ•e9ƒde„ƒZ–e9ƒdf„ƒZ—dg„Z˜e9eJƒdh„ƒZ™di„Zšdj„Z›dk„Zœdl„Zdm„Zždn„ZŸdo„Z e>dp„ƒZ¡edq„Z¢edr„Z£e>ds„ƒZ¤e>dt„ƒZ¥du„Z¦dv„Z§dwdx„Z¨dwedy„Z©edz„Zªd{„Z«d|„Z¬d}„Z­d~„Z®RS(s¢ORM-level SQL construction object.

    :class:`.Query` is the source of all SELECT statements generated by the
    ORM, both those formulated by end-user query operations as well as by
    high level internal operations such as related collection loading.  It
    features a generative interface whereby successive calls return a new
    :class:`.Query` object, a copy of the former with additional
    criteria and options associated with it.

    :class:`.Query` objects are normally initially generated using the
    :meth:`~.Session.query` method of :class:`.Session`.  For a full
    walkthrough of :class:`.Query` usage, see the
    :ref:`ormtutorial_toplevel`.

    cCs#||_i|_|j|ƒdS(N(tsessiont_polymorphic_adapterst
_set_entities(tselftentitiesR((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt__init__ks		cCsb|dkrt}ng|_d|_x$tj|ƒD]}|||ƒq7W|j|jƒdS(N(tNonet_QueryEntityt	_entitiest_primary_entityRtto_listt_set_entity_selectables(R"R#tentity_wrappertent((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR!ps			cCsõ|jjƒ|_}xØ|D]Ð}xÇ|jD]¼}||krØt|ƒ}|jrª|jjrª|jj|jkr¡|j	|jt
j|j|jj
ƒƒnd}n|jr¿|j}nd}||f||<n|j||Œq-WqWdS(N(t_mapper_adapter_maptcopyR#Rtis_aliased_classtmappertwith_polymorphictmapped_tableR t"_mapper_loads_polymorphically_withtsql_utilt
ColumnAdaptert
selectablet_equivalent_columnsR%t_adaptertsetup_entity(R"R#tdR,tentitytext_infotaliased_adapter((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR*zs*

			cCsUxN|jp|gD]:}||j|<x$|jƒD]}||j|j<q3WqWdS(N(t_with_polymorphic_mappersR titerate_to_roottlocal_table(R"R0tadaptertm2tm((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR3˜s
cCsAg}d}xÇ|D]¿}t|ƒ}t|dƒrz|jsF|jrz||_|rgtjdƒ‚n|j|j	ƒq|j
s•tjdƒ‚qt|tj
ƒr¶|jƒ}n|rÅ|}n|j|ƒqWt|ƒ|_|r=t|jƒdkr=t|tjƒr=|jƒ}tj|jd|ƒ|_ndS(NR0sPA selectable (FromClause) instance is expected when the base alias is being set.sJargument is not a mapped class, mapper, aliased(), or FromClause instance.ii(R%Rthasattrt	is_mapperR/t_select_from_entitytsa_exct
ArgumentErrortappendR6t
is_selectablet
isinstanceRt
SelectBasetaliasttuplet	_from_objtlentAliast_Query__all_equivsR4R5t_from_obj_alias(R"tobjtset_base_aliastfatselect_from_aliastfrom_objtinfotequivs((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_set_select_fromžs4
			cCsXxQ|jD]F}|jj|dƒx*|jƒD]}|jj|jdƒq0Wq
WdS(N(R>R tpopR%R?R@(R"R0RBRC((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_reset_polymorphic_adapterÀscCs­d|jkrG|jd}|jj|dƒ}|rG|j|ƒSnt|tjƒrb|}nt|dƒr}|j	}ndS|jj|dƒ}|r©|j|ƒSdS(Ntparententityttable(
t_annotationsR tgetR%tadapt_clauseRKRt
FromClauseRDR_(R"telementtsearchRM((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_adapt_polymorphic_elementÆs
	cCs/g|D]$}|jtj|ƒttƒ^qS(N(t
_adapt_clauseRt_literal_as_label_referencetTrue(R"tcolsto((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_adapt_col_listØscCs
t|_dS(N(tFalset_orm_only_adapt(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_adapt_all_clausesàscsÙg‰|jst}n|rW|jrWx-|jjD]}ˆj||jfƒq4Wn|jr‹ˆj|jru|nt|jjfƒn|jr­ˆj||j	fƒnˆs·|S‡fd†}t
j|i|ƒS(s\Adapt incoming clauses to transformations which
        have been applied within this query.cs_xXˆD]P\}}|s8d|jks8d|jkr||ƒ}|dk	rW|SqqWdS(Nt
_orm_adaptR^(R`R%(telemt	_orm_onlyRAte(tadapters(sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytreplaces(RnRmt_filter_aliasest_visitor_iteratorRIRuRSt_orm_only_from_obj_aliasR RfRtreplacement_traverse(R"tclauset	as_filtertorm_onlyRVRu((RtsI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRgäs*				cCs|jdS(Ni(R'(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_entity_zeroscCs#|jdk	r|jS|jƒjS(N(RFR%R}tentity_zero(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_mapper_zero!sccs/x(|jD]}t|tƒr
|Vq
q
WdS(N(R'RKt
_MapperEntity(R"R,((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_mapper_entities(scCs|jjd|jƒƒS(Nt_joinpoint_entity(t
_joinpointRaR(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_joinpoint_zero.s	cCs;|jƒ}|dk	r7t|ƒ}|js7|jSndS(N(RR%Rtis_clause_elementR0(R"tezerotinsp((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_bind_mapper4s	
cCs7t|jƒdkr-tj|p$dƒ‚n|jƒS(Nis8This operation requires a Query against a single mapper.(RPR'RGtInvalidRequestErrorR(R"t	rationale((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_only_mapper_zero=s
cCs5|j|jgkr+tjd|ƒ‚n|jjS(Ns4%s() can only be used against a single mapped class.(R'R(RGR‰R~(R"tmethname((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_only_full_mapper_zeroFs

cCs7t|jƒdkr-tj|p$dƒ‚n|jƒS(Nis8This operation requires a Query against a single mapper.(RPR'RGR‰R}(R"RŠ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_only_entity_zeroMs
cCs1i}x$|jD]}|j|jjƒqW|S(N(RtupdateR0R7(R"RZR,((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt__all_equivsVscCs|jddtdtƒS(NRatorder_bytdistinct(t_no_criterion_conditionRm(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_get_condition\scCs|jddtdtƒdS(NRaR‘R’(t_no_criterion_assertionRm(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_get_existing_condition`scCs“|js
dS|jdk	sy|jdk	sy|jsy|jdk	sy|jdk	sy|jsy|rj|jsy|r|j	rt
jd|ƒ‚ndS(Ns<Query.%s() being called on a Query with existing criterion. (t_enable_assertionst
_criterionR%t
_statementROt_limitt_offsett	_group_byt	_order_byt	_distinctRGR‰(R"tmethR‘R’((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR•cs	cCsG|j|||ƒd|_d|_|_t|_|_|_dS(N((	R•ROR%R™R˜RmRRœRž(R"RŸR‘R’((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR“os	cCs=|js
dS|jr,tjd|ƒ‚n|j|ƒdS(Ns<Query.%s() being called on a Query with existing criterion. (R—RRGR‰R“(R"RŸ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_no_clauseelement_conditionvs		
cCs6|js
dS|jdk	r2tjd|ƒ‚ndS(Ns[Query.%s() being called on a Query with an existing full statement - can't apply criterion.(R—R™R%RGR‰(R"RŸ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_no_statement_conditions	cCsK|js
dS|jdk	s+|jdk	rGtjd||fƒ‚ndS(NsÒQuery.%s() being called on a Query which already has LIMIT or OFFSET applied. To modify the row-limited results of a  Query, call from_self() first.  Otherwise, call %s() before limit() or offset() are applied.(R—RšR%R›RGR‰(R"RŸ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_no_limit_offset‡s	cCsR|r||_n|r$||_n|r6||_n|rNt|ƒ|_n|S(N(t_populate_existingt_version_checkt_refresh_statetsett_only_load_props(R"tpopulate_existingt
version_checktonly_load_propst
refresh_state((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_get_options”scCs.|j}|j|ƒ}|jjƒ|_|S(N(t	__class__t__new__t__dict__R.(R"tclstq((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_clone¢s	cCsJ|jd|jƒj}|jr6|j|jƒ}n|jitd6ƒS(s×The full SELECT statement represented by this Query.

        The statement by default will not have disambiguating labels
        applied to the construct unless with_labels(True) is called
        first.

        tlabelstno_replacement_traverse(t_compile_contextt_with_labelst	statementt_paramstparamst	_annotateRi(R"tstmt((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR·¨s
	cCsR|jtƒ}|r$|jƒ}n|j}|rB|jƒ}n|jd|ƒS(sÄreturn the full SELECT statement represented by
        this :class:`.Query`, embedded within an :class:`.Alias`.

        Eager JOIN generation within the query is disabled.

        :param name: string name to be assigned as the alias;
            this is passed through to :meth:`.FromClause.alias`.
            If ``None``, a name will be deterministically generated
            at compile time.

        :param with_labels: if True, :meth:`.with_labels` will be called
         on the :class:`.Query` first to apply table-qualified labels
         to all columns.

        :param reduce_columns: if True, :meth:`.Select.reduce_columns` will
         be called on the resulting :func:`.select` construct,
         to remove same-named columns where one also refers to the other
         via foreign key or WHERE clause equivalence.

         .. versionchanged:: 0.8 the ``with_labels`` and ``reduce_columns``
            keyword arguments were added.

        tname(tenable_eagerloadsRmtwith_labelsR·treduce_columnsRM(R"R¼R¾R¿R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytsubquery»s	cCs"|jtƒjjd|d|ƒS(sOReturn the full SELECT statement represented by this
        :class:`.Query` represented as a common table expression (CTE).

        .. versionadded:: 0.7.6

        Parameters and usage are the same as those of the
        :meth:`.SelectBase.cte` method; see that method for
        further details.

        Here is the `Postgresql WITH
        RECURSIVE example
        <http://www.postgresql.org/docs/8.4/static/queries-with.html>`_.
        Note that, in this example, the ``included_parts`` cte and the
        ``incl_alias`` alias of it are Core selectables, which
        means the columns are accessed via the ``.c.`` attribute.  The
        ``parts_alias`` object is an :func:`.orm.aliased` instance of the
        ``Part`` entity, so column-mapped attributes are available
        directly::

            from sqlalchemy.orm import aliased

            class Part(Base):
                __tablename__ = 'part'
                part = Column(String, primary_key=True)
                sub_part = Column(String, primary_key=True)
                quantity = Column(Integer)

            included_parts = session.query(
                            Part.sub_part,
                            Part.part,
                            Part.quantity).\
                                filter(Part.part=="our part").\
                                cte(name="included_parts", recursive=True)

            incl_alias = aliased(included_parts, name="pr")
            parts_alias = aliased(Part, name="p")
            included_parts = included_parts.union_all(
                session.query(
                    parts_alias.sub_part,
                    parts_alias.part,
                    parts_alias.quantity).\
                        filter(parts_alias.part==incl_alias.c.sub_part)
                )

            q = session.query(
                    included_parts.c.sub_part,
                    func.sum(included_parts.c.quantity).
                        label('total_quantity')
                ).\
                group_by(included_parts.c.sub_part)

        .. seealso::

            :meth:`.SelectBase.cte`

        R¼t	recursive(R½RmR·tcte(R"R¼RÁ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÂÛs9cCs|jtƒjj|ƒS(s	Return the full SELECT statement represented by this
        :class:`.Query`, converted
        to a scalar subquery with a label of the given name.

        Analogous to :meth:`sqlalchemy.sql.expression.SelectBase.label`.

        .. versionadded:: 0.6.5

        (R½RmR·tlabel(R"R¼((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÃscCs|jtƒjjƒS(sæReturn the full SELECT statement represented by this
        :class:`.Query`, converted to a scalar subquery.

        Analogous to :meth:`sqlalchemy.sql.expression.SelectBase.as_scalar`.

        .. versionadded:: 0.6.5

        (R½RmR·t	as_scalar(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÄ$s
cCs
|jƒS(sÛReturn the :class:`.Select` object emitted by this :class:`.Query`.

        Used for :func:`.inspect` compatibility, this is equivalent to::

            query.enable_eagerloads(False).with_labels().statement

        (t__clause_element__(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR60s	cCs|jtƒjƒjS(N(R½RmR¾R·(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÅ;scCs
||_dS(sControl whether or not eager joins and subqueries are
        rendered.

        When set to False, the returned Query will not render
        eager joins regardless of :func:`~sqlalchemy.orm.joinedload`,
        :func:`~sqlalchemy.orm.subqueryload` options
        or mapper-level ``lazy='joined'``/``lazy='subquery'``
        configurations.

        This is used primarily when nesting the Query's
        statement into a subquery or other
        selectable, or when using :meth:`.Query.yield_per`.

        N(t_enable_eagerloads(R"tvalue((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR½>scCstjd|ƒ‚dS(Ns¹The yield_per Query option is currently not compatible with %s eager loading.  Please specify lazyload('*') or query.enable_eagerloads(False) in order to proceed with query.yield_per().(RGR‰(R"tmessage((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt
_no_yield_perPscCs
t|_dS(sºApply column labels to the return value of Query.statement.

        Indicates that this Query's `statement` accessor should return
        a SELECT statement that applies labels to all columns in the
        form <tablename>_<columnname>; this is commonly used to
        disambiguate columns from multiple tables which have the same
        name.

        When the `Query` actually issues SQL to load rows, it always
        uses column labeling.

        .. note:: The :meth:`.Query.with_labels` method *only* applies
           the output of :attr:`.Query.statement`, and *not* to any of
           the result-row invoking systems of :class:`.Query` itself, e.g.
           :meth:`.Query.first`, :meth:`.Query.all`, etc.   To execute
           a query using :meth:`.Query.with_labels`, invoke the
           :attr:`.Query.statement` using :meth:`.Session.execute`::

                result = session.execute(query.with_labels().statement)


        N(RiR¶(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR¾XscCs
||_dS(sControl whether assertions are generated.

        When set to False, the returned Query will
        not assert its state before certain operations,
        including that LIMIT/OFFSET has not been applied
        when filter() is called, no criterion exists
        when get() is called, and no "from_statement()"
        exists when filter()/order_by()/group_by() etc.
        is called.  This more permissive mode is used by
        custom Query subclasses to specify criterion or
        other modifiers outside of the usual usage patterns.

        Care should be taken to ensure that the usage
        pattern is even possible.  A statement applied
        by from_statement() will override any criterion
        set by filter() or order_by(), for example.

        N(R—(R"RÇ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytenable_assertionsrscCs|jS(sÖA readonly attribute which returns the current WHERE criterion for
        this Query.

        This returned value is a SQL expression construct, or ``None`` if no
        criterion has been established.

        (R˜(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytwhereclauseˆs	cCs
||_dS(sindicate that this query applies to objects loaded
        within a certain path.

        Used by deferred loaders (see strategies.py) which transfer
        query options from an originating query to a newly generated
        query intended for the deferred load.

        N(t
_current_path(R"tpath((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_with_current_path“s
cCse|jstjdƒ‚n|jdjƒ}|g|jd|_|j||d|d|ƒdS(spLoad columns for inheriting classes.

        :meth:`.Query.with_polymorphic` applies transformations
        to the "main" mapped class represented by this :class:`.Query`.
        The "main" mapped class here means the :class:`.Query`
        object's first argument is a full class, i.e.
        ``session.query(SomeClass)``. These transformations allow additional
        tables to be present in the FROM clause so that columns for a
        joined-inheritance subclass are available in the query, both for the
        purposes of load-time efficiency as well as the ability to use
        these columns at query time.

        See the documentation section :ref:`with_polymorphic` for
        details on how this method is used.

        .. versionchanged:: 0.8
            A new and more flexible function
            :func:`.orm.with_polymorphic` supersedes
            :meth:`.Query.with_polymorphic`, as it can apply the equivalent
            functionality to any set of columns or classes in the
            :class:`.Query`, not just the "zero mapper".  See that
            function for a description of arguments.

        s(No primary mapper set up for this Query.iiR6tpolymorphic_onN(R(RGR‰R'R²tset_with_polymorphic(R"tcls_or_mappersR6RÏR;((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR1Ÿs		cCs0||_|jjitd6|d6ƒ|_dS(sc
Yield only ``count`` rows at a time.

        The purpose of this method is when fetching very large result sets
        (> 10K rows), to batch results in sub-collections and yield them
        out partially, so that the Python interpreter doesn't need to declare
        very large areas of memory which is both time consuming and leads
        to excessive memory use.   The performance from fetching hundreds of
        thousands of rows can often double when a suitable yield-per setting
        (e.g. approximately 1000) is used, even with DBAPIs that buffer
        rows (which are most).

        The :meth:`.Query.yield_per` method **is not compatible with most
        eager loading schemes, including subqueryload and joinedload with
        collections**.  For this reason, it may be helpful to disable
        eager loads, either unconditionally with
        :meth:`.Query.enable_eagerloads`::

            q = sess.query(Object).yield_per(100).enable_eagerloads(False)

        Or more selectively using :func:`.lazyload`; such as with
        an asterisk to specify the default loader scheme::

            q = sess.query(Object).yield_per(100).\
                options(lazyload('*'), joinedload(Object.some_related))

        .. warning::

            Use this method with caution; if the same instance is
            present in more than one batch of rows, end-user changes
            to attributes will be overwritten.

            In particular, it's usually impossible to use this setting
            with eagerly loaded collections (i.e. any lazy='joined' or
            'subquery') since those collections will be cleared for a
            new load when encountered in a subsequent result batch.
            In the case of 'subquery' loading, the full result for all
            rows is fetched which generally defeats the purpose of
            :meth:`~sqlalchemy.orm.query.Query.yield_per`.

            Also note that while
            :meth:`~sqlalchemy.orm.query.Query.yield_per` will set the
            ``stream_results`` execution option to True, currently
            this is only understood by
            :mod:`~sqlalchemy.dialects.postgresql.psycopg2` dialect
            which will stream results using server side cursors
            instead of pre-buffer all rows for this query. Other
            DBAPIs **pre-buffer all rows** before making them
            available.  The memory use of raw database rows is much less
            than that of an ORM-mapped object, but should still be taken into
            consideration when benchmarking.

        .. seealso::

            :meth:`.Query.enable_eagerloads`

        tstream_resultstmax_row_bufferN(t
_yield_pert_execution_optionstunionRi(R"tcount((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt	yield_perÇs:		
cCs|j|tjƒS(s©	Return an instance based on the given primary key identifier,
        or ``None`` if not found.

        E.g.::

            my_user = session.query(User).get(5)

            some_object = session.query(VersionedFoo).get((5, 10))

        :meth:`~.Query.get` is special in that it provides direct
        access to the identity map of the owning :class:`.Session`.
        If the given primary key identifier is present
        in the local identity map, the object is returned
        directly from this collection and no SQL is emitted,
        unless the object has been marked fully expired.
        If not present,
        a SELECT is performed in order to locate the object.

        :meth:`~.Query.get` also will perform a check if
        the object is present in the identity map and
        marked as expired - a SELECT
        is emitted to refresh the object as well as to
        ensure that the row is still present.
        If not, :class:`~sqlalchemy.orm.exc.ObjectDeletedError` is raised.

        :meth:`~.Query.get` is only used to return a single
        mapped instance, not multiple instances or
        individual column constructs, and strictly
        on a single primary key value.  The originating
        :class:`.Query` must be constructed in this way,
        i.e. against a single mapped entity,
        with no additional filtering criterion.  Loading
        options via :meth:`~.Query.options` may be applied
        however, and will be used if the object is not
        yet locally present.

        A lazy-loading, many-to-one attribute configured
        by :func:`.relationship`, using a simple
        foreign-key-to-primary-key criterion, will also use an
        operation equivalent to :meth:`~.Query.get` in order to retrieve
        the target value from the local identity map
        before querying the database.  See :doc:`/orm/loading_relationships`
        for further details on relationship loading.

        :param ident: A scalar or tuple value representing
         the primary key.   For a composite primary key,
         the order of identifiers corresponds in most cases
         to that of the mapped :class:`.Table` object's
         primary key columns.  For a :func:`.mapper` that
         was given the ``primary key`` argument during
         construction, the order of identifiers corresponds
         to the elements present in this collection.

        :return: The object instance, or ``None``.

        (t	_get_implRt
load_on_ident(R"tident((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRas9cCst|dƒr|jƒ}ntj|ƒ}|jdƒ}t|ƒt|jƒkrƒtjddj	d„|jDƒƒƒ‚n|j
|ƒ}|jr|jr|j
dkrtj|j|tjƒ}|dk	r|jƒt|j|jƒsÿdS|Sn|||ƒS(Nt__composite_values__RasmIncorrect number of values in identifier to formulate primary key for query.get(); primary key columns are %st,css|]}d|VqdS(s'%s'N((t.0tc((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pys	<genexpr>Ns(RDRÜRR)RRPtprimary_keyRGR‰Rtidentity_key_from_primary_keyR£talways_refresht_for_update_argR%Rtget_from_identityRRtPASSIVE_OFFR–t
issubclassR­tclass_(R"RÛtfallback_fnR0tkeytinstance((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÙAs(#


cGs#|jjd„|Dƒƒ|_dS(s#Return a :class:`.Query` construct which will correlate the given
        FROM clauses to that of an enclosing :class:`.Query` or
        :func:`~.expression.select`.

        The method here accepts mapped classes, :func:`.aliased` constructs,
        and :func:`.mapper` constructs as arguments, which are resolved into
        expression constructs, in addition to appropriate expression
        constructs.

        The correlation arguments are ultimately passed to
        :meth:`.Select.correlate` after coercion to expression constructs.

        The correlation arguments take effect in such cases
        as when :meth:`.Query.from_self` is used, or when
        a subquery as returned by :meth:`.Query.subquery` is
        embedded in another :func:`~.expression.select` construct.

         css-|]#}|dk	r!t|ƒndVqdS(N(R%R(RÞts((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pys	<genexpr>xsN(t
_correlateRÖ(R"targs((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt	correlatebs	cCs
||_dS(s%Return a Query with a specific 'autoflush' setting.

        Note that a Session with autoflush=False will
        not autoflush, even if this flag is set to True at the
        Query level.  Therefore this flag is usually used only
        to disable autoflush for a specific Query.

        N(t
_autoflush(R"tsetting((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt	autoflush|s
cCs
t|_dS(sæReturn a :class:`.Query` that will expire and refresh all instances
        as they are loaded, or reused from the current :class:`.Session`.

        :meth:`.populate_existing` does not improve behavior when
        the ORM is used normally - the :class:`.Session` object's usual
        behavior of maintaining a transaction and expiring all attributes
        after rollback or commit handles object state automatically.
        This method is not intended for general use.

        N(RiR£(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR¨ˆscCs
||_dS(säSet the 'invoke all eagers' flag which causes joined- and
        subquery loaders to traverse into already-loaded related objects
        and collections.

        Default is that of :attr:`.Query._invoke_all_eagers`.

        N(t_invoke_all_eagers(R"RÇ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_with_invoke_all_eagers–s	cCs°|dkršt|jƒƒj}t|ƒ}xj|jD]1}t|tjƒr7|j|kr7|}Pq7q7Wt	j
d|jƒjj|j
jfƒ‚n|jt||ƒƒS(sCAdd filtering criterion that relates the given instance
        to a child object or collection, using its attribute state
        as well as an established :func:`.relationship()`
        configuration.

        The method uses the :func:`.with_parent` function to generate
        the clause, the result of which is passed to :meth:`.Query.filter`.

        Parameters are the same as :func:`.with_parent`, with the exception
        that the given property can be None, in which case a search is
        performed against this :class:`.Query` object's target mapper.

        s\Could not locate a property which relates instances of class '%s' to instances of class '%s'N(R%RRR0Rtiterate_propertiesRKRtRelationshipPropertyRGR‰Rçt__name__R­tfilterR(R"Rêtpropertytmapper_zeroR0tprop((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR¡scCsS|dk	rt||ƒ}nt|jƒ|_t||ƒ}|j|gƒdS(sIadd a mapped entity to the list of result columns
        to be returned.N(R%RtlistR'R€R*(R"R;RMRC((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt
add_entityÅs
cCs
||_dS(sMReturn a :class:`.Query` that will use the given :class:`.Session`.

        N(R(R"R((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytwith_sessionÑscGsb|jƒjtƒjjdƒ}|j|ƒ}t|_|jƒ|_	|r^|j
|ƒn|S(sûreturn a Query that selects from this Query's
        SELECT statement.

        :meth:`.Query.from_self` essentially turns the SELECT statement
        into a SELECT of itself.  Given a query such as::

            q = session.query(User).filter(User.name.like('e%'))

        Given the :meth:`.Query.from_self` version::

            q = session.query(User).filter(User.name.like('e%')).from_self()

        This query renders as:

        .. sourcecode:: sql

            SELECT anon_1.user_id AS anon_1_user_id,
                   anon_1.user_name AS anon_1_user_name
            FROM (SELECT "user".id AS user_id, "user".name AS user_name
            FROM "user"
            WHERE "user".name LIKE :name_1) AS anon_1

        There are lots of cases where :meth:`.Query.from_self` may be useful.
        A simple one is where above, we may want to apply a row LIMIT to
        the set of user objects we query against, and then apply additional
        joins against that row-limited set::

            q = session.query(User).filter(User.name.like('e%')).\
                limit(5).from_self().\
                join(User.addresses).filter(Address.email.like('q%'))

        The above query joins to the ``Address`` entity but only against the
        first five results of the ``User`` query:

        .. sourcecode:: sql

            SELECT anon_1.user_id AS anon_1_user_id,
                   anon_1.user_name AS anon_1_user_name
            FROM (SELECT "user".id AS user_id, "user".name AS user_name
            FROM "user"
            WHERE "user".name LIKE :name_1
             LIMIT :param_1) AS anon_1
            JOIN address ON anon_1.user_id = address.user_id
            WHERE address.email LIKE :email_1

        **Automatic Aliasing**

        Another key behavior of :meth:`.Query.from_self` is that it applies
        **automatic aliasing** to the entities inside the subquery, when
        they are referenced on the outside.  Above, if we continue to
        refer to the ``User`` entity without any additional aliasing applied
        to it, those references wil be in terms of the subquery::

            q = session.query(User).filter(User.name.like('e%')).\
                limit(5).from_self().\
                join(User.addresses).filter(Address.email.like('q%')).\
                order_by(User.name)

        The ORDER BY against ``User.name`` is aliased to be in terms of the
        inner subquery:

        .. sourcecode:: sql

            SELECT anon_1.user_id AS anon_1_user_id,
                   anon_1.user_name AS anon_1_user_name
            FROM (SELECT "user".id AS user_id, "user".name AS user_name
            FROM "user"
            WHERE "user".name LIKE :name_1
             LIMIT :param_1) AS anon_1
            JOIN address ON anon_1.user_id = address.user_id
            WHERE address.email LIKE :email_1 ORDER BY anon_1.user_name

        The automatic aliasing feature only works in a **limited** way,
        for simple filters and orderings.   More ambitious constructions
        such as referring to the entity in joins should prefer to use
        explicit subquery objects, typically making use of the
        :meth:`.Query.subquery` method to produce an explicit subquery object.
        Always test the structure of queries by viewing the SQL to ensure
        a particular structure does what's expected!

        **Changing the Entities**

        :meth:`.Query.from_self` also includes the ability to modify what
        columns are being queried.   In our example, we want ``User.id``
        to be queried by the inner query, so that we can join to the
        ``Address`` entity on the outside, but we only wanted the outer
        query to return the ``Address.email`` column::

            q = session.query(User).filter(User.name.like('e%')).\
                limit(5).from_self(Address.email).\
                join(User.addresses).filter(Address.email.like('q%'))

        yielding:

        .. sourcecode:: sql

            SELECT address.email AS address_email
            FROM (SELECT "user".id AS user_id, "user".name AS user_name
            FROM "user"
            WHERE "user".name LIKE :name_1
             LIMIT :param_1) AS anon_1
            JOIN address ON anon_1.user_id = address.user_id
            WHERE address.email LIKE :email_1

        **Looking out for Inner / Outer Columns**

        Keep in mind that when referring to columns that originate from
        inside the subquery, we need to ensure they are present in the
        columns clause of the subquery itself; this is an ordinary aspect of
        SQL.  For example, if we wanted to load from a joined entity inside
        the subquery using :func:`.contains_eager`, we need to add those
        columns.   Below illustrates a join of ``Address`` to ``User``,
        then a subquery, and then we'd like :func:`.contains_eager` to access
        the ``User`` columns::

            q = session.query(Address).join(Address.user).\
                filter(User.name.like('e%'))

            q = q.add_entity(User).from_self().\
                options(contains_eager(Address.user))

        We use :meth:`.Query.add_entity` above **before** we call
        :meth:`.Query.from_self` so that the ``User`` columns are present
        in the inner subquery, so that they are available to the
        :func:`.contains_eager` modifier we are using on the outside,
        producing:

        .. sourcecode:: sql

            SELECT anon_1.address_id AS anon_1_address_id,
                   anon_1.address_email AS anon_1_address_email,
                   anon_1.address_user_id AS anon_1_address_user_id,
                   anon_1.user_id AS anon_1_user_id,
                   anon_1.user_name AS anon_1_user_name
            FROM (
                SELECT address.id AS address_id,
                address.email AS address_email,
                address.user_id AS address_user_id,
                "user".id AS user_id,
                "user".name AS user_name
            FROM address JOIN "user" ON "user".id = address.user_id
            WHERE "user".name LIKE :name_1) AS anon_1

        If we didn't call ``add_entity(User)``, but still asked
        :func:`.contains_eager` to load the ``User`` entity, it would be
        forced to add the table on the outside without the correct
        join criteria - note the ``anon1, "user"`` phrase at
        the end:

        .. sourcecode:: sql

            -- incorrect query
            SELECT anon_1.address_id AS anon_1_address_id,
                   anon_1.address_email AS anon_1_address_email,
                   anon_1.address_user_id AS anon_1_address_user_id,
                   "user".id AS user_id,
                   "user".name AS user_name
            FROM (
                SELECT address.id AS address_id,
                address.email AS address_email,
                address.user_id AS address_user_id
            FROM address JOIN "user" ON "user".id = address.user_id
            WHERE "user".name LIKE :name_1) AS anon_1, "user"

        :param \*entities: optional list of entities which will replace
         those being selected.

        N(R¾R½RmR·RîR%t_from_selectablet_enable_single_critRRFR!(R"R#t
fromclauseR±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt	from_selfÙs©		cCs
||_dS(N(Rÿ(R"tval((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_set_enable_single_crit‹scCs~x!dD]}|jj|dƒqW|j|gtƒt|_|j}g|_x%|D]}|j||j	d
ƒqYWdS(NR™R˜RRœRšR›t	_joinpathRƒRžt_havingt	_prefixest	_suffixesi(s
_statements
_criterions	_order_bys	_group_bys_limits_offsets	_joinpaths
_joinpoints	_distincts_havings	_prefixess	_suffixes(
R¯R\R%R[RiRmRxR'tadapt_to_selectableRO(R"Rtattrtold_entitiesRs((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRþs
			
cGsN|stdƒS|jƒ}|j|dtƒ|jsDd|_nt|ƒS(s\Return an iterator yielding result tuples corresponding
        to the given list of columnsR+i
((titerR²R!t
_ColumnEntityRÔ(R"tcolumnsR±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytvalues¥s
	cCs4yt|j|ƒƒdSWntk
r/dSXdS(sLReturn a scalar result corresponding to the given
        column expression.iN(tnextRt
StopIterationR%(R"tcolumn((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRDzs
cGs|j|ƒdS(s<Return a new :class:`.Query` replacing the SELECT list with the
        given entities.

        e.g.::

            # Users, filtered on some arbitrary criterion
            # and then ordered by related email address
            q = session.query(User).                        join(User.address).                        filter(User.name.like('%ed%')).                        order_by(Address.email)

            # given *only* User.id==5, Address.email, and 'q', what
            # would the *next* User in the result be ?
            subq = q.with_entities(Address.email).                        order_by(None).                        filter(User.id==5).                        subquery()
            q = q.join((subq, subq.c.email < Address.email)).                        limit(1)

        .. versionadded:: 0.6.5

        N(R!(R"R#((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt
with_entitiesºscGsWt|jƒ|_t|jƒ}x|D]}t||ƒq(W|j|j|ƒdS(sXAdd one or more column expressions to the list
        of result columns to be returned.N(RûR'RPRR*(R"RtlRß((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytadd_columnsÖs

s0.7s9:meth:`.add_column` is superseded by :meth:`.add_columns`cCs
|j|ƒS(s½Add a column expression to the list of result columns to be
        returned.

        Pending deprecation: :meth:`.add_column` will be superseded by
        :meth:`.add_columns`.

        (R(R"R((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt
add_columnãscGs|jt|ŒS(s=Return a new Query object, applying the given list of
        mapper options.

        Most supplied options regard changing how column- and
        relationship-mapped attributes are loaded. See the sections
        :ref:`deferred` and :doc:`/orm/loading_relationships` for reference
        documentation.

        (t_optionsRm(R"Rí((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytoptionsñs
cGs|jt|ŒS(N(RRi(R"Rí((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_conditional_optionsýscGs€|jjƒ|_ttj|ƒƒ}|j||_|r^x<|D]}|j|ƒqDWnx|D]}|j|ƒqeWdS(N(t_attributesR.RNRtflatten_iteratort
_with_optionstprocess_query_conditionallyt
process_query(R"tconditionalRítoptstopt((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRs

cCs
||ƒS(sïReturn a new :class:`.Query` object transformed by
        the given function.

        E.g.::

            def filter_something(criterion):
                def transform(q):
                    return q.filter(criterion)
                return transform

            q = q.with_transformation(filter_something(x==5))

        This allows ad-hoc recipes to be created for :class:`.Query`
        objects.  See the example at :ref:`hybrid_transformers`.

        .. versionadded:: 0.7.4

        ((R"tfn((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytwith_transformationst*cCs=|dk	rt|ƒj}n|j|||ff7_dS(sËAdd an indexing or other executional context
        hint for the given entity or selectable to
        this :class:`.Query`.

        Functionality is passed straight through to
        :meth:`~sqlalchemy.sql.expression.Select.with_hint`,
        with the addition that ``selectable`` can be a
        :class:`.Table`, :class:`.Alias`, or ORM entity / mapped class
        /etc.

        .. seealso::

            :meth:`.Query.with_statement_hint`

        N(R%RR6t_with_hints(R"R6ttexttdialect_name((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt	with_hint#scCs|jd||ƒS(s“add a statement hint to this :class:`.Select`.

        This method is similar to :meth:`.Select.with_hint` except that
        it does not require an individual table, and instead applies to the
        statement as a whole.

        This feature calls down into :meth:`.Select.with_statement_hint`.

        .. versionadded:: 1.0.0

        .. seealso::

            :meth:`.Query.with_hint`

        N(R'R%(R"R%R&((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytwith_statement_hint9scKs|jj|ƒ|_dS(sS Set non-SQL options which take effect during execution.

        The options are the same as those accepted by
        :meth:`.Connection.execution_options`.

        Note that the ``stream_results`` execution option is enabled
        automatically if the :meth:`~sqlalchemy.orm.query.Query.yield_per()`
        method is used.

        N(RÕRÖ(R"tkwargs((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytexecution_optionsKscCstj|ƒ|_dS(s[Return a new :class:`.Query` object with the specified "locking mode",
        which essentially refers to the ``FOR UPDATE`` clause.

        .. deprecated:: 0.9.0 superseded by :meth:`.Query.with_for_update`.

        :param mode: a string representing the desired locking mode.
         Valid values are:

         * ``None`` - translates to no lockmode

         * ``'update'`` - translates to ``FOR UPDATE``
           (standard SQL, supported by most dialects)

         * ``'update_nowait'`` - translates to ``FOR UPDATE NOWAIT``
           (supported by Oracle, PostgreSQL 8.1 upwards)

         * ``'read'`` - translates to ``LOCK IN SHARE MODE`` (for MySQL),
           and ``FOR SHARE`` (for PostgreSQL)

        .. seealso::

            :meth:`.Query.with_for_update` - improved API for
            specifying the ``FOR UPDATE`` clause.

        N(tLockmodeArgtparse_legacy_queryRã(R"tmode((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt
with_lockmodeYscCs"td|d|d|ƒ|_dS(sóreturn a new :class:`.Query` with the specified options for the
        ``FOR UPDATE`` clause.

        The behavior of this method is identical to that of
        :meth:`.SelectBase.with_for_update`.  When called with no arguments,
        the resulting ``SELECT`` statement will have a ``FOR UPDATE`` clause
        appended.  When additional arguments are specified, backend-specific
        options such as ``FOR UPDATE NOWAIT`` or ``LOCK IN SHARE MODE``
        can take effect.

        E.g.::

            q = sess.query(User).with_for_update(nowait=True, of=User)

        The above query on a Postgresql backend will render like::

            SELECT users.id AS users_id FROM users FOR UPDATE OF users NOWAIT

        .. versionadded:: 0.9.0 :meth:`.Query.with_for_update` supersedes
           the :meth:`.Query.with_lockmode` method.

        .. seealso::

            :meth:`.GenerativeSelect.with_for_update` - Core level method with
            full argument and behavioral description.

        treadtnowaittofN(R+Rã(R"R/R0R1((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytwith_for_updatevscOspt|ƒdkr&|j|dƒn$t|ƒdkrJtjdƒ‚n|jjƒ|_|jj|ƒdS(sƒadd values for bind parameters which may have been
        specified in filter().

        parameters may be specified using \**kwargs, or optionally a single
        dictionary as the first positional argument. The reason for both is
        that \**kwargs is convenient, however some parameter dictionaries
        contain unicode keys in which case \**kwargs cannot be used.

        iisFparams() takes zero or one positional argument, which is a dictionary.N(RPRRGRHR¸R.(R"RíR)((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR¹•scGsjxct|ƒD]U}tj|ƒ}|j|ttƒ}|jdk	rY|j|@|_q
||_q
WdS(sapply the given filtering criterion to a copy
        of this :class:`.Query`, using SQL expressions.

        e.g.::

            session.query(MyClass).filter(MyClass.name == 'some name')

        Multiple criteria may be specified as comma separated; the effect
        is that they will be joined together using the :func:`.and_`
        function::

            session.query(MyClass).\
                filter(MyClass.name == 'some name', MyClass.id > 5)

        The criterion is any SQL expression object applicable to the
        WHERE clause of a select.   String expressions are coerced
        into SQL expression constructs via the :func:`.text` construct.

        .. seealso::

            :meth:`.Query.filter_by` - filter on keyword expressions.

        N(RûRt_expression_literal_as_textRgRiR˜R%(R"t	criterion((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR÷©scKsPg|jƒD]'\}}t|jƒ|ƒ|k^q
}|jtj|ŒƒS(sÈapply the given filtering criterion to a copy
        of this :class:`.Query`, using keyword expressions.

        e.g.::

            session.query(MyClass).filter_by(name = 'some name')

        Multiple criteria may be specified as comma separated; the effect
        is that they will be joined together using the :func:`.and_`
        function::

            session.query(MyClass).\
                filter_by(name = 'some name', id = 5)

        The keyword expressions are extracted from the primary
        entity of the query, or the last entity that was the
        target of a call to :meth:`.Query.join`.

        .. seealso::

            :meth:`.Query.filter` - filter on SQL expressions.

        (titemsRR„R÷Rtand_(R"R)RéRÇtclauses((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt	filter_byÌs7cGs«t|ƒdkr^|dtkr>d|jkr:|`ndS|ddkr^d|_dSn|j|ƒ}|jtks‹|jdkr—||_n|j||_dS(sèapply one or more ORDER BY criterion to the query and return
        the newly resulting ``Query``

        All existing ORDER BY settings can be suppressed by
        passing ``None`` - this will suppress any ORDER BY configured
        on mappers as well.

        Alternatively, an existing ORDER BY setting on the Query
        object can be entirely cancelled by passing ``False``
        as the value - use this before calling methods where
        an ORDER BY is invalid.

        iiRN(RPRmR¯RR%Rl(R"R4((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR‘és		cGsittg|D]}t|ƒ^q
Œƒ}|j|ƒ}|jtkrU||_n|j||_dS(shapply one or more GROUP BY criterion to the query and return
        the newly resulting :class:`.Query`N(RûRR
RlRœRm(R"R4Rß((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytgroup_by	s
+cCs„tj|ƒ}|dk	r@t|tjƒr@tjdƒ‚n|j|t	t	ƒ}|j
dk	rw|j
|@|_
n	||_
dS(s	apply a HAVING criterion to the query and return the
        newly resulting :class:`.Query`.

        :meth:`~.Query.having` is used in conjunction with
        :meth:`~.Query.group_by`.

        HAVING criterion makes it possible to use filters on aggregate
        functions like COUNT, SUM, AVG, MAX, and MIN, eg.::

            q = session.query(User.id).\
                        join(User.addresses).\
                        group_by(User.id).\
                        having(func.count(Address.id) > 2)

        sHhaving() argument must be of type sqlalchemy.sql.ClauseElement or stringN(RR3R%RKRt
ClauseElementRGRHRgRiR(R"R4((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pythavingscGs#|jtj|gt|ƒŒƒS(sŽProduce a UNION of this Query against one or more queries.

        e.g.::

            q1 = sess.query(SomeClass).filter(SomeClass.foo=='bar')
            q2 = sess.query(SomeClass).filter(SomeClass.bar=='foo')

            q3 = q1.union(q2)

        The method accepts multiple Query objects so as to control
        the level of nesting.  A series of ``union()`` calls such as::

            x.union(y).union(z).all()

        will nest on each ``union()``, and produces::

            SELECT * FROM (SELECT * FROM (SELECT * FROM X UNION
                            SELECT * FROM y) UNION SELECT * FROM Z)

        Whereas::

            x.union(y, z).all()

        produces::

            SELECT * FROM (SELECT * FROM X UNION SELECT * FROM y UNION
                            SELECT * FROM Z)

        Note that many database backends do not allow ORDER BY to
        be rendered on a query called within UNION, EXCEPT, etc.
        To disable all ORDER BY clauses including those configured
        on mappers, issue ``query.order_by(None)`` - the resulting
        :class:`.Query` object will not render ORDER BY within
        its SELECT statement.

        (RþRRÖRû(R"R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÖ7s&cGs#|jtj|gt|ƒŒƒS(s¾Produce a UNION ALL of this Query against one or more queries.

        Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See
        that method for usage examples.

        (RþRt	union_allRû(R"R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR<`scGs#|jtj|gt|ƒŒƒS(s¿Produce an INTERSECT of this Query against one or more queries.

        Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See
        that method for usage examples.

        (RþRt	intersectRû(R"R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR=kscGs#|jtj|gt|ƒŒƒS(sÃProduce an INTERSECT ALL of this Query against one or more queries.

        Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See
        that method for usage examples.

        (RþRt
intersect_allRû(R"R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR>vscGs#|jtj|gt|ƒŒƒS(s¼Produce an EXCEPT of this Query against one or more queries.

        Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See
        that method for usage examples.

        (RþRtexcept_Rû(R"R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR?scGs#|jtj|gt|ƒŒƒS(sÀProduce an EXCEPT ALL of this Query against one or more queries.

        Works the same way as :meth:`~sqlalchemy.orm.query.Query.union`. See
        that method for usage examples.

        (RþRt
except_allRû(R"R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR@ŒscOs|jdtƒ|jdtƒ|jdtƒ}}}|r`tddjt|ƒƒƒ‚n|j|d|d|d|ƒS(sr,Create a SQL JOIN against this :class:`.Query` object's criterion
        and apply generatively, returning the newly resulting :class:`.Query`.

        **Simple Relationship Joins**

        Consider a mapping between two classes ``User`` and ``Address``,
        with a relationship ``User.addresses`` representing a collection
        of ``Address`` objects associated with each ``User``.   The most
        common usage of :meth:`~.Query.join` is to create a JOIN along this
        relationship, using the ``User.addresses`` attribute as an indicator
        for how this should occur::

            q = session.query(User).join(User.addresses)

        Where above, the call to :meth:`~.Query.join` along ``User.addresses``
        will result in SQL equivalent to::

            SELECT user.* FROM user JOIN address ON user.id = address.user_id

        In the above example we refer to ``User.addresses`` as passed to
        :meth:`~.Query.join` as the *on clause*, that is, it indicates
        how the "ON" portion of the JOIN should be constructed.  For a
        single-entity query such as the one above (i.e. we start by selecting
        only from ``User`` and nothing else), the relationship can also be
        specified by its string name::

            q = session.query(User).join("addresses")

        :meth:`~.Query.join` can also accommodate multiple
        "on clause" arguments to produce a chain of joins, such as below
        where a join across four related entities is constructed::

            q = session.query(User).join("orders", "items", "keywords")

        The above would be shorthand for three separate calls to
        :meth:`~.Query.join`, each using an explicit attribute to indicate
        the source entity::

            q = session.query(User).\
                    join(User.orders).\
                    join(Order.items).\
                    join(Item.keywords)

        **Joins to a Target Entity or Selectable**

        A second form of :meth:`~.Query.join` allows any mapped entity
        or core selectable construct as a target.   In this usage,
        :meth:`~.Query.join` will attempt
        to create a JOIN along the natural foreign key relationship between
        two entities::

            q = session.query(User).join(Address)

        The above calling form of :meth:`~.Query.join` will raise an error if
        either there are no foreign keys between the two entities, or if
        there are multiple foreign key linkages between them.   In the
        above calling form, :meth:`~.Query.join` is called upon to
        create the "on clause" automatically for us.  The target can
        be any mapped entity or selectable, such as a :class:`.Table`::

            q = session.query(User).join(addresses_table)

        **Joins to a Target with an ON Clause**

        The third calling form allows both the target entity as well
        as the ON clause to be passed explicitly.   Suppose for
        example we wanted to join to ``Address`` twice, using
        an alias the second time.  We use :func:`~sqlalchemy.orm.aliased`
        to create a distinct alias of ``Address``, and join
        to it using the ``target, onclause`` form, so that the
        alias can be specified explicitly as the target along with
        the relationship to instruct how the ON clause should proceed::

            a_alias = aliased(Address)

            q = session.query(User).\
                    join(User.addresses).\
                    join(a_alias, User.addresses).\
                    filter(Address.email_address=='ed@foo.com').\
                    filter(a_alias.email_address=='ed@bar.com')

        Where above, the generated SQL would be similar to::

            SELECT user.* FROM user
                JOIN address ON user.id = address.user_id
                JOIN address AS address_1 ON user.id=address_1.user_id
                WHERE address.email_address = :email_address_1
                AND address_1.email_address = :email_address_2

        The two-argument calling form of :meth:`~.Query.join`
        also allows us to construct arbitrary joins with SQL-oriented
        "on clause" expressions, not relying upon configured relationships
        at all.  Any SQL expression can be passed as the ON clause
        when using the two-argument form, which should refer to the target
        entity in some way as well as an applicable source entity::

            q = session.query(User).join(Address, User.id==Address.user_id)

        .. versionchanged:: 0.7
            In SQLAlchemy 0.6 and earlier, the two argument form of
            :meth:`~.Query.join` requires the usage of a tuple:
            ``query(User).join((Address, User.id==Address.user_id))``\ .
            This calling form is accepted in 0.7 and further, though
            is not necessary unless multiple join conditions are passed to
            a single :meth:`~.Query.join` call, which itself is also not
            generally necessary as it is now equivalent to multiple
            calls (this wasn't always the case).

        **Advanced Join Targeting and Adaption**

        There is a lot of flexibility in what the "target" can be when using
        :meth:`~.Query.join`.   As noted previously, it also accepts
        :class:`.Table` constructs and other selectables such as
        :func:`.alias` and :func:`.select` constructs, with either the one
        or two-argument forms::

            addresses_q = select([Address.user_id]).\
                        where(Address.email_address.endswith("@bar.com")).\
                        alias()

            q = session.query(User).\
                        join(addresses_q, addresses_q.c.user_id==User.id)

        :meth:`~.Query.join` also features the ability to *adapt* a
        :meth:`~sqlalchemy.orm.relationship` -driven ON clause to the target
        selectable. Below we construct a JOIN from ``User`` to a subquery
        against ``Address``, allowing the relationship denoted by
        ``User.addresses`` to *adapt* itself to the altered target::

            address_subq = session.query(Address).\
                            filter(Address.email_address == 'ed@foo.com').\
                            subquery()

            q = session.query(User).join(address_subq, User.addresses)

        Producing SQL similar to::

            SELECT user.* FROM user
                JOIN (
                    SELECT address.id AS id,
                            address.user_id AS user_id,
                            address.email_address AS email_address
                    FROM address
                    WHERE address.email_address = :email_address_1
                ) AS anon_1 ON user.id = anon_1.user_id

        The above form allows one to fall back onto an explicit ON
        clause at any time::

            q = session.query(User).\
                    join(address_subq, User.id==address_subq.c.user_id)

        **Controlling what to Join From**

        While :meth:`~.Query.join` exclusively deals with the "right"
        side of the JOIN, we can also control the "left" side, in those
        cases where it's needed, using :meth:`~.Query.select_from`.
        Below we construct a query against ``Address`` but can still
        make usage of ``User.addresses`` as our ON clause by instructing
        the :class:`.Query` to select first from the ``User``
        entity::

            q = session.query(Address).select_from(User).\
                            join(User.addresses).\
                            filter(User.name == 'ed')

        Which will produce SQL similar to::

            SELECT address.* FROM user
                JOIN address ON user.id=address.user_id
                WHERE user.name = :name_1

        **Constructing Aliases Anonymously**

        :meth:`~.Query.join` can construct anonymous aliases
        using the ``aliased=True`` flag.  This feature is useful
        when a query is being joined algorithmically, such as
        when querying self-referentially to an arbitrary depth::

            q = session.query(Node).\
                    join("children", "children", aliased=True)

        When ``aliased=True`` is used, the actual "alias" construct
        is not explicitly available.  To work with it, methods such as
        :meth:`.Query.filter` will adapt the incoming entity to
        the last join point::

            q = session.query(Node).\
                    join("children", "children", aliased=True).\
                    filter(Node.name == 'grandchild 1')

        When using automatic aliasing, the ``from_joinpoint=True``
        argument can allow a multi-node join to be broken into
        multiple calls to :meth:`~.Query.join`, so that
        each path along the way can be further filtered::

            q = session.query(Node).\
                    join("children", aliased=True).\
                    filter(Node.name='child 1').\
                    join("children", aliased=True, from_joinpoint=True).\
                    filter(Node.name == 'grandchild 1')

        The filtering aliases above can then be reset back to the
        original ``Node`` entity using :meth:`~.Query.reset_joinpoint`::

            q = session.query(Node).\
                    join("children", "children", aliased=True).\
                    filter(Node.name == 'grandchild 1').\
                    reset_joinpoint().\
                    filter(Node.name == 'parent 1)

        For an example of ``aliased=True``, see the distribution
        example :ref:`examples_xmlpersistence` which illustrates
        an XPath-like query system using algorithmic joins.

        :param \*props: A collection of one or more join conditions,
         each consisting of a relationship-bound attribute or string
         relationship name representing an "on clause", or a single
         target entity, or a tuple in the form of ``(target, onclause)``.
         A special two-argument calling form of the form ``target, onclause``
         is also accepted.
        :param aliased=False: If True, indicate that the JOIN target should be
         anonymously aliased.  Subsequent calls to :meth:`~.Query.filter`
         and similar will adapt the incoming criterion to the target
         alias, until :meth:`~.Query.reset_joinpoint` is called.
        :param isouter=False: If True, the join used will be a left outer join,
         just as if the :meth:`.Query.outerjoin` method were called.  This
         flag is here to maintain consistency with the same flag as accepted
         by :meth:`.FromClause.join` and other Core constructs.


         .. versionadded:: 1.0.0

        :param from_joinpoint=False: When using ``aliased=True``, a setting
         of True here will cause the join to be from the most recent
         joined target, rather than starting back from the original
         FROM clauses of the query.

        .. seealso::

            :ref:`ormtutorial_joins` in the ORM tutorial.

            :ref:`inheritance_toplevel` for details on how
            :meth:`~.Query.join` is used for inheritance relationships.

            :func:`.orm.join` - a standalone ORM-level join function,
            used internally by :meth:`.Query.join`, which in previous
            SQLAlchemy versions was the primary ORM-level joining interface.

        Rtfrom_joinpointtisoutersunknown arguments: %ss, t	outerjointcreate_aliases(R\Rmt	TypeErrorRtsortedt_join(R"tpropsR)RRARB((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR—sûcOsl|jdtƒ|jdtƒ}}|rMtddjt|ƒƒƒ‚n|j|dtd|d|ƒS(sÊCreate a left outer join against this ``Query`` object's criterion
        and apply generatively, returning the newly resulting ``Query``.

        Usage is the same as the ``join()`` method.

        RRAsunknown arguments: %ss, RCRD(R\RmRERRFRGRi(R"RHR)RRA((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRCœscCse||_xLd|krW|d\}}|jƒ}|||<||f|d<|}qW||_dS(Ntprev(RƒR.R(R"tjptfRI((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_update_joinpoint¬s	

cCs?|s|jƒnt|ƒdkrrt|dtjttfƒrrt|dttjt	j
fƒrr|f}ntj|ƒ}x·t
|ƒD]©\}}t|tƒr¸|\}}nd
}t|t	j
tjfƒré||}	}
n
||}	}
d
}}t|
t	j
ƒr't|
dd
ƒ}
nd
}
t|
tjƒrc|jƒ}t||
ƒ}|}
n˜|rût|
t	j
ƒrû|
j}t|jƒƒ}t|dd
ƒ|jt|dd
ƒ}}}||krû|jƒ}t||
jƒ}|}
qûnt|
t	j
ƒrô|	d
kr7|
r(|
}	q7|
jj}	n|
j}|
j}t|
tjƒsd|}
n|s||	|jf}||jkrñ|j|jƒ}||jf|d<|j|ƒ|t|ƒdkrŽtjd|ƒqŽqŽqñqn'|
d
k	r|	d
krt d	ƒ‚n|j!||	|
|||ƒqŽWd
S(s”consumes arguments from join() or outerjoin(), places them into a
        consistent format with which to form the actual JOIN constructs.

        iiit_of_typeR0R/RIs:Pathed join target %s has already been joined to; skippingsquery.join(a==b) not supported.N("t_reset_joinpointRPRKRRcttypeRtstrR:RtPropComparatorRR)t	enumerateRNR%tstring_typestgetattrR„Rt
_parententityRR6RéRøR0RtQueryableAttributeRƒR.RLtwarntNotImplementedErrort_join_left_to_right(R"tkeysRCRDRAtkeylisttidxtarg1targ2tright_entitytonclausetleft_entityRútof_typet
descriptorRYtleft_mappertleft_selectabletleft_is_aliasedtedgeRJ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRG¸s~


						
c
Cs+|jjƒ|_|dkrV|jr7|jd}qV|jrV|jdj}qVn|dkrtjd|jdƒ‚n||kr®|r®tjd||fƒ‚nt|ƒ}t|ƒ}t	}	|sbt
|ddƒ}
|
rb|
jst|
j
tjƒrbxT|jp|jgD]:}tj|j|ƒrtj||jƒrt}	PqqWqbn|	so|rš|j|jkrštjd|jƒ‚n|j||||||	ƒ\}}|rþ|rþ|ji|d6|||jf|jfd6ƒni|d6|_|j|||||ƒdS(	s)append a JOIN to the query's from clause.ismDon't know how to join from %s; please use select_from() to establish the left entity/selectable of this joins>Can't construct a join from %s to %s, they are the same entityR0s*Can't join table/selectable '%s' to itselfR‚RIN(R R.R%ROR'tentity_zero_or_selectableRGR‰RRmRTR1RKR2RtJoinR6R4tselectables_overlapRit_prepare_right_sideRLRéRƒt
_join_to_left(R"tlefttrightR`RCRDRútl_infotr_infotoverlaptright_mapperRX((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRY+sZ			
	
	#c
Cs$|}t|ddƒ|jt|dtƒ}}	}
|rP|j|f7_n|r‹|r‹|j|jƒr‹tjd||fƒ‚n|r¤|r¤|j}nt}|r,||	kr,|	j	|j
ƒsótjd|	j|j
jfƒ‚nt|	t
jƒr|	jƒ}	t}nt||	ƒ}n|oZ|
oZ|jrWt|jt
jƒpZ|}|r‹|sp|r‹t|dtƒ}t}n|rÁt|d|r©|jp¬id|jƒ|_nt|t
jƒrë|j|ttƒ}n|r|r|j|t|d|jƒƒn||fS(NR0R/sIJoin target %s does not correspond to the right side of join condition %ss(Selectable '%s' is not derived from '%s'tflattequivalentstchain_to(RTR%R6Rmt_join_entitiest
common_parentR0RGR‰tis_derived_fromR2tdescriptionRKRRLRMRiRR1t_with_polymorphic_selectableRQRR7RvR:RgR3(
R"RpRnR`RDRúRqRYRrtright_selectabletright_is_aliasedtneed_adaptertaliased_entity((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRkosb
		
c
Csˆ|}t|ddƒ}|j}|jrÌtj|j|ƒ\}	}
|
dk	rÌyt|
||d|ƒ}
Wn/tjk
rž}tj	d||fƒ‚nX|j|	 |
f|j|	d|_dSn|rx<|j
D]"}|j|ƒrÜ|j}
PqÜqÜW|}
n|}
|
dk	s#t‚yt|
||d|ƒ}
Wn/tjk
rp}tj	d||fƒ‚nX|j|
f|_dS(NR0RBsLCould not find a FROM clause to join from.  Tried joining to %s, but got: %si(
RTR%R6ROR4tfind_join_sourcetorm_joinRGRHR‰R'tcorresponds_totAssertionError(
R"RoRmRnR`RCRYRdRetreplace_clause_indexRztaeR,((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRlÄsD				cCs|j|_d|_dS(N(RRƒR%Rv(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRNðscCs|jƒdS(sSReturn a new :class:`.Query`, where the "join point" has
        been reset back to the base FROM entities of the query.

        This method is usually used in conjunction with the
        ``aliased=True`` feature of the :meth:`~.Query.join`
        method.  See the example in :meth:`~.Query.join` for how
        this is used.

        N(RN(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytreset_joinpointôscGs|j|tƒdS(sPSet the FROM clause of this :class:`.Query` explicitly.

        :meth:`.Query.select_from` is often used in conjunction with
        :meth:`.Query.join` in order to control which entity is selected
        from on the "left" side of the join.

        The entity or selectable object here effectively replaces the
        "left edge" of any calls to :meth:`~.Query.join`, when no
        joinpoint is otherwise established - usually, the default "join
        point" is the leftmost entity in the :class:`~.Query` object's
        list of entities to be selected.

        A typical example::

            q = session.query(Address).select_from(User).\
                join(User.addresses).\
                filter(User.name == 'ed')

        Which produces SQL equivalent to::

            SELECT address.* FROM user
            JOIN address ON user.id=address.user_id
            WHERE user.name = :name_1

        :param \*from_obj: collection of one or more entities to apply
         to the FROM clause.  Entities can be mapped classes,
         :class:`.AliasedClass` objects, :class:`.Mapper` objects
         as well as core :class:`.FromClause` elements like subqueries.

        .. versionchanged:: 0.9
            This method no longer applies the given FROM object
            to be the selectable from which matching entities
            select from; the :meth:`.select_entity_from` method
            now accomplishes this.  See that method for a description
            of this behavior.

        .. seealso::

            :meth:`~.Query.join`

            :meth:`.Query.select_entity_from`

        N(R[Rm(R"RX((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytselect_from	s.cCs|j|gtƒdS(sàSet the FROM clause of this :class:`.Query` to a
        core selectable, applying it as a replacement FROM clause
        for corresponding mapped entities.

        This method is similar to the :meth:`.Query.select_from`
        method, in that it sets the FROM clause of the query.  However,
        where :meth:`.Query.select_from` only affects what is placed
        in the FROM, this method also applies the given selectable
        to replace the FROM which the selected entities would normally
        select from.

        The given ``from_obj`` must be an instance of a :class:`.FromClause`,
        e.g. a :func:`.select` or :class:`.Alias` construct.

        An example would be a :class:`.Query` that selects ``User`` entities,
        but uses :meth:`.Query.select_entity_from` to have the entities
        selected from a :func:`.select` construct instead of the
        base ``user`` table::

            select_stmt = select([User]).where(User.id == 7)

            q = session.query(User).\
                    select_entity_from(select_stmt).\
                    filter(User.name == 'ed')

        The query generated will select ``User`` entities directly
        from the given :func:`.select` construct, and will be::

            SELECT anon_1.id AS anon_1_id, anon_1.name AS anon_1_name
            FROM (SELECT "user".id AS id, "user".name AS name
            FROM "user"
            WHERE "user".id = :id_1) AS anon_1
            WHERE anon_1.name = :name_1

        Notice above that even the WHERE criterion was "adapted" such that
        the ``anon_1`` subquery effectively replaces all references to the
        ``user`` table, except for the one that it refers to internally.

        Compare this to :meth:`.Query.select_from`, which as of
        version 0.9, does not affect existing entities.  The
        statement below::

            q = session.query(User).\
                    select_from(select_stmt).\
                    filter(User.name == 'ed')

        Produces SQL where both the ``user`` table as well as the
        ``select_stmt`` construct are present as separate elements
        in the FROM clause.  No "adaptation" of the ``user`` table
        is applied::

            SELECT "user".id AS user_id, "user".name AS user_name
            FROM "user", (SELECT "user".id AS id, "user".name AS name
            FROM "user"
            WHERE "user".id = :id_1) AS anon_1
            WHERE "user".name = :name_1

        :meth:`.Query.select_entity_from` maintains an older
        behavior of :meth:`.Query.select_from`.  In modern usage,
        similar results can also be achieved using :func:`.aliased`::

            select_stmt = select([User]).where(User.id == 7)
            user_from_select = aliased(User, select_stmt.alias())

            q = session.query(user_from_select)

        :param from_obj: a :class:`.FromClause` object that will replace
         the FROM clause of this :class:`.Query`.

        .. seealso::

            :meth:`.Query.select_from`

        .. versionadded:: 0.8
            :meth:`.Query.select_entity_from` was added to specify
            the specific behavior of entity replacement, however
            the :meth:`.Query.select_from` maintains this behavior
            as well until 0.9.

        N(R[Ri(R"RX((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytselect_entity_from1	sSc	Cst|tƒrâtj|ƒ\}}}t|tƒrYt|tƒrY||dkrYgSt|tƒrt|dkst|tƒr|dkrt|ƒ|S|j||ƒ}|dk	rÕt|ƒdd|j…St|ƒSn3|dkrüt|ƒdSt|||d!ƒdSdS(Niiÿÿÿÿi(RKtsliceRtdecode_slicetintRûR%tstep(R"titemtstarttstopR‹tres((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt__getitem__†	s 
cCs²|dk	r>|dk	r>|jp$d||_|||_nU|dkrb|dk	rb||_n1|dk	r“|dkr“|jp†d||_n|jdkr®d|_ndS(söComputes the "slice" of the :class:`.Query` represented by
        the given indices and returns the resulting :class:`.Query`.

        The start and stop indices behave like the argument to Python's
        built-in :func:`range` function. This method provides an
        alternative to using ``LIMIT``/``OFFSET`` to get a slice of the
        query.

        For example, ::

            session.query(User).order_by(User.id).slice(1, 3)

        renders as

        .. sourcecode:: sql

           SELECT users.id AS users_id,
                  users.name AS users_name
           FROM users ORDER BY users.id
           LIMIT ? OFFSET ?
           (2, 1)

        .. seealso::

           :meth:`.Query.limit`

           :meth:`.Query.offset`

        iN(R%R›Rš(R"RRŽ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRˆ 	scCs
||_dS(sZApply a ``LIMIT`` to the query and return the newly resulting
        ``Query``.

        N(Rš(R"tlimit((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR‘Ê	scCs
||_dS(s\Apply an ``OFFSET`` to the query and return the newly resulting
        ``Query``.

        N(R›(R"toffset((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR’Ò	scGsR|st|_n<|j|ƒ}t|jtƒrE|j|7_n	||_dS(s|Apply a ``DISTINCT`` to the query and return the newly resulting
        ``Query``.


        .. note::

            The :meth:`.distinct` call includes logic that will automatically
            add columns from the ORDER BY of the query to the columns
            clause of the SELECT statement, to satisfy the common need
            of the database backend that ORDER BY columns be part of the
            SELECT list when DISTINCT is used.   These columns *are not*
            added to the list of columns actually fetched by the
            :class:`.Query`, however, so would not affect results.
            The columns are passed through when using the
            :attr:`.Query.statement` accessor, however.

        :param \*expr: optional column expressions.  When present,
         the Postgresql dialect will render a ``DISTINCT ON (<expressions>>)``
         construct.

        N(RiRžRlRKRû(R"R4((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR’Ú	scGs(|jr|j|7_n	||_dS(sqApply the prefixes to the query and return the newly resulting
        ``Query``.

        :param \*prefixes: optional prefixes, typically strings,
         not using any commas.   In particular is useful for MySQL keywords.

        e.g.::

            query = sess.query(User.name).\
                prefix_with('HIGH_PRIORITY').\
                prefix_with('SQL_SMALL_RESULT', 'ALL')

        Would render::

            SELECT HIGH_PRIORITY SQL_SMALL_RESULT ALL users.name AS users_name
            FROM users

        .. versionadded:: 0.7.7

        .. seealso::

            :meth:`.HasPrefixes.prefix_with`

        N(R(R"tprefixes((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytprefix_withú	s	cGs(|jr|j|7_n	||_dS(sGApply the suffix to the query and return the newly resulting
        ``Query``.

        :param \*suffixes: optional suffixes, typically strings,
         not using any commas.

        .. versionadded:: 1.0.0

        .. seealso::

            :meth:`.Query.prefix_with`

            :meth:`.HasSuffixes.suffix_with`

        N(R(R"tsuffixes((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytsuffix_with
s	cCs
t|ƒS(s„Return the results represented by this ``Query`` as a list.

        This results in an execution of the underlying query.

        (Rû(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytall/
scCsItj|ƒ}t|tjtjfƒs<tjdƒ‚n||_dS(s%Execute the given SELECT statement and return results.

        This method bypasses all internal statement compilation, and the
        statement is executed without modification.

        The statement is typically either a :func:`~.expression.text`
        or :func:`~.expression.select` construct, and should return the set
        of columns
        appropriate to the entity class represented by this :class:`.Query`.

        .. seealso::

            :ref:`orm_tutorial_literal_sql` - usage examples in the
            ORM tutorial

        sBfrom_statement accepts text(), select(), and union() objects only.N(RR3RKt
TextClauseRLRGRHR™(R"R·((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytfrom_statement7
scCsZ|jdk	r%t|ƒdd!}nt|dd!ƒ}t|ƒdkrR|dSdSdS(s·Return the first result of this ``Query`` or
        None if the result doesn't contain any row.

        first() applies a limit of one within the generated SQL, so that
        only one primary entity row is generated on the server side
        (note this may consist of multiple result rows if join-loaded
        collections are present).

        Calling :meth:`.Query.first` results in an execution of the underlying query.

        iiN(R™R%RûRP(R"tret((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytfirstT
scCsOt|ƒ}t|ƒ}|dkr,|dS|dkr<dStjdƒ‚dS(syReturn at most one result or raise an exception.

        Returns ``None`` if the query selects
        no rows.  Raises ``sqlalchemy.orm.exc.MultipleResultsFound``
        if multiple object identities are returned, or if multiple
        rows are returned for a query that returns only scalar values
        as opposed to full identity-mapped entities.

        Calling :meth:`.Query.one_or_none` results in an execution of the underlying
        query.

        .. versionadded:: 1.0.9

            Added :meth:`.Query.one_or_none`

        .. seealso::

            :meth:`.Query.first`

            :meth:`.Query.one`


        iis*Multiple rows were found for one_or_none()N(RûRPR%torm_exctMultipleResultsFound(R"RšR((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytone_or_nonei
scCs]t|ƒ}t|ƒ}|dkr,|dS|dkrJtjdƒ‚ntjdƒ‚dS(s6Return exactly one result or raise an exception.

        Raises ``sqlalchemy.orm.exc.NoResultFound`` if the query selects
        no rows.  Raises ``sqlalchemy.orm.exc.MultipleResultsFound``
        if multiple object identities are returned, or if multiple
        rows are returned for a query that returns only scalar values
        as opposed to full identity-mapped entities.

        Calling :meth:`.one` results in an execution of the underlying query.

        .. seealso::

            :meth:`.Query.first`

            :meth:`.Query.one_or_none`

        iisNo row was found for one()s"Multiple rows were found for one()N(RûRPRœt
NoResultFoundR(R"RšR((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytoneŒ
scCsGy+|jƒ}t|tƒs"|S|dSWntjk
rBdSXdS(s4Return the first element of the first result or None
        if no rows present.  If multiple rows are returned,
        raises MultipleResultsFound.

          >>> session.query(Item).scalar()
          <Item>
          >>> session.query(Item.id).scalar()
          1
          >>> session.query(Item.id).filter(Item.id < 0).scalar()
          None
          >>> session.query(Item.id, Item.name).scalar()
          1
          >>> session.query(func.count(Parent.id)).scalar()
          20

        This results in an execution of the underlying query.

        iN(R RKRNRœRŸR%(R"Rš((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytscalar©
scCsH|jƒ}t|j_|jr;|jr;|jjƒn|j|ƒS(N(RµRiR·t
use_labelsRïR£Rt_execute_and_instances(R"tcontext((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt__iter__Ä
s
cKs4|jj|}|jr0|j|j}n|S(N(Rt
connectionRÕR*(R"tkwtconn((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_connection_from_sessionË
s
			cCsU|jd|jƒd|jdtƒ}|j|j|jƒ}tj|j||ƒS(NR0Rztclose_with_result(	R©RˆR·RitexecuteR¸Rt	instancestquery(R"tquerycontextR¨tresult((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR£Ò
s			cCsºgg|jD]0}||jdk	r4t|jƒndf^q
D]u\}}i|jd6|jd6t|dtƒd6|jd6|jdk	r¬|j	r¬t|ddƒndd6^qAS(sþReturn metadata about the columns which would be
        returned by this :class:`.Query`.

        Format is a list of dictionaries::

            user_alias = aliased(User, name='user2')
            q = sess.query(User, User.id, user_alias)

            # this expression:
            q.column_descriptions

            # would return:
            [
                {
                    'name':'User',
                    'type':User,
                    'aliased':False,
                    'expr':User,
                    'entity': User
                },
                {
                    'name':'id',
                    'type':Integer(),
                    'aliased':False,
                    'expr':User.id,
                    'entity': User
                },
                {
                    'name':'user2',
                    'type':User,
                    'aliased':True,
                    'expr':user_alias,
                    'entity': user_alias
                }
            ]

        R¼ROR/RtexprR;N(
R'R~R%Rt_label_nameRORTRmR°R…(R"t_entR,tinsp_ent((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytcolumn_descriptionsÛ
s)cCs4|}|dkr!t|ƒ}ntj|||ƒS(sGiven a ResultProxy cursor as returned by connection.execute(),
        return an ORM result as an iterator.

        e.g.::

            result = engine.execute("select * from users")
            for u in session.query(User).instances(result):
                print u
        N(R%RRR¬(R"tcursort_Query__contextR¤((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR¬s
cCstj|||ƒS(s?Merge a result into this :class:`.Query` object's Session.

        Given an iterator returned by a :class:`.Query` of the same structure
        as this one, return an identical iterator of results, with all mapped
        instances merged into the session using :meth:`.Session.merge`. This
        is an optimized method which will merge all mapped instances,
        preserving the structure of the result rows and unmapped columns with
        less method overhead than that of calling :meth:`.Session.merge`
        explicitly for each value.

        The structure of the results is determined based on the column list of
        this :class:`.Query` - if these do not correspond, unchecked errors
        will occur.

        The 'load' argument is the same as that of :meth:`.Session.merge`.

        For an example of how :meth:`~.Query.merge_result` is used, see
        the source code for the example :ref:`examples_caching`, where
        :meth:`~.Query.merge_result` is used to efficiently restore state
        from a cache back into a target :class:`.Session`.

        (Rtmerge_result(R"titeratortload((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR·)scCsPi|jd6|jd6|jd6|jd6|jd6|jpAdd6|jd6S(NR‘R’R’R“R•R9R;(RšR›RžRRRœR%R(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_select_argsCs




cCsC|j}|jdƒdk	pB|jdƒdk	pB|jdtƒS(NR‘R’R’(RºRaR%Rm(R"R)((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_should_nest_selectableOs	cCs+tj|jdƒjƒjjdgƒƒS(s£A convenience method that turns a query into an EXISTS subquery
        of the form EXISTS (SELECT 1 FROM ... WHERE ...).

        e.g.::

            q = session.query(User).filter(User.name == 'fred')
            session.query(q.exists())

        Producing SQL similar to::

            SELECT EXISTS (
                SELECT 1 FROM users WHERE users.name = :name_1
            ) AS anon_1

        The EXISTS construct is usually used in the WHERE clause::

            session.query(User.id).filter(q.exists()).scalar()

        Note that some databases such as SQL Server don't allow an
        EXISTS expression to be present in the columns clause of a
        SELECT.    To select a simple boolean value based on the exists
        as a WHERE, use :func:`.literal`::

            from sqlalchemy import literal

            session.query(literal(True)).filter(q.exists()).scalar()

        .. versionadded:: 0.8.1

        t1i(RtexistsRR¾R·twith_only_columns(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR½Vs%cCs.tjjtjdƒƒ}|j|ƒjƒS(soReturn a count of rows this Query would return.

        This generates the SQL for this Query as follows::

            SELECT count(1) AS count_1 FROM (
                SELECT <rest of query follows...>
            ) AS anon_1

        .. versionchanged:: 0.7
            The above scheme is newly refined as of 0.7b3.

        For fine grained control over specific columns
        to count, to skip the usage of a subquery or
        otherwise control of the FROM clause,
        or to use other aggregate functions,
        use :attr:`~sqlalchemy.sql.expression.func`
        expressions in conjunction
        with :meth:`~.Session.query`, i.e.::

            from sqlalchemy import func

            # count User records, without
            # using a subquery.
            session.query(func.count(User.id))

            # return count of user "id" grouped
            # by "name"
            session.query(func.count(User.id)).\
                    group_by(User.name)

            from sqlalchemy import distinct

            # count distinct "name" values
            session.query(func.count(distinct(User.name)))

        R#(RtfuncR×tliteral_columnRR¡(R"tcol((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR×~s%tevaluatecCs&tjj||ƒ}|jƒ|jS(sNPerform a bulk delete query.

        Deletes rows matched by this query from the database.

        E.g.::

            sess.query(User).filter(User.age == 25).\
                delete(synchronize_session=False)

            sess.query(User).filter(User.age == 25).\
                delete(synchronize_session='evaluate')

        .. warning:: The :meth:`.Query.delete` method is a "bulk" operation,
           which bypasses ORM unit-of-work automation in favor of greater
           performance.  **Please read all caveats and warnings below.**

        :param synchronize_session: chooses the strategy for the removal of
            matched objects from the session. Valid values are:

            ``False`` - don't synchronize the session. This option is the most
            efficient and is reliable once the session is expired, which
            typically occurs after a commit(), or explicitly using
            expire_all(). Before the expiration, objects may still remain in
            the session which were in fact deleted which can lead to confusing
            results if they are accessed via get() or already loaded
            collections.

            ``'fetch'`` - performs a select query before the delete to find
            objects that are matched by the delete query and need to be
            removed from the session. Matched objects are removed from the
            session.

            ``'evaluate'`` - Evaluate the query's criteria in Python straight
            on the objects in the session. If evaluation of the criteria isn't
            implemented, an error is raised.

            The expression evaluator currently doesn't account for differing
            string collations between the database and Python.

        :return: the count of rows matched as returned by the database's
          "row count" feature.

        .. warning:: **Additional Caveats for bulk query deletes**

            * This method does **not work for joined
              inheritance mappings**, since the **multiple table
              deletes are not supported by SQL** as well as that the
              **join condition of an inheritance mapper is not
              automatically rendered**.  Care must be taken in any
              multiple-table delete to first accomodate via some other means
              how the related table will be deleted, as well as to
              explicitly include the joining
              condition between those tables, even in mappings where
              this is normally automatic. E.g. if a class ``Engineer``
              subclasses ``Employee``, a DELETE against the ``Employee``
              table would look like::

                    session.query(Engineer).\
                        filter(Engineer.id == Employee.id).\
                        filter(Employee.name == 'dilbert').\
                        delete()

              However the above SQL will not delete from the Engineer table,
              unless an ON DELETE CASCADE rule is established in the database
              to handle it.

              Short story, **do not use this method for joined inheritance
              mappings unless you have taken the additional steps to make
              this feasible**.

            * The polymorphic identity WHERE criteria is **not** included
              for single- or
              joined- table updates - this must be added **manually** even
              for single table inheritance.

            * The method does **not** offer in-Python cascading of
              relationships - it is assumed that ON DELETE CASCADE/SET
              NULL/etc. is configured for any foreign key references
              which require it, otherwise the database may emit an
              integrity violation if foreign key references are being
              enforced.

              After the DELETE, dependent objects in the
              :class:`.Session` which were impacted by an ON DELETE
              may not contain the current state, or may have been
              deleted. This issue is resolved once the
              :class:`.Session` is expired, which normally occurs upon
              :meth:`.Session.commit` or can be forced by using
              :meth:`.Session.expire_all`.  Accessing an expired
              object whose row has been deleted will invoke a SELECT
              to locate the row; when the row is not found, an
              :class:`~sqlalchemy.orm.exc.ObjectDeletedError` is
              raised.

            * The ``'fetch'`` strategy results in an additional
              SELECT statement emitted and will significantly reduce
              performance.

            * The ``'evaluate'`` strategy performs a scan of
              all matching objects within the :class:`.Session`; if the
              contents of the :class:`.Session` are expired, such as
              via a proceeding :meth:`.Session.commit` call, **this will
              result in SELECT queries emitted for every matching object**.

            * The :meth:`.MapperEvents.before_delete` and
              :meth:`.MapperEvents.after_delete`
              events **are not invoked** from this method.  Instead, the
              :meth:`.SessionEvents.after_bulk_delete` method is provided to
              act upon a mass DELETE of entity rows.

        .. seealso::

            :meth:`.Query.update`

            :ref:`inserts_and_updates` - Core SQL tutorial

        (Rt
BulkDeletetfactorytexec_trowcount(R"tsynchronize_sessiont	delete_op((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytdelete¦sx	
cCs8|p	i}tjj||||ƒ}|jƒ|jS(slPerform a bulk update query.

        Updates rows matched by this query in the database.

        E.g.::

            sess.query(User).filter(User.age == 25).\
                update({User.age: User.age - 10}, synchronize_session=False)

            sess.query(User).filter(User.age == 25).\
                update({"age": User.age - 10}, synchronize_session='evaluate')


        .. warning:: The :meth:`.Query.update` method is a "bulk" operation,
           which bypasses ORM unit-of-work automation in favor of greater
           performance.  **Please read all caveats and warnings below.**


        :param values: a dictionary with attributes names, or alternatively
         mapped attributes or SQL expressions, as keys, and literal
         values or sql expressions as values.   If :ref:`parameter-ordered
         mode <updates_order_parameters>` is desired, the values can be
         passed as a list of 2-tuples;
         this requires that the :paramref:`~sqlalchemy.sql.expression.update.preserve_parameter_order`
         flag is passed to the :paramref:`.Query.update.update_args` dictionary
         as well.

          .. versionchanged:: 1.0.0 - string names in the values dictionary
             are now resolved against the mapped entity; previously, these
             strings were passed as literal column names with no mapper-level
             translation.

        :param synchronize_session: chooses the strategy to update the
         attributes on objects in the session. Valid values are:

            ``False`` - don't synchronize the session. This option is the most
            efficient and is reliable once the session is expired, which
            typically occurs after a commit(), or explicitly using
            expire_all(). Before the expiration, updated objects may still
            remain in the session with stale values on their attributes, which
            can lead to confusing results.

            ``'fetch'`` - performs a select query before the update to find
            objects that are matched by the update query. The updated
            attributes are expired on matched objects.

            ``'evaluate'`` - Evaluate the Query's criteria in Python straight
            on the objects in the session. If evaluation of the criteria isn't
            implemented, an exception is raised.

            The expression evaluator currently doesn't account for differing
            string collations between the database and Python.

        :param update_args: Optional dictionary, if present will be passed
         to the underlying :func:`.update` construct as the ``**kw`` for
         the object.  May be used to pass dialect-specific arguments such
         as ``mysql_limit``, as well as other special arguments such as
         :paramref:`~sqlalchemy.sql.expression.update.preserve_parameter_order`.

         .. versionadded:: 1.0.0

        :return: the count of rows matched as returned by the database's
         "row count" feature.

        .. warning:: **Additional Caveats for bulk query updates**

            * The method does **not** offer in-Python cascading of
              relationships - it is assumed that ON UPDATE CASCADE is
              configured for any foreign key references which require
              it, otherwise the database may emit an integrity
              violation if foreign key references are being enforced.

              After the UPDATE, dependent objects in the
              :class:`.Session` which were impacted by an ON UPDATE
              CASCADE may not contain the current state; this issue is
              resolved once the :class:`.Session` is expired, which
              normally occurs upon :meth:`.Session.commit` or can be
              forced by using :meth:`.Session.expire_all`.

            * The ``'fetch'`` strategy results in an additional
              SELECT statement emitted and will significantly reduce
              performance.

            * The ``'evaluate'`` strategy performs a scan of
              all matching objects within the :class:`.Session`; if the
              contents of the :class:`.Session` are expired, such as
              via a proceeding :meth:`.Session.commit` call, **this will
              result in SELECT queries emitted for every matching object**.

            * The method supports multiple table updates, as detailed
              in :ref:`multi_table_updates`, and this behavior does
              extend to support updates of joined-inheritance and
              other multiple table mappings.  However, the **join
              condition of an inheritance mapper is not
              automatically rendered**. Care must be taken in any
              multiple-table update to explicitly include the joining
              condition between those tables, even in mappings where
              this is normally automatic. E.g. if a class ``Engineer``
              subclasses ``Employee``, an UPDATE of the ``Engineer``
              local table using criteria against the ``Employee``
              local table might look like::

                    session.query(Engineer).\
                        filter(Engineer.id == Employee.id).\
                        filter(Employee.name == 'dilbert').\
                        update({"engineer_type": "programmer"})

            * The polymorphic identity WHERE criteria is **not** included
              for single- or
              joined- table updates - this must be added **manually**, even
              for single table inheritance.

            * The :meth:`.MapperEvents.before_update` and
              :meth:`.MapperEvents.after_update`
              events **are not invoked from this method**.  Instead, the
              :meth:`.SessionEvents.after_bulk_update` method is provided to
              act upon a mass UPDATE of entity rows.

        .. seealso::

            :meth:`.Query.delete`

            :ref:`inserts_and_updates` - Core SQL tutorial

        (Rt
BulkUpdateRÄRÅRÆ(R"RRÇtupdate_argst	update_op((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR#s
	
cCsu|jjrGx8|jjD]'}||ƒ}|dk	r|}qqWnt|ƒ}|jdk	rf|S||_|j|_x!|jD]}|j||ƒq…Wx)|j	D]}|d}||dŒq©W|j
rét|j
ƒ|_n|j
r|j|ƒn|js8|jr&tjdƒ‚q8tjdƒ‚n|jr_|jr_|j|ƒ|_n|j|ƒ|_|S(NiisyNo column-based properties specified for refresh operation. Use session.expire() to reload collections and related items.s4Query contains no columns with which to SELECT from.(tdispatchtbefore_compileR%RR·R³RãR't
setup_contexttcreate_eager_joinstfrom_clauseRûtfromsRÿt_adjust_for_single_inheritancetprimary_columnsR§RGR‰tmulti_row_eager_loadersR»t_compound_eager_statementt_simple_statement(R"R³R!t	new_queryR¤R;trectstrategy((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRµ¨s:	
				c

Cs¦|jr=ttg|jD]}tj|ƒ^qŒƒ}nd|_g}tj|j||j	d|j
d|jd|j|j}x |j
D]}|j|Œ}q“W|jrÊ|j|jŒ}n|jƒ}|jƒ}tj||ƒ|_tj|g|jd|jƒ}|j|_|}x/|jjƒD]}	tj||	|	jƒ}q;W|j|ƒ|jr’|j|jj|jƒŒn|j|jŒ|S(NRXR¢R‘(R‘RûRR4tunwrap_order_byR%RtselectRÔRËRÒR³RºR$R'RìRîRMRRR5RAtsecondary_columnsRãteager_joinsRtsplice_joinststop_ontappend_fromtappend_order_bytcopy_and_processteager_order_by(
R"R¤Rktorder_by_col_exprtinnerthintRZR·RÑt
eager_join((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÖÛsJ	+	
				
		cCs5|jsd|_n|jrj|jrjttg|jD]}tj|ƒ^q7Œƒ}|j|7_n|jt	|j
jƒƒ7_tj
|j|j|jd|jd|jd|j|j}|j|_x |jD]}|j|Œ}qÞW|jr|j|jŒ}n|jr1|j|jŒn|S(NRXR¢R‘(R‘R%RžRûRR4RÛRÔRÒRNRÞRRRÜRÝRËR³RºRãR$R'RìRîRäRâ(R"R¤RkRåR·Rç((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR×
s2	(					cCs«x¤t|jjƒƒD]\}}||jkr7qn|jj}|dk	r|rg|j|ƒ}n|j|t	t	ƒ}t
jt
jj
|jƒ|ƒ|_qqWdS(s@Apply single-table-inheritance filtering.

        For all distinct single-table-inheritance mappers represented in
        the columns clause of this query, add criterion to the WHERE
        clause of the given QueryContext such that only the appropriate
        subtypes are selected from the total results.

        N(R¦R-RRvR0t_single_table_criterionR%ttraverseRgRmRR6tTrue_t_ifnoneRË(R"R¤R<RAtsingle_crit((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÓB
s
"cCst|jƒjƒS(N(RPRµR·(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt__str__X
s(¯Röt
__module__t__doc__RiRÆR—RmR¶R%R˜RÔRRœRRžRRR›RšRãR™t	frozensetRìR£RòR¤RïR§R¥RORvRFR-RvRSRt
immutabledictRRƒRÕR¸RRR$RÿRnRxt_path_registryRÌR$R!R*R3R[R]RfRlRRoRgR}RRøRR„RˆR‹RRŽRRR”R–R•R“R R¡R¢R¬R²R·RÀRÂRÃRÄR6RÅR½RÉR¾RÊRËRÎR1RØRaRÙRîRñR¨RóRRüRýRRRþRt_valuesRÇRRtpending_deprecationRRRRR"R'R(R*R.R2R¹R÷R8R‘R9R;RÖR<R=R>R?R@RRCRLRGRYRkRlRNR…R†R‡RRˆR‘R’R’R”R–R—R™R›RžR R¡R¥R©R£R´R¬R·RºR»R½R×RÉRRµRÖR×RÓRî(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR1sZ	
			"				:															
	 <	
				$?	;	!$	²		
				#	 
!	)						ÿ		s	D	U	,	
0U	* 			#						>	(	(}…3	C	$	(tForUpdateArgR+cBseZed„ƒZRS(cCs‹|dtfkrdS|dkr1t}t}nG|dkrJt}}n.|dkret}t}ntjd|ƒ‚td|d|ƒS(NR/Rt
update_nowaits"Unknown with_lockmode argument: %rR0(R%RmRiRGRHR+(R"R-R/R0((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR,_
s	
	
(RöRïtclassmethodR,(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR+^
sR&cBs eZdZd„Zd„ZRS(s:represent an entity column returned within a Query result.cOsl|tkr_|d}t|tjƒr>t|ƒr>t}q_t|tƒrVt}q_t}nt	j
|ƒS(Ni(R&RKRRSR	R€tBundlet
_BundleEntityRtobjectR®(R°RíR)R;((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR®v
s
			cCs+|jj|jƒ}|jjƒ|_|S(N(R­R®R¯R.(R"R±((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR²‚
s(RöRïRðR®R²(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR&s
s	R€cBs‰eZdZd„ZeZd„Zd„ZeZ	e
d„ƒZe
d„ƒZd„Z
d„Zd„Zd	„Zd
„Zd„ZRS(s mapper/class/AliasedClass entitycCs>|js||_n|jj|ƒ|g|_||_dS(N(R(R'RIR#R°(R"R­R;((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR$‹
s
	cCsŽ|j|_||_|j|_|j|_|j|_|j|_||_|jri|jj	|_
n|jjj|_
|jj
|_dS(N(R0R=R6R/twith_polymorphic_mapperst_with_polymorphicRÏt_polymorphic_discriminatorR~R¼R±RçRöRóRÍ(R"R<R=((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR9•
s			cCs—|jrtdƒ‚n|dkr8|j|jƒdS|jj||ƒ\}}||_||_||_|j	|jt
j||jjƒƒdS(sÃReceive an update from a call to query.with_polymorphic().

        Note the newer style of using a free standing with_polymporphic()
        construct doesn't make use of this method.


        s6Can't use with_polymorphic() against an Aliased objectN(
R/RXR%R]R0t_with_polymorphic_argsRýRþR6R3R4R5R7(R"R­RÑR6RÏtmappersRX((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRФ
s						cCs
|jjS(N(R0Rç(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyROÄ
scCs|jS(N(R~(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRhÈ
scCst|jr2|jr.|j|jjkr.tSntS|jrd|jjrT||jkS||jkSn|j|jƒS(N(R/t_base_aliasR~RiRmt_use_mapper_pathRýRw(R"R;((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÌ
s			
cCs|jj|ƒdS(N(R'RI(R"R­tsel((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÚ
scCsyd}|js6|jr?|jj|jdƒ}q?n	|j}|rl|jrc|j|jƒ}qu|}n	|j}|S(N(R%R/R RaR0R=RStwrap(R"R­R¤RARš((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt_get_entity_clausesÝ
s						cCsê|j||ƒ}|jr6|r6|j|jƒ}n|sH|j}n|ry|jjrytj|j|jjƒ}n|j	|kr|j
}|j}n
d}}t
j|j|||j|d|d|d|jƒ}||jfS(NRªR«tpolymorphic_discriminator(RRARR0t_requires_row_aliasingR4R5R6R7R(R§R«R%Rt_instance_processorRÍRþR±(R"R­R¤R¯RARªR«t	_instance((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt
row_processorñ
s.	
cCs¿|j||ƒ}|j|jf7_|jtkr{|jjr{|jj|_|r{|jtj|jƒƒ|_q{nt	j
||j||j||jd|j
d|jd|jƒdS(NR1RªR(RRÒR6R‘RmR0t
adapt_listRR)Rt_setup_entity_queryRÍRÔRýR§Rþ(R"R­R¤RA((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÏs		cCs
t|jƒS(N(RPR0(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRî,s(RöRïRðR$Ritsupports_single_entityR9RÐtidt	filter_fnRøRORhRRRR
RÏRî(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR€ˆ
s							#	RùcBsneZdZeZeZeZeZd„ZdZ
dZd„Zd„Z
ed„ƒZd„Zd„ZRS(s>A grouping of SQL expressions that are returned by a :class:`.Query`
    under one namespace.

    The :class:`.Bundle` essentially allows nesting of the tuple-based
    results returned by a column-oriented :class:`.Query` object.  It also
    is extensible via simple subclassing, where the primary capability
    to override is that of how the set of expressions should be returned,
    allowing post-processing as well as custom return types, without
    involving ORM identity-mapped classes.

    .. versionadded:: 0.9.0

    .. seealso::

        :ref:`bundles`

    cOsb||_|_||_tƒ|_|_|jjd„|Dƒƒ|jd|jƒ|_dS(sQConstruct a new :class:`.Bundle`.

        e.g.::

            bn = Bundle("mybundle", MyClass.x, MyClass.y)

            for row in session.query(bn).filter(
                    bn.c.x == 5).filter(bn.c.y == 4):
                print(row.mybundle.x, row.mybundle.y)

        :param name: name of the bundle.
        :param \*exprs: columns or SQL expressions comprising the bundle.
        :param single_entity=False: if True, rows for this :class:`.Bundle`
         can be returned as a "single entity" outside of any enclosing tuple
         in the same manner as a mapped entity.

        css*|] }t|d|jƒ|fVqdS(RéN(RTt_label(RÞRÁ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pys	<genexpr>cst
single_entityN(	R¼RtexprsRRßR
RR\R(R"R¼RR§((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR$Ns	cCs,|jj|jƒ}|jj|jƒ|S(N(R­R®R¯R(R"tcloned((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR²ƒscCstjdt|jŒS(Ntgroup(Rt
ClauseListRmRß(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRňscCs
|jƒjS(N(RÅR7(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR7‹scCs|jƒ}||_|S(s<Provide a copy of this :class:`.Bundle` passing a new label.(R²R¼(R"R¼R((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÏs	cs(tjd|ƒ‰‡‡fd†}|S(sÌProduce the "row processing" function for this :class:`.Bundle`.

        May be overridden by subclasses.

        .. seealso::

            :ref:`bundles` - includes an example of subclassing.

        R¯cs#ˆgˆD]}||ƒ^q
ƒS(N((trowtproc(tkeyed_tupletprocs(sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR¢s(Rtlightweight_named_tuple(R"R­RR³R((RRsI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pytcreate_row_processor–s
N(RöRïRðRmRR…RER/R$R%R
RßR²RÅRøR7RÃR(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRù0s				RúcBs_eZed„Zed„ƒZd„Zed„ƒZd„Zd„Z	d„Z
d„ZRS(cCs»|jj|ƒ||_|_t|ƒ|_|j|_g|_|r“xF|jD]8}t|t	ƒryt
||ƒqTt||d|ƒqTWnd|_d„|_
|jj|_dS(Nt	namespacecSs|S(N((RŒ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt<lambda>¸s((R'RItbundleR°ROR¼R±RRKRùRúRR#RRR
(R"R­Rtsetup_entitiesR°((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR$¨s		cCs5x.|jD]}|j}|dk	r
|Sq
WdSdS(N(R'R~R%(R"R,R†((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR~¼s
	cCstS(N(Rm(R"R;((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÅscCs5x.|jD]}|j}|dk	r
|Sq
WdSdS(N(R'RhR%(R"R,R†((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRhÊs
	cCs@t||jdtƒ}x!|jD]}|j||ƒq"WdS(NR(RúRRmR'R(R"R­RRßR,((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÓscCs(x!|jD]}|j||ƒq
WdS(N(R'R9(R"R<R=R,((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR9ÜscCs(x!|jD]}|j||ƒq
WdS(N(R'RÏ(R"R­R¤R,((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÏàscCs\tg|jD]}|j|||ƒ^q
Œ\}}|jj|||ƒ}||jfS(N(tzipR'R
RRR±(R"R­R¤R¯R,RR³R((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR
äs
1(RöRïRiR$RøR~RRhRR9RÏR
(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRú§s							RcBseeZdZd	d„ZeZed„ƒZd„Z	d„Z
d„Zd„Zd„Z
d„ZRS(
sColumn/expression based entity.cst||_||_t}t}t|tjƒr`tj|ƒ}|j	|_
t}t}d}nƒt|tj
tjfƒrãt|ddƒ}|dk	r¢t}n|j|_
|jƒ}t}t|tƒrãt||ƒdSnt|tjƒs[t|dƒrBx;|jD])}||kr$Pnt||d|ƒqWdSntjd|fƒ‚n$|st|ddƒ|_
t}n|j|_}|jr§d„|_ntjƒ‰‡fd†|_|jr÷t|dtƒr÷|j |j
ƒ}n|j!j"|ƒ||_#t$ƒ|_%t$|j&ƒ|_'}	|st||_(|rV|g|_)n	g|_)t$|j)ƒ|_*nügt+j,|iƒD]}
d	|
j-kr‡|
^q‡}tj.g|D]"}
d	|
j-krµ|
j-d	^qµƒ|_)t$g|D]4}
d	|
j-krí|	j/|
j&ƒrí|
j-d	^qíƒ|_*|j)rI|j)d
|_(n'|jdk	rg|j|_(n	d|_(dS(NRUt_select_iterableRs<SQL expression, column, or mapped entity expected - got '%r'RécSs|S(N((RŒ((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR!scsˆƒS(N((RŒ(tcounter(sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR$st
is_literalR^i(0R°RRiRmRKRRSRRÀR¼R±R%RRVRRQRTRét_query_clause_elementRùRút
ColumnElementRDR!RRGR‰ROthashableRR"RRÃR'RIRR¦RÒt
_from_objectstactual_fromsR~R#t_from_entitiesRtiterateR`tunique_listtintersection(R"R­RRtsearch_entitiestcheck_columnt_entityRßttype_R(Rqtall_elements((R"sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR$òsˆ				
					
(
+	cCs8|jdk	r|jS|jr0t|jƒdSdSdS(Ni(R~R%R(Rû(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRh^s
	cCsCt||j|jƒƒ}|j|_|j|_|j|_dS(N(Rtcorresponding_columnRR±R~R#(R"R­RRß((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRgscCsPd|jkr|j|_n|jj|jjƒrL|jj|jƒndS(NR6(R¯R6R(R,R'RÒtadd(R"R<R=((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR9mscCsP|jdkrtSt|ƒr,||jkSt|jƒoK|j|jƒSdS(N(R~R%RmRRw(R"R;((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRts
cCs{d|f|jkr+|jd|f}n|j|jttƒ}|jr_|jj|}n|j|ƒ}||jfS(Ntfetch_column(	RRgRRmRiRAR
t_getterR±(R"R­R¤R¯Rtgetter((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR
€s	cCsW|j|jttƒ}|jt|jƒ7_|jj|ƒ||jd|f<dS(NR4(	RgRRmRiRÒRNRÔRIR(R"R­R¤R((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRÏŒscCs
t|jƒS(N(RPR(R"((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRî“sN(RöRïRðR%R$RmR
RøRhRR9RR
RÏRî(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRïsj						cBseZdZd„ZRS(RÕRARÒt
for_updateR­RRñR¨tinvoke_all_eagersR©R«RÔRÝRäRÞRÐtpropagate_optionsRR·RÑRËR‘R³RãtrunidtpartialscCsc|jdk	rbt|jtjƒrS|jjrS|jjrS|jjƒ|_q|j|_n-d|_|j	|_
|j|_|j
|_t|_d|_d|_d|_||_|j|_|j|_|j|_|j|_|j|_|j|_g|_ g|_!g|_"i|_#g|_$t%d„|j&Dƒƒ|_'|j(j)ƒ|_*dS(Ncss|]}|jr|VqdS(N(tpropagate_to_loaders(RÞRk((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pys	<genexpr>Ás((+R™R%RKRRLt_textualR¢tapply_labelsR·RORÑR˜RËRR‘RmRÕRARÒR7R­RRïRñR£R¨RòR8R¤R©R¥R«RÔRÝRäRÞRÐR¦RR9RR.R(R"R­((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR$¢s8

											(smulti_row_eager_loaderssadaptersfromss
for_updatesqueryssessions	autoflushspopulate_existingsinvoke_all_eagerss
version_checks
refresh_statesprimary_columnsssecondary_columnsseager_order_byseager_joinsscreate_eager_joinsspropagate_optionss
attributess	statementsfrom_clauseswhereclausesorder_byslabelss_for_update_argsrunidspartials(RöRït	__slots__R$(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR—stAliasOptioncBseZd„Zd„ZRS(cCs
||_dS(s!Return a :class:`.MapperOption` that will indicate to the :class:`.Query`
        that the main table has been aliased.

        This is a seldom-used option to suit the
        very rare case that :func:`.contains_eager`
        is being used in conjunction with a user-defined SELECT
        statement that aliases the parent table.  E.g.::

            # define an aliased UNION called 'ulist'
            ulist = users.select(users.c.user_id==7).\
                            union(users.select(users.c.user_id>7)).\
                            alias('ulist')

            # add on an eager load of "addresses"
            statement = ulist.outerjoin(addresses).\
                            select().apply_labels()

            # create query, indicating "ulist" will be an
            # alias for the main table, "addresses"
            # property should be eager loaded
            query = session.query(User).options(
                                    contains_alias(ulist),
                                    contains_eager(User.addresses))

            # then get results via the statement
            results = query.from_statement(statement).all()

        :param alias: is the string name of an alias, or a
         :class:`~.sql.expression.Alias` object representing
         the alias.

        N(RM(R"RM((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR$Ès!cCsRt|jtjƒr3|jƒjj|jƒ}n	|j}tj|ƒ|_dS(N(	RKRMRRSRR2R4R5RS(R"R­RM((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyRës	(RöRïR$R(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyR@Æs	#N(:Rðt	itertoolsRtRRRRRRœRtbaseRRR	R
RRt
path_registryR
RRRRR€RRRRRGRRtsql.expressionRR4RRtsql.baseRRt__all__trootRót_self_inspectstclass_loggerRûRtsql.selectableRöR+R&R€RùRúRRtMapperOptionR@(((sI/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/query.pyt<module>sL..(.		ÿÿÿÿÿÿÿÿÿÿÿÿÿ5¨	vH¨/