HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
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�_columntoproperty�manager�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)rrrrr
)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_columnrrr
)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�objrrrrrrr
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)rrrrrrr
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)
rrrr
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__�rrrr rrr"r%r&r)r
rrrr�<module>s+