%PDF- %PDF-
Direktori : /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/ |
Current File : //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/util.pyc |
� ��4]c @ sa d d l m Z d � Z d � Z y d d l m Z Wn$ e k r\ e � j e � � n Xd S( i ( t utilc s t j � f d � � } | S( s� Decorator, memoize a function in a connection.info stash. Only applicable to functions which take no arguments other than a connection. The memo will be stored in ``connection.info[key]``. c sN | j � } y | j � SWn, t k rI | | | � | j � <} | SXd S( N( t connectt infot KeyError( t fnt selft connectiont val( t key( sI /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/util.pyt decorated s ( R t decorator( R R ( ( R sI /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/util.pyt connection_memoize s c C s d � } t � S( Nc S s� | s | r | g Sg Sn� t | � d k r� | d } t | t t f � r� | sy t | d d � r} t | d d � r} | S| g Sq� t | d � r� | g S| g g Sn2 t | d d � r� t | d d � r� | S| g Sd S( s Given arguments from the calling form \*multiparams, \**params, return a list of bind parameter structures, usually a list of dictionaries. In the case of 'raw' execution which accepts positional parameters, it may be a list of tuples or lists. i i t __iter__t stript keysN( t lent isinstancet listt tuplet hasattr( t multiparamst paramst zero( ( sI /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/engine/util.pyt _distill_params s&