Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/sqlalchemy/sql/__pycache__/util.cpython-39.pyc
Ðазад
a _�hZu � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ dd lm Z ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% ddlm&Z& d d!lm'Z' d d"lm(Z( e(j)�*e#j+d#�Z,d$d%� Z-d&d'� Z.d(d)� Z/d*d+� Z0dYd-d.�Z1d/d0� Z2d1d2� Z3d3d4� Z4d5d6� Z5d7d8� Z6d9d:� Z7d;d<� Z8dZd>d?�Z9d@dA� Z:dBdC� Z;dDdE� Z<G dFdG� dGe=�Z>G dHdI� dIe>�Z?G dJdK� dKe>�Z@dLdM� ZAd[dOdP�ZBdQdR� ZCd\dSdT�ZDG dUdV� dVejE�ZFG dWdX� dXeF�ZGdNS )]z;High level utilities which build upon other modules here. � )�deque)�chain� )� operators)�visitors)�_deep_annotate)�_deep_deannotate)�_shallow_annotate)� _from_objects)� ColumnSet)�sort_tables)�_expand_cloned)� _find_columns)�_label_reference)�_textual_label_reference)� BindParameter)�ColumnClause)� ColumnElement)�Grouping)�Label)�Null)�UnaryExpression)�Column)�Alias)� FromClause)�FromGrouping)�Join)�ScalarSelect)� SelectBase)�TableClause� )�exc)�utilz.sql.util.join_conditionc C sD t t|��}g }t| �D ]&\}}|D ]}|�|�r$|�|� q$q|S )a� Given a list of FROM clauses and a selectable, return the first index and element from the list of clauses which can be joined against the selectable. returns None, None if no match is found. e.g.:: clause1 = table1.join(table2) clause2 = table4.join(table5) join_to = table2.join(table3) find_join_source([clause1, clause2], join_to) == clause1 )�listr � enumerate�is_derived_from�append)�clauses�join_to�selectables�idx�i�f�s� r. ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/sqlalchemy/sql/util.py�find_join_source3 s r0 c C s� t t|��}g }t| �D ]*\}}|D ]}|�|�r$|�|� qq$qt|�dkr�g }|D ]:}| | }|D ](}tt|���t|��rh|�|� qXqhqX|r�|S |S )z�Given a list of FROM clauses and a selectable, return the indexes from the list of clauses which is derived from the selectable. r ) r# r r$ r% r&