PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 131
 ec@@sdZddlmZddlmZddlmZddlZddlZddl m Z ddl m Z dd l m Z dd l mZdd l mZdd l mZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddl m!Z!ddl m Z"ddl m#Z#ddl m$Z$ddl m%Z%ddl m&Z&dd l mZddl&mZ'dd l&m(Z(dd!l&m)Z)dd"l&m*Z*dd#l&m+Z+dd l&mZ,dd$l&m-Z-dd%l.m/Z/dd&lm0Z0ej1Z2e3Z4d'Z5d(Z6e7a8ej9d)Z:ej;j<Z=e#j>e$j?d*eee'j@efd+YZAd,eBfd-YZCd.ZDd/ZEejFd0d1ZGejFd0d2ZHd3ZId4ZJd5ZKd6ZLd7eMfd8YZNdS(9s5Logic to map Python classes to and from selectables. Defines the :class:`~sqlalchemy.orm.mapper.Mapper` class, the central configurational unit which associates a class with a database table. This is a semi-private module; the main configurational API of the ORM is available in :class:`~sqlalchemy.orm.`. i(tabsolute_import(tdeque(tchainNi(t attributes(texc(tinstrumentation(tloading(t properties(tutil(t_class_to_mapper(t _state_mapper(t class_mapper(t state_str(t_MappedAttribute(tEXT_SKIP(tInspectionAttr(tMapperProperty(tORMEntityColumnsClauseRole(tORMFromClauseRole(tStrategizedProperty(t PathRegistryi(tevent(t inspection(tlog(tschema(tsql(tbase(t coercions(t expression(t operators(troles(tvisitors(tLABEL_STYLE_TABLENAME_PLUS_COL(t HasMemoizedcC@stttSWdQXdS(N(t_CONFIGURE_MUTEXtsett_mapper_registries(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_all_registries@scc@s4x-tD]"}x|jD] }|VqWq WdS(N(R%t_mappers_to_configure(tregtmapper((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_unconfigured_mappersEst NO_ATTRIBUTEtMappercB@sReZdZeZeZejdddfeeeeeeeeeeeeeeeee e eeee ee eeddZ e Z eZ e dZdZe dZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZeZ eZ!eZ"e ej#dd d Z$ej%d Z&d Z'd Z(dZ)dZ*dZ+dZ,dZ-dZ.dZ/edZ0eZ1e2j3dZ4e2j3dZ5e2j3dZ6ej7ddZ8ej7de e dZ9ej7ddZ:dZ;dZ<dZ=d Z>d!Z?e d"Z@d#ZAd$ZBd%ZCd&ZDd'ZEd(ZFe d)ZGd*ZHe d+ZId,ZJd-ZKe2j3d.ZLe2j3d/ZMe2j3d0ZNe2j3d1ZOe2j3d2ZPeNZQe2j3d3ZRe2j3d4ZSe2j3d5ZTe2j3d6ZUe2j3d7ZVe2j3d8ZWe2j3d9ZXe2j3d:ZYe2jZd;Z[ej%d<Z\e d=Z]eeed>Z^e2j3d?Z_e d@Z`fdAZae2j3dBZbedCZce2j3dDZde2j3dEZee2j3ej7ddFZfe2j3ej7ddGZge dHZhe2j3dIZiej7dJe2j3dKZje2j3ej7ddLZkdMZle2j3dNZme2j3dOZndPZoe2j3dQZpdRZqdSZrdTZsdUZtdVZudWZve2j3dXZwdYZxdZZye d[Zzed\Z{eed]Z|ed^Z}d_Z~ejd`ZdaZe2j3dbZe2j3dcZe2j3ddZe2j3deZe2j3dfZejdgZdhZdiZdjZejdkZdlZdmZdnZej7dodpZe2j3dqZedrZe2j3dsZe2j3dtZduZej%dvZRS(wsDefines an association between a Python class and a database table or other relational structure, so that ORM operations against the class may proceed. The :class:`_orm.Mapper` object is instantiated using mapping methods present on the :class:`_orm.registry` object. For information about instantiating new :class:`_orm.Mapper` objects, see :ref:`orm_mapping_classes_toplevel`. t non_primarys1.3sThe :paramref:`.mapper.non_primary` parameter is deprecated, and will be removed in a future release. The functionality of non primary mappers is now better suited using the :class:`.AliasedClass` construct, which can also be used as the target of a :func:`_orm.relationship` in 1.3.idcC@s2tj|td|_d|jj|jjf|_t|_tj ||_ ||_ | |_ t | tr| |_t|_n | |_| tkrt|_n$| tkrd|_n | |_||_t|_||_|tk rtjtj||_n t|_||_||_|p3i|_g|_||_||_ ||_!| tk rtjtj"| ddnt|_#g|_$tj%|_&||_'||_(||_)t|_*t|_+t|_,i|_-||_.t|_/||_0|jo |j rt|_1n ||_1|j2|||_3||_4| tkr[i|_5n | |_5|tk rtj6||_7n t|_7|rtj6||_8n t|_8t9t|j:j;j<|||j=|j>|j?|j@|jA|jBjC||jDd|jEWdQXdS(sUODirect constructor for a new :class:`_orm.Mapper` object. The :func:`_orm.mapper` function is normally invoked through the use of the :class:`_orm.registry` object through either the :ref:`Declarative ` or :ref:`Imperative ` mapping styles. .. versionchanged:: 1.4 The :func:`_orm.mapper` function should not be called directly for classical mapping; for a classical mapping configuration, use the :meth:`_orm.registry.map_imperatively` method. The :func:`_orm.mapper` function may become private in a future release. Parameters documented below may be passed to either the :meth:`_orm.registry.map_imperatively` method, or may be passed in the ``__mapper_args__`` declarative class attribute described at :ref:`orm_declarative_mapper_options`. :param class\_: The class to be mapped. When using Declarative, this argument is automatically passed as the declared class itself. :param local_table: The :class:`_schema.Table` or other selectable to which the class is mapped. May be ``None`` if this mapper inherits from another mapper using single-table inheritance. When using Declarative, this argument is automatically passed by the extension, based on what is configured via the ``__table__`` argument or via the :class:`_schema.Table` produced as a result of the ``__tablename__`` and :class:`_schema.Column` arguments present. :param always_refresh: If True, all query operations for this mapped class will overwrite all data within object instances that already exist within the session, erasing any in-memory changes with whatever information was loaded from the database. Usage of this flag is highly discouraged; as an alternative, see the method :meth:`_query.Query.populate_existing`. :param allow_partial_pks: Defaults to True. Indicates that a composite primary key with some NULL values should be considered as possibly existing within the database. This affects whether a mapper will assign an incoming row to an existing identity, as well as if :meth:`.Session.merge` will check the database first for a particular primary key value. A "partial primary key" can occur if one has mapped to an OUTER JOIN, for example. :param batch: Defaults to ``True``, indicating that save operations of multiple entities can be batched together for efficiency. Setting to False indicates that an instance will be fully saved before saving the next instance. This is used in the extremely rare case that a :class:`.MapperEvents` listener requires being called in between individual row persistence operations. :param column_prefix: A string which will be prepended to the mapped attribute name when :class:`_schema.Column` objects are automatically assigned as attributes to the mapped class. Does not affect :class:`.Column` objects that are mapped explicitly in the :paramref:`.mapper.properties` dictionary. This parameter is typically useful with imperative mappings that keep the :class:`.Table` object separate. Below, assuming the ``user_table`` :class:`.Table` object has columns named ``user_id``, ``user_name``, and ``password``:: class User(Base): __table__ = user_table __mapper_args__ = {'column_prefix':'_'} The above mapping will assign the ``user_id``, ``user_name``, and ``password`` columns to attributes named ``_user_id``, ``_user_name``, and ``_password`` on the mapped ``User`` class. The :paramref:`.mapper.column_prefix` parameter is uncommon in modern use. For dealing with reflected tables, a more flexible approach to automating a naming scheme is to intercept the :class:`.Column` objects as they are reflected; see the section :ref:`mapper_automated_reflection_schemes` for notes on this usage pattern. :param concrete: If True, indicates this mapper should use concrete table inheritance with its parent mapper. See the section :ref:`concrete_inheritance` for an example. :param confirm_deleted_rows: defaults to True; when a DELETE occurs of one more rows based on specific primary keys, a warning is emitted when the number of rows matched does not equal the number of rows expected. This parameter may be set to False to handle the case where database ON DELETE CASCADE rules may be deleting some of those rows automatically. The warning may be changed to an exception in a future release. .. versionadded:: 0.9.4 - added :paramref:`.mapper.confirm_deleted_rows` as well as conditional matched row checking on delete. :param eager_defaults: if True, the ORM will immediately fetch the value of server-generated default values after an INSERT or UPDATE, rather than leaving them as expired to be fetched on next access. This can be used for event schemes where the server-generated values are needed immediately before the flush completes. By default, this scheme will emit an individual ``SELECT`` statement per row inserted or updated, which note can add significant performance overhead. However, if the target database supports :term:`RETURNING`, the default values will be returned inline with the INSERT or UPDATE statement, which can greatly enhance performance for an application that needs frequent access to just-generated server defaults. .. seealso:: :ref:`orm_server_defaults` .. versionchanged:: 0.9.0 The ``eager_defaults`` option can now make use of :term:`RETURNING` for backends which support it. :param exclude_properties: A list or set of string column names to be excluded from mapping. See :ref:`include_exclude_cols` for an example. :param include_properties: An inclusive list or set of string column names to map. See :ref:`include_exclude_cols` for an example. :param inherits: A mapped class or the corresponding :class:`_orm.Mapper` of one indicating a superclass to which this :class:`_orm.Mapper` should *inherit* from. The mapped class here must be a subclass of the other mapper's class. When using Declarative, this argument is passed automatically as a result of the natural class hierarchy of the declared classes. .. seealso:: :ref:`inheritance_toplevel` :param inherit_condition: For joined table inheritance, a SQL expression which will define how the two tables are joined; defaults to a natural join between the two tables. :param inherit_foreign_keys: When ``inherit_condition`` is used and the columns present are missing a :class:`_schema.ForeignKey` configuration, this parameter can be used to specify which columns are "foreign". In most cases can be left as ``None``. :param legacy_is_orphan: Boolean, defaults to ``False``. When ``True``, specifies that "legacy" orphan consideration is to be applied to objects mapped by this mapper, which means that a pending (that is, not persistent) object is auto-expunged from an owning :class:`.Session` only when it is de-associated from *all* parents that specify a ``delete-orphan`` cascade towards this mapper. The new default behavior is that the object is auto-expunged when it is de-associated with *any* of its parents that specify ``delete-orphan`` cascade. This behavior is more consistent with that of a persistent object, and allows behavior to be consistent in more scenarios independently of whether or not an orphan object has been flushed yet or not. See the change note and example at :ref:`legacy_is_orphan_addition` for more detail on this change. :param non_primary: Specify that this :class:`_orm.Mapper` is in addition to the "primary" mapper, that is, the one used for persistence. The :class:`_orm.Mapper` created here may be used for ad-hoc mapping of the class to an alternate selectable, for loading only. .. seealso:: :ref:`relationship_aliased_class` - the new pattern that removes the need for the :paramref:`_orm.Mapper.non_primary` flag. :param passive_deletes: Indicates DELETE behavior of foreign key columns when a joined-table inheritance entity is being deleted. Defaults to ``False`` for a base mapper; for an inheriting mapper, defaults to ``False`` unless the value is set to ``True`` on the superclass mapper. When ``True``, it is assumed that ON DELETE CASCADE is configured on the foreign key relationships that link this mapper's table to its superclass table, so that when the unit of work attempts to delete the entity, it need only emit a DELETE statement for the superclass table, and not this table. When ``False``, a DELETE statement is emitted for this mapper's table individually. If the primary key attributes local to this table are unloaded, then a SELECT must be emitted in order to validate these attributes; note that the primary key columns of a joined-table subclass are not part of the "primary key" of the object as a whole. Note that a value of ``True`` is **always** forced onto the subclass mappers; that is, it's not possible for a superclass to specify passive_deletes without this taking effect for all subclass mappers. .. versionadded:: 1.1 .. seealso:: :ref:`passive_deletes` - description of similar feature as used with :func:`_orm.relationship` :paramref:`.mapper.passive_updates` - supporting ON UPDATE CASCADE for joined-table inheritance mappers :param passive_updates: Indicates UPDATE behavior of foreign key columns when a primary key column changes on a joined-table inheritance mapping. Defaults to ``True``. When True, it is assumed that ON UPDATE CASCADE is configured on the foreign key in the database, and that the database will handle propagation of an UPDATE from a source column to dependent columns on joined-table rows. When False, it is assumed that the database does not enforce referential integrity and will not be issuing its own CASCADE operation for an update. The unit of work process will emit an UPDATE statement for the dependent columns during a primary key change. .. seealso:: :ref:`passive_updates` - description of a similar feature as used with :func:`_orm.relationship` :paramref:`.mapper.passive_deletes` - supporting ON DELETE CASCADE for joined-table inheritance mappers :param polymorphic_load: Specifies "polymorphic loading" behavior for a subclass in an inheritance hierarchy (joined and single table inheritance only). Valid values are: * "'inline'" - specifies this class should be part of the "with_polymorphic" mappers, e.g. its columns will be included in a SELECT query against the base. * "'selectin'" - specifies that when instances of this class are loaded, an additional SELECT will be emitted to retrieve the columns specific to this subclass. The SELECT uses IN to fetch multiple subclasses at once. .. versionadded:: 1.2 .. seealso:: :ref:`with_polymorphic_mapper_config` :ref:`polymorphic_selectin` :param polymorphic_on: Specifies the column, attribute, or SQL expression used to determine the target class for an incoming row, when inheriting classes are present. This value is commonly a :class:`_schema.Column` object that's present in the mapped :class:`_schema.Table`:: class Employee(Base): __tablename__ = 'employee' id = Column(Integer, primary_key=True) discriminator = Column(String(50)) __mapper_args__ = { "polymorphic_on":discriminator, "polymorphic_identity":"employee" } It may also be specified as a SQL expression, as in this example where we use the :func:`.case` construct to provide a conditional approach:: class Employee(Base): __tablename__ = 'employee' id = Column(Integer, primary_key=True) discriminator = Column(String(50)) __mapper_args__ = { "polymorphic_on":case([ (discriminator == "EN", "engineer"), (discriminator == "MA", "manager"), ], else_="employee"), "polymorphic_identity":"employee" } It may also refer to any attribute configured with :func:`.column_property`, or to the string name of one:: class Employee(Base): __tablename__ = 'employee' id = Column(Integer, primary_key=True) discriminator = Column(String(50)) employee_type = column_property( case([ (discriminator == "EN", "engineer"), (discriminator == "MA", "manager"), ], else_="employee") ) __mapper_args__ = { "polymorphic_on":employee_type, "polymorphic_identity":"employee" } When setting ``polymorphic_on`` to reference an attribute or expression that's not present in the locally mapped :class:`_schema.Table`, yet the value of the discriminator should be persisted to the database, the value of the discriminator is not automatically set on new instances; this must be handled by the user, either through manual means or via event listeners. A typical approach to establishing such a listener looks like:: from sqlalchemy import event from sqlalchemy.orm import object_mapper @event.listens_for(Employee, "init", propagate=True) def set_identity(instance, *arg, **kw): mapper = object_mapper(instance) instance.discriminator = mapper.polymorphic_identity Where above, we assign the value of ``polymorphic_identity`` for the mapped class to the ``discriminator`` attribute, thus persisting the value to the ``discriminator`` column in the database. .. warning:: Currently, **only one discriminator column may be set**, typically on the base-most class in the hierarchy. "Cascading" polymorphic columns are not yet supported. .. seealso:: :ref:`inheritance_toplevel` :param polymorphic_identity: Specifies the value which identifies this particular class as returned by the column expression referred to by the ``polymorphic_on`` setting. As rows are received, the value corresponding to the ``polymorphic_on`` column expression is compared to this value, indicating which subclass should be used for the newly reconstructed object. :param properties: A dictionary mapping the string names of object attributes to :class:`.MapperProperty` instances, which define the persistence behavior of that attribute. Note that :class:`_schema.Column` objects present in the mapped :class:`_schema.Table` are automatically placed into ``ColumnProperty`` instances upon mapping, unless overridden. When using Declarative, this argument is passed automatically, based on all those :class:`.MapperProperty` instances declared in the declared class body. .. seealso:: :ref:`orm_mapping_properties` - in the :ref:`orm_mapping_classes_toplevel` :param primary_key: A list of :class:`_schema.Column` objects which define the primary key to be used against this mapper's selectable unit. This is normally simply the primary key of the ``local_table``, but can be overridden here. .. seealso:: :ref:`mapper_primary_key` - background and example use :param version_id_col: A :class:`_schema.Column` that will be used to keep a running version id of rows in the table. This is used to detect concurrent updates or the presence of stale data in a flush. The methodology is to detect if an UPDATE statement does not match the last known version id, a :class:`~sqlalchemy.orm.exc.StaleDataError` exception is thrown. By default, the column must be of :class:`.Integer` type, unless ``version_id_generator`` specifies an alternative version generator. .. seealso:: :ref:`mapper_version_counter` - discussion of version counting and rationale. :param version_id_generator: Define how new version ids should be generated. Defaults to ``None``, which indicates that a simple integer counting scheme be employed. To provide a custom versioning scheme, provide a callable function of the form:: def generate_version(version): return next_version Alternatively, server-side versioning functions such as triggers, or programmatic versioning schemes outside of the version id generator may be used, by specifying the value ``False``. Please see :ref:`server_side_version_counter` for a discussion of important points when using this option. .. versionadded:: 0.9.0 ``version_id_generator`` supports server-side version number generation. .. seealso:: :ref:`custom_version_counter` :ref:`server_side_version_counter` :param with_polymorphic: A tuple in the form ``(, )`` indicating the default style of "polymorphic" loading, that is, which tables are queried at once. is any single or list of mappers and/or classes indicating the inherited classes that should be loaded at once. The special value ``'*'`` may be used to indicate all descending classes should be loaded immediately. The second tuple argument indicates a selectable that will be used to query for multiple classes. .. seealso:: :ref:`with_polymorphic` - discussion of polymorphic querying techniques. tclass_s%s.%scS@s|p ddS(Nii((tx((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytcttargnametpolymorphic_ont constructedN(FRtassert_arg_typettypeR-t __module__t__name__t _sort_keytNonet class_managertto_listt_primary_key_argumentR,talways_refresht isinstanceRtversion_id_proptversion_id_coltFalsetversion_id_generatortconcretetsingletinheritsRtexpectRtStrictFromClauseRolet local_tabletinherit_conditiontinherit_foreign_keyst_init_propertiest_delete_orphanstbatchteager_defaultst column_prefixtColumnArgumentOrKeyRoleR2t_dependency_processorst EMPTY_DICTt validatorstpassive_updatestpassive_deletestlegacy_is_orphant_clause_adaptert_requires_row_aliasingt_inherits_equated_pairst_memoized_valuest_compiled_cache_sizet_reconstructortallow_partial_pkstconfirm_deleted_rowst_set_with_polymorphictpolymorphic_loadtpolymorphic_identitytpolymorphic_maptto_settinclude_propertiestexclude_propertiesR"tdispatcht_eventst_new_mapper_instancet_configure_inheritancet _configure_class_instrumentationt_configure_propertiest_configure_polymorphic_settert_configure_pkstregistryt_flag_new_mappert_logt_expire_memoizations(tselfR-RHRt primary_keyR,RERIRJR=R@RBR2t_polymorphic_mapRaRCtwith_polymorphicR`R]RMRORdReRTRUR^RNRVR[((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt__init__ms                      '                              cC@s|S(s<Part of the inspection API. Returns self. ((Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR(scC@s|fS(N((Rrtanon_mapt bindparams((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_gen_cache_keyscC@s|jS(sDPart of the inspection API. Returns self.class\_. (R-(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytentityssUse .persist_selectablecC@s|jS(N(tpersist_selectable(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt mapped_tablescC@s tj|S(N(Rt per_mapper(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_path_registryscC@stj|_|jrit|jtrEt|jdt|_nt|j |jj st j d|j j |jj j fn|j j|jj |j|jjkr|j rdpd}t j d||j j |fn|jdkr'|jj|_|jj|_t|_n|j|jjk r|jr|j|_x|jD]!}|jdk r^t|_q^q^Wq|jdkry"tj|jj|j|_Wqt jk r1}|jjdk st|jdk sttjt jd|jjj|jjfd|qt j k r}|jjdk s[t|jdk spttjt j d|jjj|jjfd|qXnt!j"|jj|j|j|_tj#|j$}tj%|jj&d ||_'n |j|_|j(dkre|j |_)|jj*jdk rtj+d ||jj*jfqn'|jr}|j |_)n|jj)|_)|j,dkr|jj,|_,|jj-|_-nP|jj,dk r |j,|jj,k r tj+d |j,j|jj,jfn|jj.|_.|jj/|_/|jjj0||jj*|_*|jj1|_1|jj2pm|j2|_2|jj3|_3|j(dk r|j(|j.krtj+d |j(|j.|j(||j(fn||j.|j(q|j4dk rt j d|j4qnOt6|_3||_*|j|_|j(dk r||j.|j(R5R RAt issubclassR-tsa_exct ArgumentErrorR7Rft_updateR,RHR9R{tTrueRDRCtiterate_to_rootR2RXRItsql_utiltjoin_conditiontNoForeignKeysErrortAssertionErrortraise_t descriptiontAmbiguousForeignKeysErrorRtjoinRcRJtcriterion_as_pairstonclauseRYRat_identity_classt base_mappertwarnR@RBRbRMtappendRTRUt _all_tablesR`t_add_with_polymorphic_subclassR#(RrtnpR(tnfetafetfks((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRis "                   cC@s|dkrd|_nzt|ttfrkt|dtjttfrY||_q|df|_n'|dk rtjdn d|_|jr|jddk r|jdt j t j |jddt f|_n|jr|jndS(Nt*is$Invalid setting for with_polymorphicit allow_select(RN(R9RuR>ttupletlistRt string_typesRRRRFRRGRt configuredRq(RrRu((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR_s$        cC@sm|j}|jdkr+|j|fn>|jddkri|j|jd|f|jdfndS(NiRi(R-RuR9R_(RrR(tsubcl((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRs  cC@s_|jst|j stt|ts4t||_|jjj|j|jj|_x/|jD]!}|jdk rot |_ qoqoW|jj |_ x |j D]}|jj|_qW|jjj||jj|_|jj|_xa|jjD]P\}}||jkr|j||dtdd r|j||tqqWdS(sSet the given :class:`_orm.Mapper` as the 'inherits' for this :class:`_orm.Mapper`, assuming this :class:`_orm.Mapper` is concrete and does not already have an inherits.tlocaltcolumnN(RCRRER>R+RbtupdateRR2R9RRXRMtself_and_descendantsRRRRTRt_propstitemst_should_excludeRAt_adapt_inherited_property(RrR(tmptkeytprop((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_set_concrete_bases& cC@s||_|jtdS(N(R2RlR(RrR2((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_set_polymorphic_ons cC@stj|j}|jr}| s,|j rEtjd|jn||_|j|_|j j |_ |jj |dS|dk r|j|jkst |jrtjd|jqn|jj||jtj|jd|dtjtj|dt}|jsGtjdtdk s7t tj|n||_|j|_|j dkrodStj|dtd tx!tj|jD] \}}|d krt|d r|j }t|d r|j!}qnt"|rt|d r)||_#tj|dt$d tqt|dr|j%}xa|j&D]S}||j'kr|tjd||fn|j'j(i||f|6|_'qKWqqqWdS(sIf this mapper is to be a primary mapper (i.e. the non_primary flag is not set), associate this Mapper with the given class and entity name. Subsequent calls to ``class_mapper()`` for the ``class_`` / ``entity`` name combination will return this mapper. Also decorate the `__init__` method on the mapped class to include optional auto-session attachment logic. stClass %s has no primary mapper configured. Configure a primary mapper first before setting up a non primary Mapper.Ns1Class '%s' already has a primary mapper defined. R(texpired_attribute_loadertfinalizesCalling the mapper() function directly outside of a declarative registry is deprecated. Please use the sqlalchemy.orm.registry.map_imperatively() function for a classical mapping.tinittrawRvt_sa_original_initt__func__t__sa_reconstructor__tloadt__sa_validators__sJA validation function for mapped attribute %r on mapper %s already exists.()Rtmanager_of_classR-R,t is_mappedRtInvalidRequestErrorR:RnR(Rt_add_non_primary_mapperR9RRRftinstrument_classRtregister_classRtpartialRtload_scalar_attributesRtwarn_deprecated_20t_legacy_registryt _add_managerRtlistent_event_on_inittiterate_attributesthasattrRRtcallableR\t_event_on_loadt__sa_validation_opts__RRStunion(RrtmanagerRtmethodtvalidation_optstname((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRjsh               cC@s2t|_t|_t|_|jjdddS(Nt_configure_failed(RRt_ready_for_configuret_dispose_calledt__dict__tpopR9(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_set_dispose_flagsJs   c @stjj_i_i_tjtgj D]}|j ^q:}tjd|D}t jjg}j j |xp|D]h}|jr|j|jrtj|jj|j|[sisJMapper %s could not assemble any primary key columns for mapped table '%s'slCould not assemble any primary keys for locally mapped table '%s' - no rows will be persisted in this Table.tignore_nonexistent_tabless"Identified primary key columns: %sc3@sT|]J}j|jkrt|d sA|jjkrj|VqdS(ttableN(t_columntopropertyt_identity_key_propsRRt_cols_by_table(Rtcol(Rr(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s((Rt find_tablesR{ttablest _pks_by_tableRRt column_setRRt proxy_setR#RRRst issupersettordered_column_sett intersectionRR<Rt OrderedSettaddtlenRRRRHR>RtTableRRERCtcorresponding_columntreduce_columnsRRRpt_readonly_props( RrRtall_colstpk_colsRtttkRRs((RrsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRmQsb  (       (  cC@stj|_|_tj|_t||_|j rsx3|j j D]\}}|j ||t qMWn|j rxg|j jj D]P\}}||jkr|j||dt dd r|j||t qqWnx|jjD]}||jkrqn|jpd|j}|j|j|d|jjj|d|rZqnx6|jD](}||jkrg|j|j}qgqgW|j ||dt dtqWdS(NRRR0Rt setparent(tsql_basetColumnCollectiontcolumnsRRt OrderedDictRt_ColumnMappingRRKRt_configure_propertyRARERR9RR{RORRHtcontains_columnRR(RrRRRt column_keyR(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRks4   c @st}|jd k r@t}t|jtjry|j|j|_Wqtk r}tj t j d|jd|qXn|j|j kr|j |j}n|t|jt rt|jtjst j dn|j}n7|jj|j}|d kr|t}t}|j}t|tjr|jd ks`|jdj|d krt jd|jqnt}t|dd }|r|j|j|jt|rt jd|jqn|jd|_}|j}tj|d |}|j||d |d t|jd |_|jnx|jD]}|jd k rM|j|jkr|j|_n|jj|j|_|jd k r|j|_|j|_n d |_d SqMW|rfd} fd} | |_| |_n d |_d S(sConfigure an attribute on the mapper representing the 'polymorphic_on' column, if applicable, and not already generated by _configure_properties (which is typical). Also create a setter function which will assign this attribute to the value of the 'polymorphic_identity' upon instance construction, also if applicable. This routine will run when an instance is created. sPCan't determine polymorphic_on value '%s' - no attribute is mapped to this name.RsUOnly direct column-mapped property or SQL expression can be passed for polymorphic_oniskCould not map polymorphic_on column '%s' to the mapped table - polymorphic loads will not function properlyRs6Cannot exclude or override the discriminator column %rt_sa_polymorphic_ont _instrumentRRiNc@s5|j}|jj|||jjjddS(N(tdicttget_implR#RR(RaR9(tstatetdict_(tpolymorphic_key(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_set_polymorphic_identityvs   c@sF|krB||jkrBtjdt||fndS(NsnFlushing object %s with incompatible polymorphic identity %r; the object may not refresh and/or load correctly(t"_acceptable_polymorphic_identitiesRt warn_limitedR (R(RR(R(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_validate_polymorphic_identitys   ( RAR2R9RR>RRRtKeyErrorRRRRRRtColumnPropertyR{RRtColumnRuRRtgetattrRRtlabelRRRRR ( RrRtsetterterrRRt instrumentRR(RR ((RsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRls~                  cC@s%|jdk r|j|jSdSdS(N(R@R9R(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_version_id_propscC@sjt}t|g}xK|re|j}|j|jkr|j|j|j|jqqW|S(N(R#RtpopleftR{RRatextendR(Rrt identitieststacktitem((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRs   cC@st|jjS(N(t frozensetRtvalues(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _prop_setsssqlalchemy.orm.descriptor_propscC@stjj}|js4|j||dtdtn|||jkr|jj||}||kst |t j r|j |j kr|j||jd|dtqndS(NRR(Rt preloadedtorm_descriptor_propsRCRRARR:t_get_class_attr_mroR>RtInstrumentedAttributet _parententitytparenttConcreteInheritedPropertyR(RrRRRtdescriptor_propstimplementing_attribute((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRs      c C@stjj}|jd||jjt|tsI|j||}nt|t j rz|j j |j d}|dkr|jr|g}x|jjD]v}|jj |j d}|dk r x|D]} | j j|qW|j j |j d}Pn|j|qWn|dkr|j d}t|drt|d si|j|jkr|jj|qnQt|dr|j|jkr||j|jkr|j|jj|nt|ds ||jkp|j d|jk|_nt|tjr/||_|_n|j j||x5|j D]'}x|jD]}||j |Rt_property_from_columnRR R{RRR9RERRHt_refresh_for_new_columnRRRRRRR2R$RtLabelRt _tq_key_labelRRt set_parentRR RAR%RRR!RR~RR,RRRRtpost_instrument_classRRq( RrRRRRR"Rtpathtmtm2tsyntoldpropR(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRs              c C@sOtjj}tj|}|d}t|tjs=t|jj |d}t|t j rK|j s|jd|f|j kr|jdj| r|jd|jk r||jk r|j|k }d|jd||f}|rtj|qtj|n|j}|jjd||jd||S|dksit||jr)g}x|D]} |jj| } | dkr |jj| } | dk r|jj| n|jj| } | dkr tjd||| fq n|j| qvWt j |Stjd|||j|fdS(sZgenerate/update a :class:`.ColumnProperty` given a :class:`_schema.Column` object.isImplicitly combining column %s with column %s under attribute '%s'. Please configure one or more attributes for these same-named columns explicitly.isAinserting column to existing list in properties.ColumnProperty %ssWhen configuring property '%s' on %s, column '%s' is not represented in the mapper's table. Use the `column_property()` function to force this column to be mapped as a read-only attribute.sWARNING: when configuring property '%s' on %s, column '%s' conflicts with property '%r'. To resolve this, map the column to the class under a different name in the 'properties' dictionary. Or, to remove all awareness of the column entirely (including its availability as a foreign key), use the 'include_properties' or 'exclude_properties' mapper arguments to control specifically which table columns get mapped.N( RRRR;R>Rt ColumnElementRRtgetR9RR RYRtshares_lineageR@R RRRtcopytinsertRpR!R{RRHR(RRR( RrRRR"RRt warn_onlytmsgt mapped_columnRtmc((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR'@sV          cC@s)|jjr%t|jhdtndS(Ntcascade(Rnt _new_mapperst_configure_registriesR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_check_configures cC@s|jdg|jjD]\}}||f^q}xc|D][\}}|jd||j|kr|j r|jn|jrB|j|qBqBW|jdt|_ dS(sCall the ``init()`` method on all ``MapperProperties`` attached to this mapper. This is a deferred configuration step which is intended to execute once all mappers have been constructed. s$_post_configure_properties() startedsinitialize prop %ss%_post_configure_properties() completeN( RpRRR t_configure_startedRt_configure_finishedR,RR(RrRRtl((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_post_configure_propertiess .   cC@s1x*|jD]\}}|j||q WdS(s^Add the given dictionary of properties to this mapper, using `add_property`. N(Rt add_property(Rrtdict_of_propertiesRtvalue((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytadd_propertiesscC@s*||j|<|j||d|jdS(sAAdd an individual MapperProperty to this mapper. If the mapper has not been configured yet, just adds the property to the initial properties dictionary sent to the constructor. If this Mapper has already been configured, then the given MapperProperty is configured immediately. RN(RKRR(RrRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRCs cC@s%x|jD]}|jq WdS(N(Rt_reset_memoizations(RrR(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRqscC@sQd|jjd|jdk r,|jjp8t|j|jrHdpKddS(Nt(t|s |non-primaryR0t)(R-R7RHR9RtstrR,(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _log_descs cG@s%|jjd||jf|dS(Ns%s (tloggertinfoRL(RrR8targs((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRpscG@s%|jjd||jf|dS(Ns%s (RMtdebugRL(RrR8RO((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _log_debugscC@sdt||jjfS(Ns(tidR-R7(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt__repr__scC@sGd|jj|jrdpd|jdk r9|jjn |jjfS(Nsmapped class %s%s->%ss (non-primary)R0(R-R7R,RHR9RR{(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt__str__s  cC@st}x|jD]r}xi|jD]^\}}t}tj|j||d|j}|jrl|rltS|j r#| r#tSq#WqW|jr|StSdS(Nt optimistic( RARRLRRRt has_parentt has_identityRV(RrRtorphan_possibleR(RtclsRV((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _is_orphans  cC@s ||jkS(N(R(RrR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt has_propertyscC@sb|r|jny|j|SWn9tk r]}tjtjd||fd|nXdS(s6return a MapperProperty associated with the given key.s Mapper '%s' has no property '%s'RN(R>RR RRRR(RrRt_configure_mappersR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt get_propertys cC@s |j|S(skGiven a :class:`_schema.Column` object, return the :class:`.MapperProperty` which maps this column.(R(RrR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytget_property_by_columnscC@s|jt|jjS(s1return an iterator of all MapperProperty objects.(R>titerRR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytiterate_propertiess cC@s4|dkrt|j}n|rt}x}tj|D]l}t|}|j|sztjd||fn|dkr|j |j q=|j |q=Wg|jD]}||kr|^q}ng}|dk r0tt j|dt}g|D]}|j|kr |^q }n|S(sgiven a with_polymorphic() argument, return the set of mappers it represents. Trims the list of mappers to just those represented within the given selectable, if present. This helps some more legacy-ish mappings. Rs%r does not inherit from %rtinclude_aliasesN(RRR#RR;R tisaRRR9RRRRRRRH(Rrtspect selectabletmappersR.R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_mappers_from_specs&    + +cC@s|j}x|D]x}||kr(qn|jrCtjdq|js|rm|j|j|j}q|j|j|j}qqW|S(sgiven a list of mappers (assumed to be within this mapper's inheritance hierarchy), construct an outerjoin amongst those mapper's mapped tables. s^'with_polymorphic()' requires 'selectable' argument when concrete-inheriting mappers are used.( R{RCRRRDRRHRIt outerjoin(RrRet innerjointfrom_objR.((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_selectable_from_mappers=s      cC@s]|jrU|jrU|jdk rU|jji|d6|d6jd|jDSdSdS(Nt parententityt parentmappercs@s|]}|jVqdS(N(Ra(RR.((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys ]s(RDRER2R9t _annotatetin_R(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_single_table_criterionXs ! cC@s(|jp'|jp'|jjp'|jjS(s;determine if _MapperEntity or _ORMColumnEntity will need to use polymorphic adaption when setting up a SELECT as well as fetching rows for mapped classes and subclasses against this Mapper. moved here from context.py for #8456 to generalize the ruleset for this condition. (RuRXR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _should_select_with_poly_adapteras   cC@s'|j|jsgS|j|jS(N(R>RuRf(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_with_polymorphic_mapperss  cC@s|jdS(sThis hook is invoked by attribute inspection. E.g. when Query calls: coercions.expect(roles.ColumnsClauseRole, ent, keep_inspect=True) This allows the inspection process run a configure mappers hook. N(R>(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _post_inspects cC@sO|js|jS|j\}}|dk r/|S|j|j||tSdS(N(RuR{R9RjRfRA(RrRcRd((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_with_polymorphic_selectables  cC@std|jjDS(Ncs@s1|]'\}}|td|DfVqdS(cs@s!|]}|jjr|VqdS(N(R5tshould_evaluate_none(RR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys sN(R(RRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s(RRR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_insert_cols_evaluating_nonescC@std|jjDS(Ncs@s1|]'\}}|td|DfVqdS(cs@sC|]9}|j r|j r|j r|jj r|jVqdS(N(Rstserver_defaulttdefaultR5RtR(RR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s    N(R(RRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s (RRR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_insert_cols_as_nones c@s#tfdjjDS(Nc3@s7|]-\}}|tfd|DfVqdS(c3@s%|]}j|j|fVqdS(N(RR(RR(Rr(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys sN(R(RRR(Rr(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s(RRR(Rr((RrsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_propkey_to_cols cC@std|jjDS(Ncs@s=|]3\}}|tg|D]}|j^qfVqdS(N(RR(RRtpksR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s(RRR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_pk_keys_by_tablesc@s#tfdjjDS(Nc3@sD|]:\}}|tg|D]}j|j^qfVqdS(N(RRR(RRRzR(Rr(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s(RRR(Rr((RrsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_pk_attr_keys_by_tables cC@std|jjDS(Ncs@sL|]B\}}|tg|D]}|jdk r|j^qfVqdS(N(RRvR9R(RRRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s (RRR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_server_default_colss cC@st}xu|jjD]d\}}xU|D]M}|jdk sP|jdk r,||jkr,|j|j|jq,q,WqW|S(N( R#RRRvR9tserver_onupdateRRR(RrtresultRRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt&_server_default_plus_onupdate_propkeyss  "cC@std|jjDS(Ncs@sL|]B\}}|tg|D]}|jdk r|j^qfVqdS(N(RR~R9R(RRRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys  s (RRR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_server_onupdate_default_cols s cC@si|d6|d6|d6}|j|jk rr|jji|d6|d6|d6jidd6|d6|d s cC@s|dtfkr0tjtj|dt}n|jrn|sO|jd}n|tkr|jd}qn|tkrd}n|j||}|dk r||fS||j ||fSdS(NRii( R9RARRFRRGRRuRfRj(RrRcRdRhRe((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_with_polymorphic_argsJ s      cC@st|j|jS(N(Rt_iterate_polymorphic_propertiesRq(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_polymorphic_properties_ scC@se|j}|j}g|D]H}t|tjr|jr|rT|j|jdn |jd^qS(Ni(Rt_polymorphic_adapterR>RR t_renders_in_subqueriesR(Rrtpoly_propertiestadapterR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_all_column_expressionsg s    cC@sZ|r|j|}n |j}g|D].}t|tjr(|j|jdf^q(S(Ni(RRR>RR RR(Rrtpolymorphic_mappersRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_columns_plus_keyss s   cC@s*|jr"tj|jd|jSdSdS(Nt equivalents(RuRt ColumnAdapterRdt_equivalent_columnsR9(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR s cc@s|dkr|j}n|s:x|jD] }|Vq(Wnxtjtg|g|D]}t|j^qTD]H}t|dtr|j dkss|j d|j k rqsn|VqsWdS(sUReturn an iterator of MapperProperty objects which will render into a SELECT.R$iN( R9RqR`Rt unique_listRRR RAR2R(RrReRR(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR s    0cC@s|jtj|jS(siA namespace of all :class:`.MapperProperty` objects associated this mapper. This is an object that provides each property based on its key name. For instance, the mapper for a ``User`` class which has ``User.name`` attribute would provide ``mapper.attrs.name``, which would be the :class:`.ColumnProperty` representing the ``name`` column. The namespace object can also be iterated, which would yield each :class:`.MapperProperty`. :class:`_orm.Mapper` has several pre-filtered views of this attribute which limit the types of properties returned, including :attr:`.synonyms`, :attr:`.column_attrs`, :attr:`.relationships`, and :attr:`.composites`. .. warning:: The :attr:`_orm.Mapper.attrs` accessor namespace is an instance of :class:`.OrderedProperties`. This is a dictionary-like object which includes a small number of named methods such as :meth:`.OrderedProperties.items` and :meth:`.OrderedProperties.values`. When accessing attributes dynamically, favor using the dict-access scheme, e.g. ``mapper.attrs[somename]`` over ``getattr(mapper.attrs, somename)`` to avoid name collisions. .. seealso:: :attr:`_orm.Mapper.all_orm_descriptors` (R>RtImmutablePropertiesR(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytattrs s# cC@stjt|jjS(sy A namespace of all :class:`.InspectionAttr` attributes associated with the mapped class. These attributes are in all cases Python :term:`descriptors` associated with the mapped class or its superclasses. This namespace includes attributes that are mapped to the class as well as attributes declared by extension modules. It includes any Python descriptor type that inherits from :class:`.InspectionAttr`. This includes :class:`.QueryableAttribute`, as well as extension types such as :class:`.hybrid_property`, :class:`.hybrid_method` and :class:`.AssociationProxy`. To distinguish between mapped attributes and extension attributes, the attribute :attr:`.InspectionAttr.extension_type` will refer to a constant that distinguishes between different extension types. The sorting of the attributes is based on the following rules: 1. Iterate through the class and its superclasses in order from subclass to superclass (i.e. iterate through ``cls.__mro__``) 2. For each class, yield the attributes in the order in which they appear in ``__dict__``, with the exception of those in step 3 below. In Python 3.6 and above this ordering will be the same as that of the class' construction, with the exception of attributes that were added after the fact by the application or the mapper. 3. If a certain attribute key is also in the superclass ``__dict__``, then it's included in the iteration for that class, and not the class in which it first appeared. The above process produces an ordering that is deterministic in terms of the order in which attributes were assigned to the class. .. versionchanged:: 1.3.19 ensured deterministic ordering for :meth:`_orm.Mapper.all_orm_descriptors`. When dealing with a :class:`.QueryableAttribute`, the :attr:`.QueryableAttribute.property` attribute refers to the :class:`.MapperProperty` property, which is what you get when referring to the collection of mapped properties via :attr:`_orm.Mapper.attrs`. .. warning:: The :attr:`_orm.Mapper.all_orm_descriptors` accessor namespace is an instance of :class:`.OrderedProperties`. This is a dictionary-like object which includes a small number of named methods such as :meth:`.OrderedProperties.items` and :meth:`.OrderedProperties.values`. When accessing attributes dynamically, favor using the dict-access scheme, e.g. ``mapper.all_orm_descriptors[somename]`` over ``getattr(mapper.all_orm_descriptors, somename)`` to avoid name collisions. .. seealso:: :attr:`_orm.Mapper.attrs` (RRRR:t_all_sqla_attributes(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytall_orm_descriptors sBc@s?tjjd|jDfd|jjDS(s~return a dictionary of {syn_attribute_name: pk_attr_name} for all synonyms that refer to primary key columns cS@sh|]}|jqS((R(RR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys  s c@sFi|]<\}}t|jr|jkr|j|jqS((R>tSynonymPropertyRR(RRR0(R"tpk_keys(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys  s  (RRRRRR(Rr((R"RsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _pk_synonyms s cC@stjj}|j|jS(sReturn a namespace of all :class:`.SynonymProperty` properties maintained by this :class:`_orm.Mapper`. .. seealso:: :attr:`_orm.Mapper.attrs` - namespace of all :class:`.MapperProperty` objects. (RRRt_filter_propertiesR(RrR"((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytsynonyms$ s cC@s|jS(N(R-(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR5 scC@s|jtjS(sReturn a namespace of all :class:`.ColumnProperty` properties maintained by this :class:`_orm.Mapper`. .. seealso:: :attr:`_orm.Mapper.attrs` - namespace of all :class:`.MapperProperty` objects. (RRR (Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt column_attrs9 s ssqlalchemy.orm.relationshipscC@s|jtjjjS(sLA namespace of all :class:`.RelationshipProperty` properties maintained by this :class:`_orm.Mapper`. .. warning:: the :attr:`_orm.Mapper.relationships` accessor namespace is an instance of :class:`.OrderedProperties`. This is a dictionary-like object which includes a small number of named methods such as :meth:`.OrderedProperties.items` and :meth:`.OrderedProperties.values`. When accessing attributes dynamically, favor using the dict-access scheme, e.g. ``mapper.relationships[somename]`` over ``getattr(mapper.relationships, somename)`` to avoid name collisions. .. seealso:: :attr:`_orm.Mapper.attrs` - namespace of all :class:`.MapperProperty` objects. (RRRtorm_relationshipstRelationshipProperty(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt relationshipsG scC@s|jtjjjS(sReturn a namespace of all :class:`.CompositeProperty` properties maintained by this :class:`_orm.Mapper`. .. seealso:: :attr:`_orm.Mapper.attrs` - namespace of all :class:`.MapperProperty` objects. (RRRRtCompositeProperty(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt compositesd s c@s9|jtjtjfd|jjDS(Nc3@s0|]&\}}t|r||fVqdS(N(R>(RRtv(ttype_(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys y s(R>RRRRR(RrR((RsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRu s cC@sgt|jdD].\}}|tjd|d|jf^q}tjg|D]\}}||k^qTtj|fS(screate a "get clause" based on the primary key. this is used by query.get() and many-to-one lazyloads to load this item by primary key. ispk_%dR(t enumerateRsRt bindparamR5tand_Rt column_dict(RrtidxRstparamsRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _get_clause} sD+c@setjfd}xC|jjD]5}|jdk r(tj|jii|d6q(q(WS(sCreate a map of all equivalent columns, based on the determination of column pairs that are equated to one another based on inherit condition. This is designed to work with the queries that util.polymorphic_union comes up with, which often don't include the columns from the base table directly (including the subclass table columns only). The resulting structure is a dictionary of columns mapped to lists of equivalent columns, e.g.:: { tablea.col1: {tableb.col1, tablec.col1}, tablea.col2: {tabled.col2} } c@s|jtjkr|jkr;|jj|jntj|jf|j<|jkr|jj|jqtj|jf|jR Rt ClassManagerRR2RAt_dataclass_fields(Rrt assigned_nametobj((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_is_userland_descriptor scC@s&gtj|jD]}|j^qS(N(Rtdataclass_fieldsR-R(Rrtf((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR scC@s|rG|jjj|ddk r~|j||jj|r~tSn7|jj|d}|dk r~|j||r~tS|jdk r||jkr|dks||jkr|j d|tS|j dk r||j ks|dk r||j kr|j d|tSt S(sdetermine whether a particular property should be implicitly present on the class. This occurs when properties are propagated from an inherited class, or are applied from the columns present in the mapped table. snot including property %ssexcluding property %sN( R-RR3R9RRR:RRdRpReRA(RrRRRRtattr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR s*    cC@s|j|jkS(sXReturn true if the given mapper shares a common inherited parent as this mapper.(R(Rrtother((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt common_parent scC@s0|j|jko/|j| o/|j| S(s{return true if the other mapper is an inheriting sibling to this one. common parent but different branch (RRb(RrR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt is_sibling scC@sH|j}|jdk s!|r4t|j|St||kSdS(N(tprimary_mapperR2R9R Rb(RrRtallow_subtypests((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_canload s cC@s2|}x|r'||k r'|j}q Wt|S(s>Return True if the this mapper inherits from the given mapper.(REtbool(RrRR.((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRb s cc@s%|}x|r |V|j}q WdS(N(RE(RrR.((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR s cC@sXg}t|g}x3|rJ|j}|j||j|jqWtj|S(sThe collection including this mapper and all descendant mappers. This includes not just the immediately inheriting mappers but all their inheriting mappers as well. (RRRRRRR(Rrt descendantsRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR s   cC@s t|jS(sCIterate through the collection including this mapper and all descendant mappers. This includes not just the immediately inheriting mappers but all their inheriting mappers as well. To iterate through an entire hierarchy, use ``mapper.base_mapper.polymorphic_iterator()``. (R_R(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytpolymorphic_iterator, s cC@s |jjS(sSReturn the primary mapper corresponding to this mapper's class key (class).(R:R((Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR9 scC@s |jjjS(N(R:R(R(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytprimary_base_mapper? scC@sg|j}|r2g|D]}|j|^q}n|j}x"|D]}||krEtSqEWtSdS(N(RsRtkeysRAR(RrRRRRtrkR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_result_has_identity_keyC s #   c@sX|j}|r2g|D]}|j|^q}n|jtfd|D|fS(sReturn an identity-map key for use in storing/retrieving an item from the identity map. :param row: A :class:`.Row` instance. The columns which are mapped by this :class:`_orm.Mapper` should be locatable in the row, preferably via the :class:`_schema.Column` object directly (as is the case when a :func:`_expression.select` construct is executed), or via string names of the form ``_``. c3@s|]}|VqdS(N((RR(trow(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys ` s(RsRRR(RrRRRRR((RsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytidentity_key_from_rowN s #cC@s|jt||fS(sReturn an identity-map key for use in storing/retrieving an item from an identity map. :param primary_key: A list of values indicating the identifier. (RR(RrRsR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytidentity_key_from_primary_keyd scC@s"tj|}|j|tjS(sReturn the identity key for the given instance, based on its primary key attributes. If the instance's state is expired, calling this method will result in a database check to see if the object has been deleted. If the row no longer exists, :class:`~sqlalchemy.orm.exc.ObjectDeletedError` is raised. This value is typically also found on the instance state under the attribute name `key`. (Rtinstance_statet_identity_key_from_statet PASSIVE_OFF(RrtinstanceR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytidentity_key_from_instancem s cC@sZ|j}|j}|jtg|jD]%}||jjj|||^q%|jfS(N( RRRRRRtimplR3R(RrRtpassiveRRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR} s  2cC@s,tj|}|j|tj}|dS(sGReturn the list of primary key values for the given instance. If the instance's state is expired, calling this method will result in a database check to see if the object has been deleted. If the row no longer exists, :class:`~sqlalchemy.orm.exc.ObjectDeletedError` is raised. i(RRRR(RrRRt identity_key((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytprimary_key_from_instance s c@sYg|jD]}|jj^q tjdgrLfd}n d}|S(Nc@s$tdt|jdDS(Ncs@s3|])\}}|dk r'||n|VqdS(N(R9(Rtkey_fntval((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys si(RtzipR(R(tkey_fns(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR scS@s |jdS(Ni(R(R((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR s(RsR5tsort_key_functionR#t differenceR9(RrRR((RsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_persistent_sortkey_fn s " cC@s!g|jD]}|j|^q S(N(RsR(RrR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR scC@s5t}x%|jD]}|j|j|qW|S(N(R#RRR(Rrt collectionR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt _all_pk_cols s cC@s5t|j}|jdk r1|j|jn|S(N(R#RsR2R9R(Rrtcols((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_should_undefer_in_wildcard sc@sfdjDS(Nc@s h|]}j|jqS((RR(RR(Rr(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys s (R(Rr((RrsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_primary_key_propkeys scC@s0|j|}|j|jjj||d|S(NR(RRRRR3(RrRRRRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_get_state_attr_by_column s cC@s1|j|}|j|jjj|||dS(N(RRRRtset_committed_value(RrRRRRER((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt#_set_committed_state_attr_by_column s cC@s4|j|}|j|jjj|||ddS(N(RRRRR#R9(RrRRRRER((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_set_state_attr_by_column s cC@s:tj|}tj|}|j|||dtjS(NR(RRt instance_dictt#_get_committed_state_attr_by_columnR(RrRRRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_get_committed_attr_by_column scC@s0|j|}|j|jjj||d|S(NR(RRRRtget_committed_value(RrRRRRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR s c @sj}t|jjjj}ttg|D]/}||jD]}tj |dt ^qHq7j j krdSfd}g}t} xttjD]j} | j krt } nt| j tjsdS| r| j r|j| jj| j qqWy(tj|dii|d6|dRt TableClauseRDRRIRRtcloned_traverseRRRRtselecttwheretset_label_styleR ( RrRtattribute_namestpropstcol_attribute_namesRRRtallcondststartR(tcondR((RrRRsH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_optimized_get_statement sB   5 "   cc@sm|j|ri|}xQ|jD]@}|V||k rL||jkrLPn|}||kr"Pq"q"WndS(N(RbRRq(RrR(tprevR.((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_iterate_to_target_viawpolyE s cC@s|s<|}x|j|D]}|jdkr|SqWnt|}d|D}xh|j|gD]T}|j}xB|j|D]1}|jdks||kr|j||SqWqkWdS(NRcS@si|]}||jqS((R((Rte((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pys \ s (RR`R#RR(R3R9(Rrtenabled_via_opttpolymorphic_fromR(R.tenabled_via_opt_mappersRz((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_should_selectin_loadR s    ssqlalchemy.orm.strategy_optionsc C@stjj}|jst|jdk rS|j|j}t|g|j }nt|j }|j |}|j |}x|j D]}|j |j krqn|j|ks||krt|tsqn|jt|j|j ft|jq|jt|j|j fitd6qWg|jD]}tj|itd6^q=} t| dkrtj| } n | d} |jr0|j|ksttj|j t!} |j"j#| } g| D]} |j"j#| ^q} | j$| j%tj&ddtj'| } nHtj|j t!} | j$| j%tj&ddtj'| } | ||fS(sbAssemble a that can load the columns local to this subclass as a SELECT with IN. t do_nothingt _orm_adaptiit primary_keyst expandingN((RRtorm_strategy_optionsRERR2R9RR#RtLoadRRR:R R>Rtset_generic_strategyR RRt strategy_keyRRsRt_deep_annotateRRttuple_tis_aliased_classR(RRR t_adapterRRRnRtorder_by( RrRztstrategy_optionstpolymorphic_propt keep_propst disable_optt enable_optRtpkRstin_exprtqR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_subclass_load_via_inh sP ,   %!  ! cC@s |j|S(N(R"(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_subclass_load_via_in_mapper scc@stt}tt}}|jj|s4ttt|jjj|||jfg}x |ro|d\}} } } |s|j qgn| |kr |j } || j krqgnt| j || | ||} | rl|j | |ddfqlqg| |krg|j \}}}}||||fV|j t|jj|||fqgqgWdS(s.Iterate each element and its mapper in an object graph, for all relationships that meet the given cascade rule. :param type\_: The name of the cascade rule (i.e. ``"save-update"``, ``"delete"``, etc.). .. note:: the ``"all"`` cascade is not accepted here. For a generic object traversal function, see :ref:`faq_walk_objects`. :param state: The lead InstanceState. child items will be processed per the relationships defined for this object's mapper. :return: the method yields individual object instances. .. seealso:: :ref:`unitofwork_cascades` :ref:`faq_walk_objects` - illustrates a generic function to traverse all objects without relying on cascades. iN(R#tobjectR(RbRRRRRRRR;tcascade_iteratorRR9(RrRRthalt_ontvisited_statestprptmppt visitablestiteratort item_typet parent_statet parent_dictRtqueueRtinstance_mappertcorresponding_statetcorresponding_dict((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR% sD -      cC@stj|jS(N(RtLRUCacheR[(Rr((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_compiled_cache sc @six8|jjD]*}x!|jD]}j||q#WqWg}xUjD]G\}}|j}|rT|jg|jD]}||f^qqTqTWfd}tjd|d|}t j } x|D]}|| |RBRFRCRqRLRpRQRSRTRZR[R]R^R`RfRjRoRpRqRrRstwith_polymorphic_mappersRuRxRyR{R|R}RRtmemoized_instancemethodRRRdRRRRRRRRRRRRRRRRRRRRRRRRbRRRRRRRRRRtPASSIVE_RETURN_NO_VALUERRRRRRRRRRRRRRR R"R#R%R4RBRDRH(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR+WsX  +               m  e 2   uS            "  #        &F  *  +            a U M3 RcB@seZRS((R7R6(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRa scC@sttdtdS(s Initialize the inter-mapper relationships of all mappers that have been constructed thus far across all :class:`_orm.registry` collections. The configure step is used to reconcile and initialize the :func:`_orm.relationship` linkages between mapped classes, as well as to invoke configuration events such as the :meth:`_orm.MapperEvents.before_configured` and :meth:`_orm.MapperEvents.after_configured`, which may be used by ORM extensions or user-defined extension hooks. Mapper configuration is normally invoked automatically, the first time mappings from a particular :class:`_orm.registry` are used, as well as whenever mappings are used and additional not-yet-configured mappers have been constructed. The automatic configuration process however is local only to the :class:`_orm.registry` involving the target mapper and any related :class:`_orm.registry` objects which it may depend on; this is equivalent to invoking the :meth:`_orm.registry.configure` method on a particular :class:`_orm.registry`. By contrast, the :func:`_orm.configure_mappers` function will invoke the configuration process on all :class:`_orm.registry` objects that exist in memory, and may be useful for scenarios where many individual :class:`_orm.registry` objects that are nonetheless interrelated are in use. .. versionchanged:: 1.4 As of SQLAlchemy 1.4.0b2, this function works on a per-:class:`_orm.registry` basis, locating all :class:`_orm.registry` objects present and invoking the :meth:`_orm.registry.configure` method on each. The :meth:`_orm.registry.configure` method may be preferred to limit the configuration of mappers to those local to a particular :class:`_orm.registry` and/or declarative base class. Points at which automatic configuration is invoked include when a mapped class is instantiated into an instance, as well as when ORM queries are emitted using :meth:`.Session.query` or :meth:`_orm.Session.execute` with an ORM-enabled statement. The mapper configure process, whether invoked by :func:`_orm.configure_mappers` or from :meth:`_orm.registry.configure`, provides several event hooks that can be used to augment the mapper configuration step. These hooks include: * :meth:`.MapperEvents.before_configured` - called once before :func:`.configure_mappers` or :meth:`_orm.registry.configure` does any work; this can be used to establish additional options, properties, or related mappings before the operation proceeds. * :meth:`.MapperEvents.mapper_configured` - called as each individual :class:`_orm.Mapper` is configured within the process; will include all mapper state except for backrefs set up by other mappers that are still to be configured. * :meth:`.MapperEvents.after_configured` - called once after :func:`.configure_mappers` or :meth:`_orm.registry.configure` is complete; at this stage, all :class:`_orm.Mapper` objects that fall within the scope of the configuration operation will be fully configured. Note that the calling application may still have other mappings that haven't been produced yet, such as if they are in modules as yet unimported, and may also have mappings that are still to be configured, if they are in other :class:`_orm.registry` collections not part of the current scope of configuration. R;N(R=R%R(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytconfigure_mapperse sDcC@sx|D]}|jrPqqWdSthtr3dStazIx|D]}|jrCPqCqCWdStjjtjt||Wdt aXWdQXtjjtj dS(N( R<R"t_already_compilingRR+Rft _for_classtbefore_configuredt_do_configure_registriesRAtafter_configured(t registriesR;R'((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyR= s"     ssqlalchemy.orm.decl_apic C@stjjj}t|}x|j|D]v}t}x*|jD]}d}x<|j j D].}|||j }|t kr]t }Pq]q]W|t krqDnt|dtrtjd||jf} |j| _| n|jsDy.|j|j|j j||j Wq`tk r\tjd} t| dsV| |_nq`XqDqDW|svt|_n| r+|jj|r+tjdq+q+WdS(NRsOne or more mappers failed to initialize - can't proceed with initialization of other mappers. Triggering mapper: '%s'. Original exception was: %sisHconfigure was called with cascade=False but additional registries remain(RRt orm_decl_apiRnR#t_recurse_with_dependenciesRAR&R9Rftbefore_mapper_configuredR-RRR RRRRRBRqtmapper_configuredt Exceptiontsystexc_infoRR<t _dependenciesR( R[R;RntorigR'thas_skipR(t run_configuretfnRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRY sD           cC@stjjj}t|}x|j|D]}| r\|jj|r\tj dnxG|j ry|j j \}}Wnt k rq_X|j |q_W|jj|jjx!|jD]}|jj|qW|jjt|_q+WdS(Ns^Registry has dependent registries that are not disposed; pass cascade=True to clear these also(RRR\RnR#t_recurse_with_dependentst _dependentsRRRt _managerstpopitemR t_dispose_manager_and_mappert_non_primary_mapperstclearRctdiscardRAR<(R[R;RnRdR'Rt_R7((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt_dispose_registriess$       cC@s t|_|S(sDecorate a method as the 'reconstructor' hook. Designates a single method as the "reconstructor", an ``__init__``-like method that will be called by the ORM after the instance has been loaded from the database or otherwise reconstituted. .. tip:: The :func:`_orm.reconstructor` decorator makes use of the :meth:`_orm.InstanceEvents.load` event hook, which can be used directly. The reconstructor will be invoked with no arguments. Scalar (non-collection) database-mapped attributes of the instance will be available for use within the function. Eagerly-loaded collections are generally not yet available and will usually only contain the first element. ORM state changes made to objects at this stage will not be recorded for the next flush() operation, so the activity within a reconstructor should be conservative. .. seealso:: :meth:`.InstanceEvents.load` (RR(Rg((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt reconstructor#s c@s=|jdt|jdtfd}|S(sDecorate a method as a 'validator' for one or more named properties. Designates a method as a validator, a method which receives the name of the attribute as well as a value to be assigned, or in the case of a collection, the value to be added to the collection. The function can then raise validation exceptions to halt the process from continuing (where Python's built-in ``ValueError`` and ``AssertionError`` exceptions are reasonable choices), or can modify or replace the value before proceeding. The function should otherwise return the given value. Note that a validator for a collection **cannot** issue a load of that collection within the validation routine - this usage raises an assertion to avoid recursion overflows. This is a reentrant condition which is not supported. :param \*names: list of attribute names to be validated. :param include_removes: if True, "remove" events will be sent as well - the validation function must accept an additional argument "is_remove" which will be a boolean. :param include_backrefs: defaults to ``True``; if ``False``, the validation function will not emit if the originator is an attribute event related via a backref. This can be used for bi-directional :func:`.validates` usage where only one validator should emit per attribute operation. .. versionadded:: 0.9.0 .. seealso:: :ref:`simple_validators` - usage examples for :func:`.validates` tinclude_removestinclude_backrefsc@s$|_id6d6|_|S(NRsRt(RR(Rg(RtRstnames(sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pytwrapgs   (RRAR(RutkwRv((RtRsRusH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt validatesAs#cC@s/|jj}|jr+|j|jndS(N(RR(R\R(Rtctxtinstrumenting_mapper((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRrs  cC@s<|jj}|r8|j|jr8|j|q8ndS(sRun init_instance hooks. This also includes mapper compilation, normally not needed here but helps with some piecemeal configuration scenarios (such as in the ORM tutorial). N(RR(R>R(RROtkwargsRz((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRys   RcB@s&eZdZdZdZdZRS(s4Error reporting helper for mapper._columntoproperty.R(cC@s ||_dS(N(R((RrR(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRvscC@si|jjj|}|rItjd|jj|j|j|fntjd||jfdS(NsDColumn '%s.%s' is not available, due to conflicting property '%s':%rs*No column %s is configured on mapper %s...(R(RR3torm_exctUnmappedColumnErrorRRR(RrRR((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyt __missing__s%(R((R7R6RIt __slots__RvR~(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyRs (ORIt __future__Rt collectionsRt itertoolsRRatweakrefR0RRR|RRRRRRR R R R t interfacesR RRRRRRt path_registryRRRRRRRRRRRRRRtsql.selectableR R!tWeakKeyDictionaryR$R9RR%R)RARVtsymbolR*t threadingtRLockR"t_self_inspectst class_loggertMemoizedHasCacheKeyR+R`RRUR=RQRYRqRrRxRRRR(((sH/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/orm/mapper.pyts       G !3#  1