관리-도구
편집 파일: schema.cpython-37.pyc
B ��4]�� � @ s d Z ddlmZ ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZ dd l mZ dd l m Z ddl mZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ e�d�Ze�dd�Z dd� Z!dd � Z"ej#G d!d"� d"ee j$��Z%G d#d$� d$e e%e�Z&G d%d&� d&e e%e�Z'G d'd(� d(e e%�Z(G d)d*� d*e)�Z*G d+d,� d,e*e%�Z+G d-d.� d.e+�Z,G d/d0� d0e+�Z-ej#G d1d2� d2e*e��Z.G d3d4� d4e.�Z/e�0d5d6�G d7d8� d8e/��Z1G d9d:� d:e e%�Z2d;d<� Z3d=d>� Z4G d?d@� d@e)�Z5G dAdB� dBe5e2�Z6G dCdD� dDe6�Z7G dEdF� dFe6�Z8G dGdH� dHe6�Z9G dIdJ� dJe6�Z:G dKdL� dLe e5e%�Z;e�<dMdNi�Z=G dOdP� dPe%�Z>G dQdR� dRe>�Z?G dSdT� dTe)�Z@e@d�ZAe@jBZBdS )Ua/ The schema module provides the building blocks for database metadata. Each element within this module describes a database entity which can be created and dropped, or is otherwise part of such an entity. Examples include tables, columns, sequences, and indexes. All entities are subclasses of :class:`~sqlalchemy.schema.SchemaItem`, and as defined in this module they are intended to be agnostic of any vendor-specific constructs. A collection of entities are grouped into a unit called :class:`~sqlalchemy.schema.MetaData`. MetaData serves as a logical grouping of schema elements, and can also be associated with an actual database connection such that operations involving the contained elements can contact the database as needed. Two of the elements here also build upon their "syntactic" counterparts, which are defined in :class:`~sqlalchemy.sql.expression.`, specifically :class:`~sqlalchemy.schema.Table` and :class:`~sqlalchemy.schema.Column`. Since these objects are part of the SQL expression language, they are usable as components in SQL expressions. � )�absolute_importN� )�ddl)�type_api)�visitors)�_bind_or_error)�ColumnCollection)� DialectKWArgs)�SchemaEventTarget)� _as_truncated)�_document_text_coercion)�_literal_as_text)� ClauseElement)�ColumnClause)� ColumnElement)�quoted_name)� TextClause)�TableClause� )�event)�exc)� inspection)�utilZ retain_schemaZblank_schemaz�Symbol indicating that a :class:`.Table` or :class:`.Sequence` should have 'None' for its schema, even if the parent :class:`.MetaData` has specified a schema. .. versionadded:: 1.0.14 c C s |d kr| S |d | S d S )N�.� )�name�schemar r �H/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/sql/schema.py�_get_table_keyI s r c s � �fdd�}t �| i |�S )Nc s4 t | t�r,| j� kr,| j� jkr,�j| j S d S d S )N)� isinstance�Column�table�key�c)�col)�source_table�target_tabler r �replaceS s z!_copy_expression.<locals>.replace)r Zreplacement_traverse)Z expressionr% r&