AlkantarClanX12

Your IP : 3.22.77.191


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/orm/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/sqlalchemy/orm/__pycache__/sync.cpython-311.pyc

�

�܋f���d�dZddlmZddlmZddlmZddlmZd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd
S)zgprivate module containing functions used for copying data
between instances based on join conditions.

�)�
attributes)�exc)�util�c
�\�|j}|j}|D�]\}	}
	|j|	}|j|jj�||tj��}n0#tj	$r}
td||	||
|
��Yd}
~
nd}
~
wwxYw	|j|
}|j|jj�|||d��n0#tj	$r}
td||	||
|
��Yd}
~
nd}
~
wwxYw|r0|	jr)|
jr"|
�
|	��r
d|jd||
f<��dS)NFT�pk_cascaded)�dict�_columntoproperty�manager�key�impl�getr�PASSIVE_OFFr�UnmappedColumnError�_raise_col_to_prop�set�primary_key�
references)�source�
source_mapper�dest�dest_mapper�synchronize_pairs�	uowcommit�flag_cascaded_pks�source_dict�	dest_dict�l�r�prop�value�errs              �J/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/orm/sync.py�populater$s����+�K��	�I�!�B�B���1�	M� �2�1�5�D��N�4�8�,�1�5�5���Z�%;���E�E���&�	M�	M�	M��u�m�Q��Q��L�L�L�L�L�L�L�L�����	M����	L��0��3�D��L���"�'�+�+�D�)�U�D�I�I�I�I���&�	L�	L�	L��t�]�A�{�A�s�K�K�K�K�K�K�K�K�����	L����
�	B��
�	B��
�	B����Q���		B�>B�I� �-��q�!9�:��9B�Bs0�AA�B	�+B�B	�
:C�C5�C0�0C5c
�.�|D]�\}}	|j|}||j}n0#tj$r}t	d|||||��Yd}~nd}~wwxYw	|j|}|||j<�j#tj$rt	d||||��Y��wxYwdS)NFT)r
rrrr)rrrrrr r!r"s        r#�bulk_populate_inherit_keysr&>s���!�I�I���1�	O� �2�1�5�D����)�E�E���&�	O�	O�	O��u�m�Q�
�q�#�N�N�N�N�N�N�N�N�����	O����	I� �2�1�5�D�$)�K���!�!���&�	I�	I�	I��t�]�A�}�a�H�H�H�H�H�	I����I�Is&�$�A�A�A�A-�-"B�Bc
�`�|D]�\}}|jrP|�||j|��tjvr(td|�dtj|���d����	|�||j|d���{#tj	$r}tdd||||��Yd}~��d}~wwxYwdS)Nz7Dependency rule tried to blank-out primary key column 'z' on instance '�'T)r�_get_state_attr_by_columnr	�orm_util�	_none_set�AssertionError�	state_str�_set_state_attr_by_columnrrr)rrrrrr"s      r#�clearr/Ns���!�C�C���1�
�M�		��5�5�d�D�I�q�I�I��%�&�&�!�.�23�!�!�X�5G��5M�5M�5M�5M�O���
�	C��1�1�$��	�1�d�K�K�K�K���&�	C�	C�	C��t�T�1�k�1�c�B�B�B�B�B�B�B�B�����	C����C�Cs� A>�>B+�
B&�&B+c
�H�|D]�\}}	|�|���|��}|�||j|tj���}n0#tj$r}	td||d||	��Yd}	~	nd}	~	wwxYw|||j	<||||j	z<��dS�N)�passiveF)
�_get_committed_attr_by_column�objr)r	rrrrrr)
rrr�
old_prefixrrr�oldvaluer!r"s
          r#�updater7`s���!�,�,���1�	F�$�B�B��
�
���a���H�"�;�;����Q�
�0F�<���E�E���&�	F�	F�	F��u�m�Q��a��E�E�E�E�E�E�E�E�����	F������Q�U��#+��Z�!�%�
� � �,�,s�AA�B�)B�Bc
���|D]i\}}	|�||j|tj���}n0#tj$r}t
d||d||��Yd}~nd}~wwxYw|||j<�jdSr1)r)r	rrrrrr)rr�dict_rrrr!r"s        r#�
populate_dictr:os���!�����1�	F�!�;�;����Q�
�0F�<���E�E���&�	F�	F�	F��u�m�Q��a��E�E�E�E�E�E�E�E�����	F������a�e����s�(2�A�A�Ac
��|D]�\}}	|j|}n0#tj$r}td||d||��Yd}~nd}~wwxYw|�||jtj��}t|j	��rdS��dS)zpreturn true if the source object has changes from an old to a
    new value on the given synchronize pairs

    FNT)
r
rrr�get_attribute_historyrr�PASSIVE_NO_INITIALIZE�bool�deleted)	rrrrrrr r"�historys	         r#�source_modifiedrA{s���
"�����1�	F� �2�1�5�D�D���&�	F�	F�	F��u�m�Q��a��E�E�E�E�E�E�E�E�����	F�����1�1��D�H�j�>�
�
����� � �	��4�4�	��us�
�A�?�Ac���|r1tjtjd|�d|�d���|���dStjtjd|�d|�d|�d���|���dS)Nz0Can't execute sync rule for destination column 'z'; mapper 'z�' does not map this column.  Try using an explicit `foreign_keys` collection which does not include this column (or use a viewonly=True relation).)�replace_contextz+Can't execute sync rule for source column 'zx' does not map this column.  Try using an explicit `foreign_keys` collection which does not include destination column 'z$' (or use a viewonly=True relation).)r�raise_rr)�isdestr�
source_columnr�dest_columnr"s      r#rr�s����
����#�#�
1<���[�[�[�	J�
�
� �		
�		
�		
�		
�		
�		
�	
���#�#�!�=�=�-�-�-����>�
�
� �
	
�
	
�
	
�
	
�
	
�
	
�N)
�__doc__�rrrr*r$r&r/r7r:rAr�rHr#�<module>rLs�����
������������������������(B�(B�(B�V
I�
I�
I� C�C�C�$,�,�,�	�	�	����&
�
�
�
�
rH