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    
idna / lib / python2.7 / site-packages / sqlalchemy / orm / __init__.pyc
Size: Mime:
ó
‹EYc@sPdZddlmZddlmZmZmZmZmZm	Z	ddl
mZmZm
Z
ddlmZmZmZddlmZmZmZmZmZmZmZmZddlmZddlmZdd	lm Z m!Z!m"Z"dd
lm#Z#m$Z$ddl%m&Z&m'Z'm(Z(m)Z)m*Z*ddl+m,Z,dd
lmZ-ddl.m/Z/m0Z0m1Z1ddl2m3Z3ddlmZ4ddlm5Z6d)d„Z8e3edƒZ9d„Z:d„Z;e3edƒZ<e3e!dƒZ=d„Z>d„Z?e3edƒZe3e"dƒZ@e3e dƒZAe4jBddd ƒd!„ƒZCd"„ZDdd#lmEZEeEjFjGZFeEjFjHZIeEjJjGZJeEjKjGZKeEjLjGZLeEjMjGZMeEjNjGZNeEjOjGZOeEjPjHZPeEjQjGZQeEjRjHZReEjSjGZSeEjTjGZTeEjUjGZUdd$lEmVZVd%„ZWd&„ZXe3e/d'ƒZYd(„ZZeZe[ƒƒd)S(*s±
Functional constructs for ORM configuration.

See the SQLAlchemy object relational tutorial and mapper configuration
documentation for an overview of how this module is used.

i(texc(tMappert_mapper_registrytclass_mappertconfigure_mapperst
reconstructort	validates(tEXT_CONTINUEtEXT_STOPtPropComparator(tMapperExtensiontSessionExtensiontAttributeExtension(taliasedtjoint
object_mappert	outerjointpolymorphic_uniontwas_deletedtwith_parenttwith_polymorphic(tColumnProperty(tRelationshipProperty(tComparablePropertytCompositePropertytSynonymProperty(tforeigntremote(tSessiontobject_sessiontsessionmakertmake_transienttmake_transient_to_detached(tscoped_session(tmapper(tAliasOptiontQuerytBundlei(tpublic_factory(tutil(t
strategiescKs@|jdtƒ|jdtƒ|jdtƒtd||S(sñCreate a new :class:`.Session`
    with no automation enabled by default.

    This function is used primarily for testing.   The usual
    route to :class:`.Session` creation is via its constructor
    or the :func:`.sessionmaker` function.

    :param bind: optional, a single Connectable to use for all
      database access in the created
      :class:`~sqlalchemy.orm.session.Session`.

    :param \*\*kwargs: optional, passed through to the
      :class:`.Session` constructor.

    :returns: an :class:`~sqlalchemy.orm.session.Session` instance

    The defaults of create_session() are the opposite of that of
    :func:`sessionmaker`; ``autoflush`` and ``expire_on_commit`` are
    False, ``autocommit`` is True.  In this sense the session acts
    more like the "classic" SQLAlchemy 0.3 session with these.

    Usage::

      >>> from sqlalchemy.orm import create_session
      >>> session = create_session()

    It is recommended to use :func:`sessionmaker` instead of
    create_session().

    t	autoflusht
autocommittexpire_on_committbind(t
setdefaulttFalsetTrueR(R,tkwargs((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pytcreate_sessionIss.orm.relationshipcOs
t||ŽS(s#A synonym for :func:`relationship`.(trelationship(targtkw((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pytrelationpscKsd|d<t||S(siConstruct a dynamically-loading mapper property.

    This is essentially the same as
    using the ``lazy='dynamic'`` argument with :func:`relationship`::

        dynamic_loader(SomeClass)

        # is the same as

        relationship(SomeClass, lazy="dynamic")

    See the section :ref:`dynamic_relationship` for more details
    on dynamic loading.

    tdynamictlazy(R2(targumentR4((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pytdynamic_loadervs
s.orm.column_propertys.orm.compositecKs
||fS(sCreate a back reference with explicit keyword arguments, which are the
    same arguments one can send to :func:`relationship`.

    Used with the ``backref`` keyword argument to :func:`relationship` in
    place of a string argument, e.g.::

        'items':relationship(
            SomeItem, backref=backref('parent', lazy='subquery'))

    .. seealso::

        :ref:`relationships_backref`

    ((tnameR0((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pytbackrefŽscOstdt||ŽS(s¹Indicate a column-based mapped attribute that by default will
    not load unless accessed.

    :param \*columns: columns to be mapped.  This is typically a single
     :class:`.Column` object, however a collection is supported in order
     to support multiple columns mapped under the same attribute.

    :param \**kw: additional keyword arguments passed to
     :class:`.ColumnProperty`.

    .. seealso::

        :ref:`deferred`

    tdeferred(RR/(tcolumnsR4((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pyR<¡ss.orm.mappers.orm.synonyms.orm.comparable_propertys0.7tmessagesA:func:`.compile_mappers` is renamed to :func:`.configure_mappers`cCstƒdS(sZInitialize the inter-mapper relationships of all mappers that have
    been defined.

    N(R(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pytcompile_mappers¼scCsgtjjƒzEx>trPy tjƒ\}}|jƒWqtk
rLqXqWWdtjjƒXdS(sRemove all mappers from all classes.

    This function removes all instrumentation from classes and disposes
    of their associated mappers.  Once called, the classes are unmapped
    and can be later re-mapped with new mappers.

    :func:`.clear_mappers` is *not* for normal use, as there is literally no
    valid usage for it outside of very specific testing scenarios. Normally,
    mappers are permanent structural components of user-defined classes, and
    are never discarded independently of their class.  If a mapped class
    itself is garbage collected, its mapper is automatically disposed of as
    well. As such, :func:`.clear_mappers` is only for usage in test suites
    that re-use the same classes with different mappings, which is itself an
    extremely rare use case - the only such use case is in fact SQLAlchemy's
    own test suite, and possibly the test suites of other ORM extension
    libraries which intend to test various combinations of mapper construction
    upon a fixed set of classes.

    N(t	mapperlibt_CONFIGURE_MUTEXtacquireRtpopitemtdisposetKeyErrortrelease(R"tb((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pyt
clear_mappersÆs
	
(tstrategy_options(tLoadcOs
t||ŽS(s#A synonym for :func:`joinedload()`.(t
joinedload(targsR0((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pyt	eagerloadúscOs
t||ŽS(s&A synonym for :func:`joinedload_all()`(tjoinedload_all(RLR0((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pyt
eagerload_allÿss.orm.contains_aliascsrddlm}ddlm}ddlm}ddl‰t‡fd†|jƒDƒƒatj	j
dƒdS(	Ni(R'i(R6(teventsiÿÿÿÿc3s9|]/\}}|jdƒp*ˆj|ƒs|VqdS(t_N(t
startswithtismodule(t.0R:tobj(t_inspect(sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pys	<genexpr>s	ssqlalchemy.orm(tR'R6RPtinspecttsortedtitemst__all__t_sa_utiltdependenciestresolve_all(tlclstsa_utilR6RP((RVsL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pyt__gos"N(\t__doc__RWRR"RRRRRRt
interfacesRRR	tdeprecated_interfacesR
RRR'R
RRRRRRRt
propertiesRt
relationshipsRtdescriptor_propsRRRRRtsessionRRRRR tscopingR!R@tqueryR#R$R%tutil.langhelpersR&R\R(t_strategiestNoneR1R2R5R9tcolumn_propertyt	compositeR;R<tsynonymtcomparable_propertyt
deprecatedR?RHRIRKt_unbound_fnt_unbound_all_fnRNtcontains_eagertdefertundefert
undefer_groupt	load_onlytlazyloadtlazyload_alltsubqueryloadtsubqueryload_allt
immediateloadtnoloadtdefaultloadRJRMROtcontains_aliasRatlocals(((sL/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/__init__.pyt<module>sf.:
($