관리-도구
편집 파일: requirements.cpython-38.pyc
U -?�f&� � @ s� d Z ddlmZ ddlZddlmZ ddlmZ ddlmZ dd lm Z dd lm Z ddlmZ G dd � d �Z G dd� de �ZdS )z�Global database feature support policy. Provides decorators to mark tests requiring specific feature support from the target database. External dialect test suites should subclass SuiteRequirements to provide specific inclusion/exclusions. � )�annotationsN� )�asyncio)� exclusions��only_on� �� create_engine)�util)� QueuePoolc @ s e Zd ZdS )�RequirementsN)�__name__� __module__�__qualname__� r r �O/opt/hc_python/lib64/python3.8/site-packages/sqlalchemy/testing/requirements.pyr s r c @ s� e Zd Zedd� �Zedd� �Zedd� �Zedd� �Zed d � �Zedd� �Z ed d� �Z edd� �Zedd� �Zedd� �Z edd� �Zedd� �Zedd� �Zedd� �Zedd� �Zedd � �Zed!d"� �Zed#d$� �Zed%d&� �Zed'd(� �Zed)d*� �Zed+d,� �Zed-d.� �Zed/d0� �Zed1d2� �Zed3d4� �Zed5d6� �Zed7d8� �Zed9d:� �Z ed;d<� �Z!ed=d>� �Z"ed?d@� �Z#edAdB� �Z$edCdD� �Z%edEdF� �Z&edGdH� �Z'edIdJ� �Z(edKdL� �Z)edMdN� �Z*edOdP� �Z+edQdR� �Z,edSdT� �Z-edUdV� �Z.edWdX� �Z/edYdZ� �Z0ed[d\� �Z1ed]d^� �Z2ed_d`� �Z3edadb� �Z4edcdd� �Z5ededf� �Z6edgdh� �Z7edidj� �Z8edkdl� �Z9edmdn� �Z:edodp� �Z;edqdr� �Z<edsdt� �Z=edudv� �Z>edwdx� �Z?edydz� �Z@ed{d|� �ZAed}d~� �ZBedd�� �ZCed�d�� �ZDed�d�� �ZEed�d�� �ZFed�d�� �ZGed�d�� �ZHed�d�� �ZIed�d�� �ZJed�d�� �ZKed�d�� �ZLed�d�� �ZMed�d�� �ZNed�d�� �ZOed�d�� �ZPed�d�� �ZQed�d�� �ZRed�d�� �ZSed�d�� �ZTed�d�� �ZUed�d�� �ZVed�d�� �ZWed�d�� �ZXed�d�� �ZYed�d�� �ZZed�d�� �Z[ed�d�� �Z\ed�d�� �Z]ed�d�� �Z^ed�d�� �Z_ed�d�� �Z`ed�d�� �Zaed�d�� �Zbed�d�� �Zced�d �Zded�dĄ �Zeed�dƄ �Zfed�dȄ �Zged�dʄ �Zhed�d̄ �Zied�d΄ �Zjed�dЄ �Zked�d҄ �Zled�dԄ �Zmed�dք �Zned�d �Zoed�dڄ �Zped�d܄ �Zqed�dބ �Zred�d� �Zsed�d� �Zted�d� �Zued�d� �Zved�d� �Zwed�d� �Zxed�d� �Zyed�d� �Zzed�d� �Z{ed�d� �Z|ed�d� �Z}ed�d�� �Z~ed�d�� �Zed�d�� �Z�ed�d�� �Z�ed�d�� �Z�ed��d � �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d �d � �Z��d�d� Z�e�d �d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d� �Z�e�d�d � �Z�e�d!�d"� �Z�e�d#�d$� �Z�e�d%�d&� �Z�e�d'�d(� �Z�e�d)�d*� �Z�e�d+�d,� �Z�e�d-�d.� �Z�e�d/�d0� �Z�e�d1�d2� �Z�e�d3�d4� �Z�e�d5�d6� �Z�e�d7�d8� �Z�e�d9�d:� �Z�e�d;�d<� �Z�e�d=�d>� �Z�e�d?�d@� �Z�e�dA�dB� �Z�e�dC�dD� �Z�e�dE�dF� �Z�e�dG�dH� �Z�e�dI�dJ� �Z�e�dK�dL� �Z�e�dM�dN� �Z�e�dO�dP� �Z�e�dQ�dR� �Z�e�dS�dT� �Z�e�dU�dV� �Z�e�dW�dX� �Z��dY�dZ� Z�e�d[�d\� �Z�e�d]�d^� �Z�e�d_�d`� �Z�e�da�db� �Z�e�dc�dd� �Z�e�de�df� �Z�e�dg�dh� �Z��di�dj� Z�e�dk�dl� �Z�e�dm�dn� �Z�e�do�dp� �Z�e�dq�dr� �Z�e�ds�dt� �Z�e�du�dv� �Z�e�dw�dx� �Z�e�dy�dz� �Z�e�d{�d|� �Z�e�d}�d~� �Z�e�d�d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Zǐd��d�� ZȐd��d�� Z�e�d��d�� �Z�e�d��d�� �Zːd��d�� Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d�� �Z�e�d��d �Z�e�dÐdĄ �Z�e�dŐdƄ �Z�e�dǐdȄ �Z�e�dɐdʄ �Z�e�dːd̄ �Z�e�d͐d΄ �Z�e�dϐdЄ �Z�e�dѐd҄ �Z�d�S (� �SuiteRequirementsc C s t �� S )z/target platform can emit basic CreateTable DDL.�r �open��selfr r r �create_table% s zSuiteRequirements.create_tablec C s t �� S )z-target platform can emit basic DropTable DDL.r r r r r � drop_table+ s zSuiteRequirements.drop_tablec C s t �� S )z>target platform supports IF NOT EXISTS / IF EXISTS for tables.�r �closedr r r r �table_ddl_if_exists1 s z%SuiteRequirements.table_ddl_if_existsc C s t �� S )z?target platform supports IF NOT EXISTS / IF EXISTS for indexes.r r r r r �index_ddl_if_exists7 s z%SuiteRequirements.index_ddl_if_existsc C s t �� S )z0Return databases that support the UUID datatype.r r r r r �uuid_data_type= s z SuiteRequirements.uuid_data_typec C s t �� S )z*Target database must support foreign keys.r r r r r �foreign_keysC s zSuiteRequirements.foreign_keysc C s t �� S )zKTarget database creates an index that's reflected for foreign keys.r r r r r �foreign_keys_reflect_as_indexI s z/SuiteRequirements.foreign_keys_reflect_as_indexc C s t �� S )z=Target database reflects unique indexes as unique constrains.r r r r r �*unique_index_reflect_as_unique_constraintsP s z<SuiteRequirements.unique_index_reflect_as_unique_constraintsc C s t �� S )z7Target database reflects unique constraints as indexes.r r r r r �#unique_constraints_reflect_as_indexV s z5SuiteRequirements.unique_constraints_reflect_as_indexc C s t �� S )z�Database / dialect supports a query like:: SELECT * FROM VALUES ( (c1, c2), (c1, c2), ...) AS some_table(col1, col2) SQLAlchemy generates this with the :func:`_sql.values` function. r r r r r �table_value_constructor\ s z)SuiteRequirements.table_value_constructorc C s t �� S )a� Target database passes SQL-92 style statements to cursor.execute() when a statement like select() or insert() is run. A very small portion of dialect-level tests will ensure that certain conditions are present in SQL strings, and these tests use very basic SQL that will work on any SQL-like platform in order to assert results. It's normally a given for any pep-249 DBAPI that a statement like "SELECT id, name FROM table WHERE some_table.id=5" will work. However, there are dialects that don't actually produce SQL Strings and instead may work with symbolic objects instead, or dialects that aren't working with SQL, so for those this requirement can be marked as excluded. r r r r r �standard_cursor_sqlh s z%SuiteRequirements.standard_cursor_sqlc C s t �� S )zQtarget database must support ON UPDATE..CASCADE behavior in foreign keys.r r r r r �on_update_cascade| s z#SuiteRequirements.on_update_cascadec C s t �� S )zWtarget database must *not* support ON UPDATE..CASCADE behavior in foreign keys.r r r r r �non_updating_cascade� s z&SuiteRequirements.non_updating_cascadec C s t �� S �Nr r r r r �deferrable_fks� s z SuiteRequirements.deferrable_fksc s t �� fdd��S )Nc s � j jp� jjS r'