%PDF- %PDF-
Direktori : /proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/ |
Current File : //proc/self/root/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/horizontal_shard.pyc |
� ��4]c @ s� d Z d d l m Z d d l m Z d d l m Z d d l m Z d d g Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( s Horizontal sharding support. Defines a rudimental 'horizontal sharding' system which allows a Session to distribute queries and persistence operations across multiple databases. For a usage example, see the :ref:`examples_sharding` example included in the source distribution. i ( t inspect( t util( t Query( t Sessiont ShardedSessiont ShardedQueryc B sG e Z d � Z d � Z d � Z d � Z d d d � Z d d � Z RS( c O sD t t | � j | | � | j j | _ | j j | _ d | _ d S( N( t superR t __init__t sessiont id_choosert query_choosert Nonet _shard_id( t selft argst kwargs( ( sR /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/horizontal_shard.pyR s c C s | j � } | | _ | S( s� return a new query, limited to a single shard ID. all subsequent operations with the returned query will be against the single shard regardless of other state. ( t _cloneR ( R t shard_idt q( ( sR /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/ext/horizontal_shard.pyt set_shard"