관리-도구
편집 파일: loading.cpython-37.pyc
B ��4]�} � @ s4 d Z ddlmZ ddlZddlmZ ddlmZ ddlmZ ddlm Z dd l mZ dd l mZ ddl mZ ddl mZ d dlmZ d dlm Z d dlm Z e �� Zdd� Ze �d�d-dd��Zdd� Zd.dd�Zd/dd�Zd0dd�Zd1dd�Zdd � Zd!d"� Zd#d$� Zd%d&� Z d'd(� Z!G d)d*� d*e"�Z#d+d,� Z$dS )2z�private module containing functions used to convert database rows into object instances and associated state. the functions here are called primarily by Query, Mapper, as well as some of the attribute loading strategies. � )�absolute_importN� )� attributes)�exc)� path_registry)�strategy_options)�_DEFER_FOR_STATE)�_SET_DEFERRED_EXPIRED)� _none_set)� state_str� )�utilc # sz t � � _i � _�j}�j o4t�j�dko4�jd j}|rP|rDt}n�fdd�}y�t t � ��fdd��jD �� �\�}|s�t�d|��x�i � _ �jr����j�}|s�P n��� }|rЈd ��fdd�|D �}n��fd d�|D �}x"� j�� D ]\} } | �� | � q�W |�rt�||�}x|D ]}|V �q W �js�P q�W W n6 tk �rt } z��� t�|� W d d }~X Y nX d S )z$Return an ORM result as an iterator.r r c s t dd� t� j| �D ��S )Nc s s$ | ]\}}|j rt|�n|V qd S )N)Zuse_id_for_hash�id)�.0�ent�item� r �I/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/orm/loading.py� <genexpr>8 s z/instances.<locals>.filter_fn.<locals>.<genexpr>)�tuple�zip� _entities)�row)�queryr r � filter_fn6 s zinstances.<locals>.filter_fnc s g | ]}|� �� ���qS r )Z row_processor)r �query_entity)�context�cursorr r r � <listcomp>@ s zinstances.<locals>.<listcomp>�resultc s g | ]}� |��qS r r )r r )�procr r r U s c s"