관리-도구
편집 파일: persistence.cpython-311.pyc
� �܋f� � �^ � d Z ddlmZ ddlmZ ddlZddlmZ ddlmZ ddlmZ dd lm Z dd lmZ ddlm Z ddlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d� Zd� Zd=d�Zd� Zd� Zd� Zd� Zd� Z d>d�Z d=d�Zd� Zd� Z d?d �Z! d?d!�Z"d"� Z#d#� Z$d$� Z%d%� Z&d&� Z'd'� Z(d(� Z)d)� Z*d*� Z+ G d+� d,e,� � Z- G d-� d.e-� � Z. G d/� d0e-� � Z/ G d1� d2e-� � Z0 G d3� d4e-� � Z1 G d5� d6e.e0� � Z2 G d7� d8e.e1� � Z3 G d9� d:e/e0� � Z4 G d;� d<e/e1� � Z5dS )@z�private module containing functions used to emit INSERT, UPDATE and DELETE statements on behalf of a :class:`_orm.Mapper` and its descending mappers. The functions here are called only by the unit of work functions in unitofwork.py. � )�chain)�groupbyN� )� attributes)� evaluator)�exc)�loading)�sync)�_entity_descriptor)� state_str� )�sql)�util)� expression)� _from_objectsc � � ��� � j }t |� � }|j j rt d� � �|r(|rd� |D � � }d� |D � � }nd� |D � � }nt |� � }|� |� � �|j � � � D ]_\ } } � � | � � s��� fd�t | �� fd�|D � � d||�� � D � � }t |d || | ||� � � �`|rD|rD� j }d � � j D � � } |D ]+\ }�|t �fd�| D � � � � f|_ �(d S d S d S )NzJconnection_callable / per-instance sharding not supported in bulk_insert()c � � g | ]}||j f��S � ��dict��.0�states �Q/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/orm/persistence.py� <listcomp>z _bulk_insert.<locals>.<listcomp>7 s � �@�@�@�e�u�e�j�)�@�@�@� c � � g | ]\ }}|��S r r )r r �dict_s r r z _bulk_insert.<locals>.<listcomp>8 s � �;�;�;�.�5�%��;�;�;r c � � g | ] }|j �� S r r r s r r z _bulk_insert.<locals>.<listcomp>: � � �9�9�9�u�� �9�9�9r c 3 �>