관리-도구
편집 파일: _selectable_constructors.cpython-38.pyc
U -?�f\I � @ s� d dl mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlm Z d d l mZ d dl mZ d dl mZ d d l mZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ e�rd dl mZ d dl m Z d dl m!Z! d dl m"Z" d dl m#Z# d d l m$Z$ d d!l m%Z% d d"l m&Z& d d#l m'Z' d d$l m(Z( d d%l m)Z) d d&l m*Z* d d'l m+Z+ d d(l m,Z- d d)l.m/Z/ d d*lm0Z0 d d+lm1Z1 d d,lm2Z2 d d-lm3Z3 ed.ed/�Z4d�d2d3d4d5d6�d7d8�Z5d�d9d3d4d:d;�d<d=�Z6d>d?d@�dAdB�Z7d>d?d@�dCdD�Z8d�dEdFdG�dHdI�Z9d>d?d@�dJdK�Z:d>d?d@�dLdM�Z;d�dNdNdOd4d4dPdQ�dRdS�Z<d�dTd3dUdV�dWdX�Z=d�dNdNdOd4dPdY�dZd[�Z>ed\d]d^�d_d`��Z?ed\dadbdc�ddd`��Z?ed\dadedfdg�dhd`��Z?ed\dadedidjdk�dld`��Z?ed\dadedidmdndo�dpd`��Z?ed\dadedidmdqdrds�dtd`��Z?ed\dadedidmdqdudvdw�dxd`��Z?ed\dadedidmdqdudydzd{� d|d`��Z?ed\dadedidmdqdudyd}d~d� d�d`��Z?ed\dadedidmdqdudyd}d�d�d��d�d`��Z?ed�d�d�d��d�d`��Z?d�d�d�d��d�d`�Z?d�d�d�d�d��d�d��Z@d�dNd�d3d�d�d��d�d��ZAd>d?d@�d�d��ZBd>d?d@�d�d��ZCd0d1d��d�d3d4d�d��d�d��ZDd0S )�� )�annotations)�Any)�Optional)�overload)�Tuple)� TYPE_CHECKING)�TypeVar)�Union� )� coercions)�roles)�_ColumnsClauseArgument)�_no_kw)�ColumnClause)�Alias)�CompoundSelect��Exists)� FromClause��Join)�Lateral)�LateralFromClause)�NamedFromClause)�Select��TableClause)�TableSample��Values)�_FromClauseArgument)�_OnClauseArgument)�#_SelectStatementForCompoundArgument)�_T0)�_T1)�_T2)�_T3)�_T4)�_T5)�_T6)�_T7)�_T8)�_T9)�_TypedColumnClauseArgument)�Function)�CTE)�HasCTE)�ScalarSelect)� SelectBase�_T)�boundNFr z Optional[str]�boolr )� selectable�name�flat�returnc C s t j| ||d�S )a, Return a named alias of the given :class:`.FromClause`. For :class:`.Table` and :class:`.Join` objects, the return type is the :class:`_expression.Alias` object. Other kinds of :class:`.NamedFromClause` objects may be returned for other kinds of :class:`.FromClause` objects. The named alias represents any :class:`_expression.FromClause` with an alternate name assigned within SQL, typically using the ``AS`` clause when generated, e.g. ``SELECT * FROM table AS aliasname``. Equivalent functionality is available via the :meth:`_expression.FromClause.alias` method available on all :class:`_expression.FromClause` objects. :param selectable: any :class:`_expression.FromClause` subclass, such as a table, select statement, etc. :param name: string name to be assigned as the alias. If ``None``, a name will be deterministically generated at compile time. Deterministic means the name is guaranteed to be unique against other constructs used in the same statement, and will also be the same name for each successive compilation of the same statement object. :param flat: Will be passed through to if the given selectable is an instance of :class:`_expression.Join` - see :meth:`_expression.Join.alias` for details. )r7 r8 )r �_factory)r6 r7 r8 � r; �W/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/sql/_selectable_constructors.py�alias= s r= r0 r/ )r6 r7 � recursiver9 c C s t �tj| �j||d�S )z�Return a new :class:`_expression.CTE`, or Common Table Expression instance. Please see :meth:`_expression.HasCTE.cte` for detail on CTE usage. )r7 r>