%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyc

�
��4]c@@s�dZddlmZddlmZddlmZddlmZddlm	Z	dd	lm
Z
dd
lmZddlmZdgZ
e
jdefd
��Y�ZdS(s|MapperProperty implementations.

This is a private module which defines the behavior of individual ORM-
mapped attributes.

i(tabsolute_importi(t
attributes(tPropComparator(tStrategizedProperty(t_orm_full_deannotatei(tlog(tutil(t
expressiontColumnPropertycB@s�eZdZdZd#Zejd	d$�d��Zejdd�d��Z	d�Z
ed��Zd�Z
d�Zd�Zejd�Zd�Zd ejefd!��YZd"�ZRS(%s�Describes an object attribute that corresponds to a table column.

    Public constructor is the :func:`.orm.column_property` function.

    tcolumnt
_orig_columnstcolumnstgrouptdeferredt
instrumenttcomparator_factoryt
descriptort	extensiontactive_historytexpire_on_flushtinfotdoctstrategy_keyt_creation_ordert_is_polymorphic_discriminatort_mapped_by_synonymt_deferred_column_loaders0.7s�:class:`.AttributeExtension` is deprecated in favor of the :class:`.AttributeEvents` listener interface.  The :paramref:`.column_property.extension` parameter will be removed in a future release.cO@s
tt|�j�g|D]}tj|�^q|_g|D]}tjt|��^q?|_|jdd�|_
|jdt�|_|jdt
�|_|jd|jj�|_|jdd�|_|jdd�|_|jdt�|_|jdt
�|_d	|kr2|jd	�|_nd
|krS|jd
�|_nNxKt|j�D]1}t|d
d�}|dk	rc||_PqcqcWd|_|r�td|jjdjt|j���f��ntj |�d|jfd
|jff|_!dS(s\Provide a column-level property for use with a Mapper.

        Column-based properties can normally be applied to the mapper's
        ``properties`` dictionary using the :class:`.Column` element directly.
        Use this function when the given column is not directly present within
        the mapper's selectable; examples include SQL expressions, functions,
        and scalar SELECT queries.

        Columns that aren't present in the mapper's selectable won't be
        persisted by the mapper and are effectively "read-only" attributes.

        :param \*cols:
              list of Column objects to be mapped.

        :param active_history=False:
          When ``True``, indicates that the "previous" value for a
          scalar attribute should be loaded when replaced, if not
          already loaded. Normally, history tracking logic for
          simple non-primary-key scalar values only needs to be
          aware of the "new" value in order to perform a flush. This
          flag is available for applications that make use of
          :func:`.attributes.get_history` or :meth:`.Session.is_modified`
          which also need to know
          the "previous" value of the attribute.

        :param comparator_factory: a class which extends
           :class:`.ColumnProperty.Comparator` which provides custom SQL
           clause generation for comparison operations.

        :param group:
            a group name for this property when marked as deferred.

        :param deferred:
              when True, the column property is "deferred", meaning that
              it does not load immediately, and is instead loaded when the
              attribute is first accessed on an instance.  See also
              :func:`~sqlalchemy.orm.deferred`.

        :param doc:
              optional string that will be applied as the doc on the
              class-bound descriptor.

        :param expire_on_flush=True:
            Disable expiry on flush.   A column_property() which refers
            to a SQL expression (and not a single table-bound column)
            is considered to be a "read only" property; populating it
            has no effect on the state of data, and it can only return
            database state.   For this reason a column_property()'s value
            is expired whenever the parent object is involved in a
            flush, that is, has any kind of "dirty" state within a flush.
            Setting this parameter to ``False`` will have the effect of
            leaving any existing value present after the flush proceeds.
            Note however that the :class:`.Session` with default expiration
            settings still expires
            all attributes after a :meth:`.Session.commit` call, however.

        :param info: Optional data dictionary which will be populated into the
            :attr:`.MapperProperty.info` attribute of this object.

        :param extension:
            an :class:`.AttributeExtension` instance, or list of extensions,
            which will be prepended to the list of attribute listeners for the
            resulting descriptor placed on the class.

        RR
t_instrumentRRRRRRRs.%s received unexpected keyword argument(s): %ss, RN("tsuperRt__init__Rt_labeledR
RRtpoptNoneRtFalseR
tTrueRt	__class__t
ComparatorRRRRRRRtreversedtgetattrt	TypeErrort__name__tjointsortedtkeysRtset_creation_orderR(tselfRtkwargstctcolR((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyR:s:K%+		.
ssqlalchemy.orm.statessqlalchemy.orm.strategiescC@s+|jj|jj|j|j�|j�S(N(t
InstanceStatet"_instance_level_callable_processortparentt
class_managertLoadDeferredColumnstkey(R-tstatet
strategies((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt&_memoized_attr__deferred_column_loader�s		cC@s|jS(ssAllow the ColumnProperty to work in expression before it is turned
        into an instrumented attribute.
        (R(R-((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt__clause_element__�scC@s|jdS(sJReturn the primary column or expression for this ColumnProperty.

        i(R(R-((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyR�sc	C@sH|js
dStj|j|jd|j||�d|d|j�dS(Nt
comparatortparententityR(RRtregister_descriptortclass_R6RR(R-tmapper((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pytinstrument_class�s		cC@s~tt|�j�t|j�dkrzt|jj�j|j�rzt	j
d|j|jd|jd|jf�ndS(Nis�On mapper %s, primary key column '%s' is being combined with distinct primary key column '%s' in attribute '%s'. Use explicit properties to give each column its own mapped attribute name.i(RRtdo_inittlenRtsetR3tprimary_keyt
issupersetRtwarnR6(R-((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyRA�s'cC@s(td|jd|jd|j|j�S(NR
RR(RR
RRR(R-((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pytcopy�s
		cC@s"|j|j�j||d|�S(Ntpassive(tget_implR6tget_committed_value(R-R7tdict_R	RH((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt
_getcommitted�sc	C@s�|js
dS|j|krj||j}	|s?|	||j<q�|j|j�}
|
j|||	d�n7|jr�|j|kr�|j||jgdt�ndS(Nt	no_loader(RR6RIRCR thas_identityt_expire_attributesR"(R-tsessiontsource_statetsource_dictt
dest_statet	dest_dicttloadt
_recursivet_resolve_conflict_maptvaluetimpl((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pytmerge�s	
R$cB@sAeZdZdZd�Zd�Zd�Zd�Zd�ZRS(	s�Produce boolean, comparison, and other operators for
        :class:`.ColumnProperty` attributes.

        See the documentation for :class:`.PropComparator` for a brief
        overview.

        .. seealso::

            :class:`.PropComparator`

            :class:`.ColumnOperators`

            :ref:`types_operators`

            :attr:`.TypeEngine.comparator_factory`

        R:RcC@sO|jr |j|jjd�S|jjdji|jd6|jd6�SdS(NiR<tparentmapper(tadaptertpropRt	_annotatet
_parententity(R-((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt#_memoized_method___clause_element__s	
cC@s6|j�}y|jSWntk
r1|jjSXdS(N(R:RtAttributeErrorR](R-tce((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt_memoized_attr_info,s

cC@st|j�|�S(s�proxy attribute access down to the mapped column.

            this allows user-defined comparison methods to be accessed.
            (R&R:(R-R6((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt_fallback_getattr3scO@s||j�||�S(N(R:(R-toptotherR.((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pytoperate:scK@s(|j�}||j||�||�S(N(R:t_bind_param(R-ReRfR.R0((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pytreverse_operate=s(R:R(	R(t
__module__t__doc__t	__slots__R`RcRdRgRi(((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyR$
s	
			cC@st|jjj�d|jS(Nt.(tstrR3R>R(R6(R-((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt__str__As(R
RRR
RRRRRRRRRRRRR(s0.7s�:class:`.AttributeExtension` is deprecated in favor of the :class:`.AttributeEvents` listener interface.  The :paramref:`.column_property.extension` parameter will be removed in a future release.(R(RjRktstrategy_wildcard_keyRlRtdeprecated_paramsRtdependenciesR9R:tpropertyRR@RARGRtPASSIVE_OFFRLRZt
MemoizedSlotsRR$Ro(((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyRs@	s						7N(Rkt
__future__RtRt
interfacesRRRRRtsqlRt__all__tclass_loggerR(((sL/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/properties.pyt<module>
s		

Zerion Mini Shell 1.0