관리-도구
편집 파일: persistence.cpython-38.pyc
U -?�f� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlZddlm Z dd lm Z dd lmZ ddlm Z ddlmZ d d lm Z d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ dDdd�Zdd� Zdd� Zdd� Zdd� Z d d!� Z!dddd"d#�d$d%�Z"ddd"d&�d'd(�Z#d)d*� Z$d+d,� Z%d-dd-d.�d/d0�Z&d-ddd1�d2d3�Z'd4d5� Z(d6d7� Z)d8d9� Z*d:d;� Z+d<d=� Z,d>d?� Z-d@dA� Z.dBdC� Z/dS )Ez�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. � )�annotations)�chain)�groupby)�zip_longestN� )� attributes)�exc)�loading)�sync)� state_str� )�future)�sql)�util)�cursor)� operators)�BooleanClauseList)�LABEL_STYLE_TABLENAME_PLUS_COLFc C s |s0| j s0t| |�D ]}t| |g|dd� qdS g }g }t| ||�D ]B\}}}} } }}| s^|rt|�|||| |f� qD|�|||| f� qD| j�� D ]J\} }| |jkr�q�t| |�}t || |�}t | ||| |� t| ||| |� q�t| |t dd� |D �dd� |D ��� dS )a; Issue ``INSERT`` and/or ``UPDATE`` statements for a list of objects. This is called within the context of a UOWTransaction during a flush operation, given a list of states to be flushed. The base mapper in an inheritance hierarchy handles the inserts/ updates for all descendant mappers. T)�singleNc s s$ | ]\}}}}||||d fV qdS )FN� )�.0�state� state_dict�mapper� connectionr r �J/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/orm/persistence.py� <genexpr>i s �zsave_obj.<locals>.<genexpr>c s s&