%PDF- %PDF-
Direktori : /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/ |
Current File : //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/instrumentation.pyo |
� ��4]c @ sT d Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d Z d � Z e g Z d e f d � � YZ e � e _ Z e e _ d e f d � � YZ d e f d � � YZ d � Z d � Z d � Z d S( s� Extensible class instrumentation. The :mod:`sqlalchemy.ext.instrumentation` package provides for alternate systems of class instrumentation within the ORM. Class instrumentation refers to how the ORM places attributes on the class which maintain data and track changes to that data, as well as event hooks installed on the class. .. note:: The extension package is provided for the benefit of integration with other object management packages, which already perform their own instrumentation. It is not intended for general use. For examples of how the instrumentation extension is used, see the example :ref:`examples_instrumentation`. i����Ni ( t util( t attributes( t base( t collections( t exc( t instrumentation( t _default_dict_getter( t _default_manager_getter( t _default_state_getter( t ClassManager( t InstrumentationFactoryt __sa_instrumentation_manager__c C s t | t d � S( s; Find user-specified instrumentation management for a class.N( t getattrt INSTRUMENTATION_MANAGERt None( t cls( ( sQ /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/instrumentation.pyt% find_native_user_instrumentation_hook; s t ExtendedInstrumentationRegistryc B s� e Z d Z e j � Z e j � Z e j � Z e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s� Extends :class:`.InstrumentationFactory` with additional bookkeeping, to accommodate multiple types of class managers. c C sM xF t D]: } | | � } | d k r | j | | � } | | f Sq Wd Sd S( N( NN( t instrumentation_findersR t _extended_class_manager( t selft class_t findert factoryt manager( ( sQ /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/instrumentation.pyt _locate_extended_factory] s c C sG | j | � j | g � } | rC t d | j t | � f � � n d S( NsR multiple instrumentation implementations specified in %s inheritance hierarchy: %r( t! _collect_management_factories_fort differencet TypeErrort __name__t list( R R R t existing_factories( ( sQ /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/instrumentation.pyt _check_conflictsf s c C s� | | � } t | t � s- t | | � } n | t k rV | j rV t | _ t � n | j � | j | <| j � | j | <| j � | j | <| S( N( t isinstanceR t _ClassInstrumentationAdaptert _extendedt Truet _install_instrumented_lookupst manager_gettert _manager_finderst state_gettert _state_finderst dict_gettert _dict_finders( R R R R ( ( sQ /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/instrumentation.pyR q s c C s� t j | � } t � } x| | D]t } | j | � } | d k rS | j | j � q x0 t D]"