Repository URL to install this package:
|
Version:
3.4.51 ▾
|
contego
/
home
/
tvault
/
.virtenv
/
lib
/
python2.7
/
site-packages
/
sqlalchemy
/
sql
/
annotation.pyc
|
|---|
ó
EYc @ sy d Z d d l m Z d d l m Z d e f d YZ i Z d d Z d d Z d Z
d
Z d Z d S(
s The :class:`.Annotated` class and related routines; creates hash-equivalent
copies of SQL constructs which contain context-specific markers and
associations.
i ( t utili ( t operatorst Annotatedc B st e Z d Z d Z d Z d Z d Z d e d Z d Z
e d Z d Z
d Z d
Z RS( s clones a ClauseElement and applies an 'annotations' dictionary.
Unlike regular clones, this clone also mimics __hash__() and
__cmp__() of the original element so that it takes its place
in hashed collections.
A reference to the original element is maintained, for the important
reason of keeping its hash value current. When GC'ed, the
hash value may be reused, causing conflicts.
c G sg | s t j | S| \ } } y t | j } Wn# t k
rU t | j | } n Xt j | Sd S( N( t objectt __new__t annotated_classest __class__t KeyErrort _new_annotation_type( t clst argst elementt values( ( sN /home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR s
c C s7 | j j | _ | | _ | | _ t | | _ d S( N( t __dict__t copyt _Annotated__elementt _annotationst hasht _hash( t selfR R ( ( sN /home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt __init__- s c C s) | j j } | j | | j | S( N( R R t updatet _with_annotations( R R t _values( ( sN /home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt _annotate3 s
c C s4 | j j | j } | j j | _ | | _ | S( N( R R R
R R ( R R t clone( ( sN /home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyR 8 s c C sT | d k r | j S| j j } x | D] } | j | d q) W| j | Sd S( N( t NoneR R R t popR ( R R R R t v( ( sN /home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/sql/annotation.pyt _deannotate>