%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/__pycache__/
Upload File :
Create Path :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/__pycache__/sync.cpython-37.pyc

B

��4]��@sddZddlmZddlmZddlmZdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�ZdS)zgprivate module containing functions used for copying data
between instances based on join conditions.

�)�
attributes)�exc)�utilc

Cs�|j}|j}x�|D]�\}	}
y(|j|	}|j|jj�||tj�}Wn&tj	k
rht
d||	||
�YnXy(|j|
}|j|jj�|||d�Wn&tj	k
r�t
d||	||
�YnX|r|	jr|
jr|
�
|	�rd|jd||
f<qWdS)NFTZpk_cascaded)�dict�_columntopropertyZmanager�key�impl�getr�PASSIVE_OFFr�UnmappedColumnError�_raise_col_to_prop�set�primary_keyZ
references)
�source�
source_mapper�dest�dest_mapper�synchronize_pairs�	uowcommitZflag_cascaded_pks�source_dictZ	dest_dict�l�r�prop�value�r�F/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/sync.py�populates&	


rc
Cs�x�|D]�\}}y|j|}||j}Wn&tjk
rLtd||||�YnXy|j|}|||j<Wqtjk
r�td||||�YqXqWdS)NFT)rrrrr)rrrrrrrrrr�bulk_populate_inherit_keys=s

rc
Cs�x�|D]x\}}|jr@|�||j|�tjkr@td|t�|�f��y|�||j|d�Wqtj	k
r|t
dd|||�YqXqWdS)NzKDependency rule tried to blank-out primary key column '%s' on instance '%s'T)r�_get_state_attr_by_columnr�orm_utilZ	_none_set�AssertionErrorZ	state_strZ_set_state_attr_by_columnrrr)rrrrrrrr�clearMsr!c	
Cs�xz|D]r\}}y*|�|��|�}|j||j|tjd�}Wn&tjk
r^td||d|�YnX|||j	<||||j	<qWdS)N)�passiveF)
Z_get_committed_attr_by_column�objrrrr
rrrr)	rrrZ
old_prefixrrrZoldvaluerrrr�update_s
r$c
Csbx\|D]T\}}y|j||j|tjd�}Wn&tjk
rNtd||d|�YnX|||j<qWdS)N)r"F)rrrr
rrrr)rrZdict_rrrrrrr�
populate_dictnsr%c
Cspxj|D]^\}}y|j|}Wn&tjk
rBtd||d|�YnX|�||jtj�}t|j	�rdSqWdSdS)zpreturn true if the source object has changes from an old to a
    new value on the given synchronize pairs

    FNT)
rrrrZget_attribute_historyrrZPASSIVE_NO_INITIALIZE�boolZdeleted)rrrrrrr�historyrrr�source_modifiedzs
r(cCs0|rt�d||f��nt�d|||f��dS)Nz�Can't execute sync rule for destination column '%s'; mapper '%s' does not map this column.  Try using an explicit `foreign_keys` collection which does not include this column (or use a viewonly=True relation).z�Can't execute sync rule for source column '%s'; mapper '%s' does not map this column.  Try using an explicit `foreign_keys` collection which does not include destination column '%s' (or use a viewonly=True relation).)rr)ZisdestrZ
source_columnrZdest_columnrrrr�srN)
�__doc__�rrrrrrr!r$r%r(rrrrr�<module>s+

Zerion Mini Shell 1.0