o
    g                     @  s   d Z ddlmZ ddl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 G dd dZG dd deZdS )zGlobal 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 Zd ZdS )RequirementsN)__name__
__module____qualname__ r   r   a/var/www/html/ecg_monitoring/venv/lib/python3.10/site-packages/sqlalchemy/testing/requirements.pyr       s    r   c                   @  s  e Z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/d0 Zed1d2 Zed3d4 Zed5d6 Zed7d8 Zed9d: Z ed;d< Z!ed=d> Z"ed?d@ Z#edAdB Z$edCdD Z%edEdF Z&edGdH Z'edIdJ Z(edKdL Z)edMdN Z*edOdP Z+edQdR Z,edSdT Z-edUdV Z.edWdX Z/edYdZ Z0ed[d\ Z1ed]d^ Z2ed_d` Z3edadb Z4edcdd Z5ededf Z6edgdh Z7edidj Z8edkdl Z9edmdn Z:edodp Z;edqdr Z<edsdt Z=edudv Z>edwdx Z?edydz Z@ed{d| ZAed}d~ ZBedd ZCedd ZDedd ZEedd ZFedd ZGedd ZHedd ZIedd ZJedd ZKedd ZLedd ZMedd ZNedd ZOedd ZPedd ZQedd ZRedd ZSedd ZTedd ZUedd ZVedd ZWedd ZXedd ZYedd ZZedd Z[edd Z\edd Z]edd Z^edd Z_edd Z`edd Zaedd Zbedd Zcedd ZdeddĄ ZeeddƄ ZfeddȄ Zgeddʄ Zhedd̄ Ziedd΄ ZjeddЄ Zkedd҄ ZleddԄ Zmeddք Znedd؄ Zoeddڄ Zpedd܄ Zqeddބ Zredd Zsedd Ztedd Zuedd Zvedd Zwedd Zxedd Zyedd Zzedd Z{edd Z|edd Z}edd Z~edd Zedd Zedd Zedd Zedd  Zedd Zedd Zedd Zedd Zed	d
 Zedd Zdd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd  Zed!d" Zed#d$ Zed%d& Zed'd( Zed)d* Zed+d, Zed-d. Zed/d0 Zed1d2 Zed3d4 Zed5d6 Zed7d8 Zed9d: Zed;d< Zed=d> Zed?d@ ZedAdB ZedCdD ZedEdF ZedGdH ZedIdJ ZedKdL ZedMdN ZedOdP ZedQdR ZedSdT ZedUdV ZedWdX ZedYdZ Zed[d\ Zd]d^ Zed_d` Zedadb Zedcdd Zededf Zedgdh Zedidj Zedkdl Zdmdn Zedodp Zedqdr Zedsdt Zedudv Zedwdx Zedydz Zed{d| Zed}d~ Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zɐdd Zʐdd Zedd Zedd Z͐dd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd ZedÐdĄ ZedŐdƄ ZedǐdȄ Zedɐdʄ Zedːd̄ Zed͐d΄ ZedϐdЄ Zedѐd҄ ZedӐdԄ ZedՐdք ZdS (  SuiteRequirementsc                 C     t  S )z/target platform can emit basic CreateTable DDL.r   openselfr   r   r   create_table%      zSuiteRequirements.create_tablec                 C  r   )z-target platform can emit basic DropTable DDL.r   r   r   r   r   
drop_table+   r   zSuiteRequirements.drop_tablec                 C  r   )z>target platform supports IF NOT EXISTS / IF EXISTS for tables.r   closedr   r   r   r   table_ddl_if_exists1   r   z%SuiteRequirements.table_ddl_if_existsc                 C  r   )z?target platform supports IF NOT EXISTS / IF EXISTS for indexes.r   r   r   r   r   index_ddl_if_exists7   r   z%SuiteRequirements.index_ddl_if_existsc                 C  r   )z0Return databases that support the UUID datatype.r   r   r   r   r   uuid_data_type=   r   z SuiteRequirements.uuid_data_typec                 C  r   )z*Target database must support foreign keys.r   r   r   r   r   foreign_keysC   r   zSuiteRequirements.foreign_keysc                 C  r   )zKTarget database creates an index that's reflected for
        foreign keys.r   r   r   r   r   foreign_keys_reflect_as_indexI      z/SuiteRequirements.foreign_keys_reflect_as_indexc                 C  r   )z=Target database reflects unique indexes as unique constrains.r   r   r   r   r   *unique_index_reflect_as_unique_constraintsP   r   z<SuiteRequirements.unique_index_reflect_as_unique_constraintsc                 C  r   )z7Target database reflects unique constraints as indexes.r   r   r   r   r   #unique_constraints_reflect_as_indexV   r   z5SuiteRequirements.unique_constraints_reflect_as_indexc                 C  r   )zDatabase / dialect supports a query like:

        .. sourcecode:: sql

             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\      z)SuiteRequirements.table_value_constructorc                 C  r   )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_sqlj   s   z%SuiteRequirements.standard_cursor_sqlc                 C  r   )zQtarget database must support ON UPDATE..CASCADE behavior in
        foreign keys.r   r   r   r   r   on_update_cascade~   r#   z#SuiteRequirements.on_update_cascadec                 C  r   )zWtarget database must *not* support ON UPDATE..CASCADE behavior in
        foreign keys.r   r   r   r   r   non_updating_cascade   r   z&SuiteRequirements.non_updating_cascadec                 C  r   Nr   r   r   r   r   deferrable_fks      z SuiteRequirements.deferrable_fksc                      t  fddS )Nc                     s    j jp jjS r+   )r)   enabledr,   r   r   r   r   <lambda>   s    z?SuiteRequirements.on_update_or_deferrable_fks.<locals>.<lambda>r   only_ifr   r   r   r   on_update_or_deferrable_fks   s   
z-SuiteRequirements.on_update_or_deferrable_fksc                 C     dd }t |S )z"target database is using QueuePoolc                 S  s   t | jjtS r+   )
isinstancedbpoolr   configr   r   r   go   s   z(SuiteRequirements.queue_pool.<locals>.gor1   r   r:   r   r   r   
queue_pool   s   
zSuiteRequirements.queue_poolc                 C  r   )z;Target database must support self-referential foreign keys.r   r   r   r   r   self_referential_foreign_keys   r   z/SuiteRequirements.self_referential_foreign_keysc                 C  r   )z=Target database must support the DDL phrases for FOREIGN KEY.r   r   r   r   r   foreign_key_ddl   r   z!SuiteRequirements.foreign_key_ddlc                 C  r   )z3target database must support names for constraints.r   r   r   r   r   named_constraints   r   z#SuiteRequirements.named_constraintsc                 C  r   )z8target database must apply names to unnamed constraints.r   r   r   r   r   implicitly_named_constraints   r   z.SuiteRequirements.implicitly_named_constraintsc                 C  r   )a  target database allows column names that have unusual characters
        in them, such as dots, spaces, slashes, or percent signs.

        The column names are as always in such a case quoted, however the
        DB still needs to support those characters in the name somehow.

        r   r   r   r   r   unusual_column_name_characters   s   	z0SuiteRequirements.unusual_column_name_charactersc                 C  r   )z(Target database must support subqueries.r   r   r   r   r   
subqueries   r   zSuiteRequirements.subqueriesc                 C  r   )zRtarget database can render OFFSET, or an equivalent, in a
        SELECT.
        r   r   r   r   r   offset      zSuiteRequirements.offsetc                 C  r   )zWtarget database can render LIMIT and/or OFFSET using a bound
        parameter
        r   r   r   r   r   bound_limit_offset   rD   z$SuiteRequirements.bound_limit_offsetc                 C  r   )ztarget database can render LIMIT and/or OFFSET with a complete
        SQL expression, such as one that uses the addition operator.
        parameter
        r   r   r   r   r   sql_expression_limit_offset      z-SuiteRequirements.sql_expression_limit_offsetc                 C  r   )zTarget database must support parenthesized SELECT in UNION
        when LIMIT/OFFSET is specifically present.

        E.g. (SELECT ...) UNION (SELECT ..)

        This is known to fail on SQLite.

        r   r   r   r   r   /parens_in_union_contained_select_w_limit_offset      
zASuiteRequirements.parens_in_union_contained_select_w_limit_offsetc                 C  r   )al  Target database must support parenthesized SELECT in UNION
        when OFFSET/LIMIT is specifically not present.

        E.g. (SELECT ... LIMIT ..) UNION (SELECT .. OFFSET ..)

        This is known to fail on SQLite.  It also fails on Oracle
        because without LIMIT/OFFSET, there is currently no step that
        creates an additional subquery.

        r   r   r   r   r   0parens_in_union_contained_select_wo_limit_offset   r'   zBSuiteRequirements.parens_in_union_contained_select_wo_limit_offsetc                 C  r   )z;Target database must support boolean expressions as columnsr   r   r   r   r   boolean_col_expressions   r   z)SuiteRequirements.boolean_col_expressionsc                 C  r   )z5Target database allows boolean columns to store NULL.r   r   r   r   r   nullable_booleans  r   z#SuiteRequirements.nullable_booleansc                 C  r   )z,Target backends that support nulls ordering.r   r   r   r   r   nullsordering
  r   zSuiteRequirements.nullsorderingc                 C  r   )ztarget database/driver supports bound parameters as column
        expressions without being in the context of a typed column.
        r   r   r   r   r   standalone_binds  r#   z"SuiteRequirements.standalone_bindsc                 C  r   )ztarget database/driver supports bound parameters with NULL in the
        WHERE clause, in situations where it has to be typed.

        r   r   r   r   r   !standalone_null_binds_whereclause  rD   z3SuiteRequirements.standalone_null_binds_whereclausec                 C  r   )z5Target database must support INTERSECT or equivalent.r   r   r   r   r   	intersect     zSuiteRequirements.intersectc                 C  r   )z?Target database must support EXCEPT or equivalent (i.e. MINUS).r   r   r   r   r   except_$  rQ   zSuiteRequirements.except_c                 C  r   )z.Target database must support window functions.r   r   r   r   r   window_functions)  rQ   z"SuiteRequirements.window_functionsc                 C  r   )zTarget database supports CTEsr   r   r   r   r   ctes.  r   zSuiteRequirements.ctesc                 C  r   )ztarget database supports CTES that ride on top of a normal UPDATE
        or DELETE statement which refers to the CTE in a correlated subquery.

        r   r   r   r   r   ctes_with_update_delete4  rG   z)SuiteRequirements.ctes_with_update_deletec                 C  r   )z}target database supports CTES which consist of INSERT, UPDATE
        or DELETE *within* the CTE, e.g. WITH x AS (UPDATE....)r   r   r   r   r   ctes_on_dml=  r#   zSuiteRequirements.ctes_on_dmlc                 C  r   )z~target platform generates new surrogate integer primary key values
        when insert() is executed, excluding the pk column.r   r   r   r   r   autoincrement_insertD  r#   z&SuiteRequirements.autoincrement_insertc                 C  r   )a#  target platform will allow cursor.fetchone() to proceed after a
        COMMIT.

        Typically this refers to an INSERT statement with RETURNING which
        is invoked within "autocommit".   If the row can be returned
        after the autocommit, then this rule can be open.

        r   r   r   r   r   fetch_rows_post_commitK  s   z(SuiteRequirements.fetch_rows_post_commitc                 C  r   )ztarget platform supports SQL expressions in GROUP BY

        e.g.

        SELECT x + y AS somelabel FROM table GROUP BY x + y

        r   r   r   r   r   group_by_complex_expressionX  rI   z-SuiteRequirements.group_by_complex_expressionc                 C     t dd dS )Nc                 S     | j jj S r+   )r6   dialectsupports_sane_rowcountr8   r   r   r   r0   g      z1SuiteRequirements.sane_rowcount.<locals>.<lambda>z&driver doesn't support 'sane' rowcountr   skip_ifr   r   r   r   sane_rowcountd     zSuiteRequirements.sane_rowcountc                 C  rZ   )Nc                 S  r[   r+   )r6   r\   supports_sane_multi_rowcountr8   r   r   r   r0   n  r^   z7SuiteRequirements.sane_multi_rowcount.<locals>.<lambda>z;driver %(driver)s %(doesnt_support)s 'sane' multi row countr   fails_ifr   r   r   r   sane_multi_rowcountk  rb   z%SuiteRequirements.sane_multi_rowcountc                 C  rZ   )Nc                 S  r[   r+   )r6   r\    supports_sane_rowcount_returningr8   r   r   r   r0   u  s   z=SuiteRequirements.sane_rowcount_w_returning.<locals>.<lambda>z;driver doesn't support 'sane' rowcount when returning is onrd   r   r   r   r   sane_rowcount_w_returningr     z+SuiteRequirements.sane_rowcount_w_returningc                 C  rZ   )zatarget platform supports INSERT with no values, i.e.
        INSERT DEFAULT VALUES or equivalent.c                 S  s   | j jjp| j jjp| j jjS r+   )r6   r\   supports_empty_insertsupports_default_valuessupports_default_metavaluer8   r   r   r   r0        
 
z1SuiteRequirements.empty_inserts.<locals>.<lambda>zempty inserts not supportedr1   r   r   r   r   empty_inserts{  s   zSuiteRequirements.empty_insertsc                 C     | j S )zvtarget platform supports INSERT with no values, i.e.
        INSERT DEFAULT VALUES or equivalent, within executemany())rn   r   r   r   r   empty_inserts_executemany     z+SuiteRequirements.empty_inserts_executemanyc                 C  r   )z.target platform supports INSERT from a SELECT.r   r   r   r   r   insert_from_select  r   z$SuiteRequirements.insert_from_selectc                 C  rZ   )z.target platform supports DELETE ... RETURNING.c                 S  
   | j jjS r+   )r6   r\   delete_returningr8   r   r   r   r0        
 z4SuiteRequirements.delete_returning.<locals>.<lambda>z4%(database)s %(does_support)s 'DELETE ... RETURNING'r1   r   r   r   r   rt        z"SuiteRequirements.delete_returningc                 C  rZ   )z.target platform supports INSERT ... RETURNING.c                 S  rs   r+   )r6   r\   insert_returningr8   r   r   r   r0     ru   z4SuiteRequirements.insert_returning.<locals>.<lambda>z4%(database)s %(does_support)s 'INSERT ... RETURNING'r1   r   r   r   r   rw     rv   z"SuiteRequirements.insert_returningc                 C  rZ   )z.target platform supports UPDATE ... RETURNING.c                 S  rs   r+   )r6   r\   update_returningr8   r   r   r   r0     ru   z4SuiteRequirements.update_returning.<locals>.<lambda>z4%(database)s %(does_support)s 'UPDATE ... RETURNING'r1   r   r   r   r   rx     rv   z"SuiteRequirements.update_returningc                 C  rZ   )ztarget platform supports RETURNING when INSERT is used with
        executemany(), e.g. multiple parameter sets, indicating
        as many rows come back as do parameter sets were passed.

        c                 S  rs   r+   )r6   r\   insert_executemany_returningr8   r   r   r   r0     ru   z@SuiteRequirements.insert_executemany_returning.<locals>.<lambda>zR%(database)s %(does_support)s 'RETURNING of multiple rows with INSERT executemany'r1   r   r   r   r   ry        z.SuiteRequirements.insert_executemany_returningc                 C  rZ   )Nc                 S  s   | j jjo| j jjo| j jjS r+   )r6   r\   supports_multivalues_insertrw   use_insertmanyvaluesr8   r   r   r   r0     rm   z4SuiteRequirements.insertmanyvalues.<locals>.<lambda>z=%(database)s %(does_support)s 'insertmanyvalues functionalityr1   r   r   r   r   insertmanyvalues  ri   z"SuiteRequirements.insertmanyvaluesc                 C  r   )zZTarget platform supports the syntax
        "(x, y) IN ((x1, y1), (x2, y2), ...)"
        r   r   r   r   r   tuple_in  rD   zSuiteRequirements.tuple_inc                 C  ro   )z%Target platform tuple IN w/ empty set)r~   r   r   r   r   tuple_in_w_empty  s   z"SuiteRequirements.tuple_in_w_emptyc                 C  r   )zwtarget platform supports a SELECT statement that has
        the same name repeated more than once in the columns list.r   r   r   r   r   %duplicate_names_in_cursor_description  r#   z7SuiteRequirements.duplicate_names_in_cursor_descriptionc                 C  rZ   )z[Target database must have 'denormalized', i.e.
        UPPERCASE as case insensitive names.c                 S  r[   r+   )r6   r\   requires_name_normalizer8   r   r   r   r0     r^   z6SuiteRequirements.denormalized_names.<locals>.<lambda>z,Backend does not require denormalized names.r_   r   r   r   r   denormalized_names     z$SuiteRequirements.denormalized_namesc                 C  rZ   )zTtarget database must support multiple VALUES clauses in an
        INSERT statement.c                 S  r[   r+   )r6   r\   r{   r8   r   r   r   r0     r^   z7SuiteRequirements.multivalues_inserts.<locals>.<lambda>z*Backend does not support multirow inserts.r_   r   r   r   r   multivalues_inserts  r   z%SuiteRequirements.multivalues_insertsc                 C  r   )zvtarget dialect implements the executioncontext.get_lastrowid()
        method without reliance on RETURNING.

        r   r   r   r   r   implements_get_lastrowid  rD   z*SuiteRequirements.implements_get_lastrowidc                 C  r   )zLdialect includes the required pep-249 attribute
        ``cursor.arraysize``r   r   r   r   r   	arraysize  r#   zSuiteRequirements.arraysizec                 C  r   )a<  target dialect retrieves cursor.lastrowid, or fetches
        from a database-side function after an insert() construct executes,
        within the get_lastrowid() method.

        Only dialects that "pre-execute", or need RETURNING to get last
        inserted id, would return closed/fail/skip for this.

        r   r   r   r   r   emulated_lastrowid  rI   z$SuiteRequirements.emulated_lastrowidc                 C  r   )ztarget dialect retrieves cursor.lastrowid or an equivalent
        after an insert() construct executes, even if the table has a
        Sequence on it.

        r   r   r   r   r   &emulated_lastrowid_even_with_sequences	  rG   z8SuiteRequirements.emulated_lastrowid_even_with_sequencesc                 C  r   )z]target platform includes a 'lastrowid' accessor on the DBAPI
        cursor object.

        r   r   r   r   r   dbapi_lastrowid  rD   z!SuiteRequirements.dbapi_lastrowidc                 C  r   )z#Target database must support VIEWs.r   r   r   r   r   views  r   zSuiteRequirements.viewsc                 C  s   t dd S )zXTarget database must support external schemas, and have one
        named 'test_schema'.c                 S  rs   r+   )r6   r\   supports_schemasr8   r   r   r   r0   %  ru   z+SuiteRequirements.schemas.<locals>.<lambda>r   r   r   r   r   schemas      zSuiteRequirements.schemasc                 C  r   )zJtarget system must support reflection of inter-schema
        foreign keysr   r   r   r   r   cross_schema_fk_reflection'  r   z,SuiteRequirements.cross_schema_fk_reflectionc                 C  r   )a  Target supports reflection of FOREIGN KEY constraints and
        will return the name of the constraint that was used in the
        "CONSTRAINT <name> FOREIGN KEY" DDL.

        MySQL prior to version 8 and MariaDB prior to version 10.5
        don't support this.

        r   r   r   r   r   &foreign_key_constraint_name_reflection-  rI   z8SuiteRequirements.foreign_key_constraint_name_reflectionc                 C  r   )ztarget system has a strong concept of 'default' schema that can
        be referred to implicitly.

        basically, PostgreSQL.

        r   r   r   r   r   implicit_default_schema9     z)SuiteRequirements.implicit_default_schemac                 C  r   )z`target dialect implements provisioning module including
        set_default_schema_on_connectionr   r   r   r   r   default_schema_name_switchC  r#   z,SuiteRequirements.default_schema_name_switchc                 C     t dd gdS )z0Target dialect must support server side cursors.c                 S  rs   r+   )r6   r\   supports_server_side_cursorsr8   r   r   r   r0   O  ru   z7SuiteRequirements.server_side_cursors.<locals>.<lambda>zno server side cursors supportr1   r   r   r   r   server_side_cursorsJ     z%SuiteRequirements.server_side_cursorsc                 C  r   )z'Target database must support SEQUENCEs.c                 S  rs   r+   )r6   r\   supports_sequencesr8   r   r   r   r0   X  ru   z-SuiteRequirements.sequences.<locals>.<lambda>zno sequence supportr1   r   r   r   r   	sequencesS  r   zSuiteRequirements.sequencesc                 C  s   t | jS )zJthe opposite of "sequences", DB does not support sequences at
        all.)r   NotPredicater   r   r   r   r   no_sequences\  r   zSuiteRequirements.no_sequencesc                 C  r   )zgTarget database supports sequences, but also optionally
        as a means of generating new PK values.c                 S  s   | j jjo	| j jjS r+   )r6   r\   r   sequences_optionalr8   r   r   r   r0   j  s   
 
z6SuiteRequirements.sequences_optional.<locals>.<lambda>z.no sequence support, or sequences not optionalr1   r   r   r   r   r   c  s
   z$SuiteRequirements.sequences_optionalc                 C     t dd gS )a  target database / driver supports cursor.lastrowid as a means
        of retrieving the last inserted primary key value.

        note that if the target DB supports sequences also, this is still
        assumed to work.  This is a new use case brought on by MariaDB 10.3.

        c                 S  rs   r+   r6   r\   postfetch_lastrowidr8   r   r   r   r0   z  ru   z6SuiteRequirements.supports_lastrowid.<locals>.<lambda>r1   r   r   r   r   supports_lastrowidp  s   	z$SuiteRequirements.supports_lastrowidc                 C  r   )z"the opposite of supports_lastrowidc                 S  r[   r+   r   r8   r   r   r   r0     r^   z8SuiteRequirements.no_lastrowid_support.<locals>.<lambda>r1   r   r   r   r   no_lastrowid_support}  s   z&SuiteRequirements.no_lastrowid_supportc                 C  r   r+   r   r   r   r   r   reflects_pk_names  r-   z#SuiteRequirements.reflects_pk_namesc                 C  r   )z8target database has general support for table reflectionr   r   r   r   r   table_reflection  rQ   z"SuiteRequirements.table_reflectionc                 C  r   )ztarget database supports creation and reflection of tables with no
        columns, or at least tables that seem to have no columns.r   r   r   r   r   reflect_tables_no_columns  r#   z+SuiteRequirements.reflect_tables_no_columnsc                 C  r   )z:Indicates if the database support table comment reflectionr   r   r   r   r   comment_reflection  rQ   z$SuiteRequirements.comment_reflectionc                 C  r   )z{Indicates if the database support table comment reflection in the
        full unicode range, including emoji etc.
        r   r   r   r   r   comment_reflection_full_unicode  r#   z1SuiteRequirements.comment_reflection_full_unicodec                 C  r   )zVindicates if the database support comments on constraints
        and their reflectionr   r   r   r   r   constraint_comment_reflection  r   z/SuiteRequirements.constraint_comment_reflectionc                 C  ro   )ztarget database must support retrieval of the columns in a view,
        similarly to how a table is inspected.

        This does not include the full CREATE VIEW definition.

        r   r   r   r   r   view_column_reflection     z(SuiteRequirements.view_column_reflectionc                 C  ro   )zStarget database must support inspection of the full CREATE VIEW
        definition.r   r   r   r   r   view_reflection  s   z!SuiteRequirements.view_reflectionc                 C  ro   r+   )r   r   r   r   r   schema_reflection     z#SuiteRequirements.schema_reflectionc                 C  r   )zatarget database supports schema create and dropped with
        'CREATE SCHEMA' and 'DROP SCHEMA'r   r   r   r   r   schema_create_delete  r   z&SuiteRequirements.schema_create_deletec                 C  r   r+   r   r   r   r   r   !primary_key_constraint_reflection  r-   z3SuiteRequirements.primary_key_constraint_reflectionc                 C  r   r+   r   r   r   r   r   !foreign_key_constraint_reflection  r-   z3SuiteRequirements.foreign_key_constraint_reflectionc                 C  r   r+   r   r   r   r   r   1foreign_key_constraint_option_reflection_ondelete  r-   zCSuiteRequirements.foreign_key_constraint_option_reflection_ondeletec                 C  r   r+   r   r   r   r   r   1fk_constraint_option_reflection_ondelete_restrict  r-   zCSuiteRequirements.fk_constraint_option_reflection_ondelete_restrictc                 C  r   r+   r   r   r   r   r   1fk_constraint_option_reflection_ondelete_noaction  r-   zCSuiteRequirements.fk_constraint_option_reflection_ondelete_noactionc                 C  r   r+   r   r   r   r   r   1foreign_key_constraint_option_reflection_onupdate  r-   zCSuiteRequirements.foreign_key_constraint_option_reflection_onupdatec                 C  r   r+   r   r   r   r   r   1fk_constraint_option_reflection_onupdate_restrict  r-   zCSuiteRequirements.fk_constraint_option_reflection_onupdate_restrictc                 C  r   r+   r   r   r   r   r   temp_table_reflection  r-   z'SuiteRequirements.temp_table_reflectionc                 C  ro   r+   )r   r   r   r   r   temp_table_reflect_indexes  r   z,SuiteRequirements.temp_table_reflect_indexesc                 C  r   )z8target dialect supports listing of temporary table namesr   r   r   r   r   temp_table_names  rQ   z"SuiteRequirements.temp_table_namesc                 C  r   )z9target dialect supports checking a single temp table namer   r   r   r   r   has_temp_table  rQ   z SuiteRequirements.has_temp_tablec                 C  r   )z)target database supports temporary tablesr   r   r   r   r   temporary_tables  rQ   z"SuiteRequirements.temporary_tablesc                 C  r   )z(target database supports temporary viewsr   r   r   r   r   temporary_views  rQ   z!SuiteRequirements.temporary_viewsc                 C  r   r+   r   r   r   r   r   index_reflection  r-   z"SuiteRequirements.index_reflectionc                 C  r   r+   r   r   r   r   r   index_reflects_included_columns  r-   z1SuiteRequirements.index_reflects_included_columnsc                 C  r   )z?target database supports CREATE INDEX with per-column ASC/DESC.r   r   r   r   r   indexes_with_ascdesc   rQ   z&SuiteRequirements.indexes_with_ascdescc                 C  r   )zKtarget database supports reflecting INDEX with per-column
        ASC/DESC.r   r   r   r   r   reflect_indexes_with_ascdesc  r   z.SuiteRequirements.reflect_indexes_with_ascdescc                 C  r   )zztarget database supports reflecting INDEX with per-column
        ASC/DESC but reflects them as expressions (like oracle).r   r   r   r   r   *reflect_indexes_with_ascdesc_as_expression  r   z<SuiteRequirements.reflect_indexes_with_ascdesc_as_expressionc                 C  r   )z>target database supports CREATE INDEX against SQL expressions.r   r   r   r   r   indexes_with_expressions  rQ   z*SuiteRequirements.indexes_with_expressionsc                 C  r   )zLtarget database supports reflection of indexes with
        SQL expressions.r   r   r   r   r    reflect_indexes_with_expressions  r   z2SuiteRequirements.reflect_indexes_with_expressionsc                 C  r   )z8target dialect supports reflection of unique constraintsr   r   r   r   r   unique_constraint_reflection  rQ   z.SuiteRequirements.unique_constraint_reflectionc                 C  r   )z>target dialect supports reflection of inline check constraintsr   r   r   r   r   "inline_check_constraint_reflection!  rQ   z4SuiteRequirements.inline_check_constraint_reflectionc                 C  r   )z7target dialect supports reflection of check constraintsr   r   r   r   r   check_constraint_reflection&  rQ   z-SuiteRequirements.check_constraint_reflectionc                 C  r   )ztarget dialect raises IntegrityError when reporting an INSERT
        with a primary key violation.  (hint: it should)

        r   r   r   r   r   $duplicate_key_raises_integrity_error+  rD   z6SuiteRequirements.duplicate_key_raises_integrity_errorc                 C  r   )z3Target database must support VARCHAR with no lengthr   r   r   r   r   unbounded_varchar3  r   z#SuiteRequirements.unbounded_varcharc                 C  r   )zTarget database/dialect can receive / deliver / compare data with
        non-ASCII characters in plain VARCHAR, TEXT columns, without the need
        for special "national" datatypes like NVARCHAR or similar.

        r   r   r   r   r   unicode_data_no_special_types9  rG   z/SuiteRequirements.unicode_data_no_special_typesc                 C  r   )zTarget database/dialect must support Python unicode objects with
        non-ASCII characters represented, delivered as bound parameters
        as well as in result rows.

        r   r   r   r   r   unicode_dataB  rG   zSuiteRequirements.unicode_datac                 C  r   )zRTarget driver must support some degree of non-ascii symbol
        names.
        r   r   r   r   r   unicode_ddlK  r#   zSuiteRequirements.unicode_ddlc                 C  r   )z?Target driver can create tables with a name like 'some " table'r   r   r   r   r   symbol_names_w_double_quoteR  rQ   z-SuiteRequirements.symbol_names_w_double_quotec                 C  r   )ztarget dialect supports rendering of a datetime.timedelta as a
        literal string, e.g. via the TypeEngine.literal_processor() method.

        r   r   r   r   r   datetime_intervalW  rD   z#SuiteRequirements.datetime_intervalc                 C  r   )ztarget dialect supports rendering of a date, time, or datetime as a
        literal string, e.g. via the TypeEngine.literal_processor() method.

        r   r   r   r   r   datetime_literals_  rG   z#SuiteRequirements.datetime_literalsc                 C  r   )zUtarget dialect supports representation of Python
        datetime.datetime() objects.r   r   r   r   r   datetimeh  r#   zSuiteRequirements.datetimec                 C  r   )zvtarget dialect supports representation of Python
        datetime.datetime() with tzinfo with DateTime(timezone=True).r   r   r   r   r   datetime_timezoneo  r#   z#SuiteRequirements.datetime_timezonec                 C  r   )zntarget dialect supports representation of Python
        datetime.time() with tzinfo with Time(timezone=True).r   r   r   r   r   time_timezonev  r#   zSuiteRequirements.time_timezonec                 C  r   )ztarget dialect when given a date object will bind it such
        that the database server knows the object is a date, and not
        a plain string.

        r   r   r   r   r   date_implicit_bound}  rG   z%SuiteRequirements.date_implicit_boundc                 C  r   )ztarget dialect when given a time object will bind it such
        that the database server knows the object is a time, and not
        a plain string.

        r   r   r   r   r   time_implicit_bound  rG   z%SuiteRequirements.time_implicit_boundc                 C  r   )ztarget dialect when given a datetime object will bind it such
        that the database server knows the object is a datetime, and not
        a plain string.

        r   r   r   r   r   datetime_implicit_bound  rG   z)SuiteRequirements.datetime_implicit_boundc                 C  r   )zftarget dialect supports representation of Python
        datetime.datetime() with microsecond objects.r   r   r   r   r   datetime_microseconds  r#   z'SuiteRequirements.datetime_microsecondsc                 C  r   )ztarget dialect supports representation of Python
        datetime.datetime() with microsecond objects but only
        if TIMESTAMP is used.r   r   r   r   r   timestamp_microseconds  r#   z(SuiteRequirements.timestamp_microsecondsc                 C  ro   )a  target dialect when given a datetime object which also includes
        a microseconds portion when using the TIMESTAMP data type
        will bind it such that the database server knows
        the object is a datetime with microseconds, and not a plain string.

        )r   r   r   r   r   %timestamp_microseconds_implicit_bound  r   z7SuiteRequirements.timestamp_microseconds_implicit_boundc                 C  r   zutarget dialect supports representation of Python
        datetime.datetime() objects with historic (pre 1970) values.r   r   r   r   r   datetime_historic  r#   z#SuiteRequirements.datetime_historicc                 C  r   )zQtarget dialect supports representation of Python
        datetime.date() objects.r   r   r   r   r   date  r#   zSuiteRequirements.datec                 C  r   )zPtarget dialect accepts a datetime object as the target
        of a date column.r   r   r   r   r   date_coerces_from_datetime  r#   z,SuiteRequirements.date_coerces_from_datetimec                 C  r   r   r   r   r   r   r   date_historic  r#   zSuiteRequirements.date_historicc                 C  r   )zQtarget dialect supports representation of Python
        datetime.time() objects.r   r   r   r   r   time  r#   zSuiteRequirements.timec                 C  r   )zbtarget dialect supports representation of Python
        datetime.time() with microsecond objects.r   r   r   r   r   time_microseconds  r#   z#SuiteRequirements.time_microsecondsc                 C  r   )zttarget database/driver can allow BLOB/BINARY fields to be compared
        against a bound parameter value.
        r   r   r   r   r   binary_comparisons  rD   z$SuiteRequirements.binary_comparisonsc                 C  r   )a=  target backend supports simple binary literals, e.g. an
        expression like:

        .. sourcecode:: sql

            SELECT CAST('foo' AS BINARY)

        Where ``BINARY`` is the type emitted from :class:`.LargeBinary`,
        e.g. it could be ``BLOB`` or similar.

        Basically fails on Oracle.

        r   r   r   r   r   binary_literals     z!SuiteRequirements.binary_literalsc                 C  r   )z:target dialect supports 'AUTOCOMMIT' as an isolation_levelr   r   r   r   r   
autocommit  rQ   zSuiteRequirements.autocommitc                 C  r   )ztarget dialect supports general isolation level settings.

        Note that this requirement, when enabled, also requires that
        the get_isolation_levels() method be implemented.

        r   r   r   r   r   isolation_level  r   z!SuiteRequirements.isolation_levelc              	   C  sr   |j  *}z
|j|jj}W n ty    Y W d   dS w |jj|dW  d   S 1 s2w   Y  dS )a  Return a structure of supported isolation levels for the current
        testing dialect.

        The structure indicates to the testing suite what the expected
        "default" isolation should be, as well as the other values that
        are accepted.  The dictionary has two keys, "default" and "supported".
        The "supported" key refers to a list of all supported levels and
        it should include AUTOCOMMIT if the dialect supports it.

        If the :meth:`.DefaultRequirements.isolation_level` requirement is
        not open, then this method has no return value.

        E.g.::

            >>> testing.requirements.get_isolation_levels()
            {
                "default": "READ_COMMITTED",
                "supported": [
                    "SERIALIZABLE", "READ UNCOMMITTED",
                    "READ COMMITTED", "REPEATABLE READ",
                    "AUTOCOMMIT"
                ]
            }
        N)default	supported)r6   connectr\   get_isolation_level_values
connectiondbapi_connectionNotImplementedErrordefault_isolation_level)r   r9   connr   r   r   r   get_isolation_levels  s   $z&SuiteRequirements.get_isolation_levelsc                 C  r4   )ztarget dialect supports the
        :meth:`_engine.Dialect.get_isolation_level_values`
        method added in SQLAlchemy 2.0.

        c              	   S  sh   | j  %}z
|j|jj W n ty    Y W d    dS w 	 W d    dS 1 s-w   Y  d S NFT)r6   r   r\   r   r   r   r   )r9   r   r   r   r   r:   1  s   $z8SuiteRequirements.get_isolation_level_values.<locals>.gor1   r;   r   r   r   r   )  s   
z,SuiteRequirements.get_isolation_level_valuesc                 C  r4   )zctest that the dialect allows the 'isolation_level' argument
        to be handled by DefaultDialectc                 S  s.   z
t | jjdd}W n   Y dS |jjdkS )NzREAD COMMITTED)r   F)r
   r6   urlr\   _on_connect_isolation_level)r9   er   r   r   r:   C  s   

zASuiteRequirements.dialect_level_isolation_level_param.<locals>.gor1   r;   r   r   r   #dialect_level_isolation_level_param>  s   
z5SuiteRequirements.dialect_level_isolation_level_paramc                 C  r   )z.Target platform implements a native ARRAY typer   r   r   r   r   
array_typeQ  rQ   zSuiteRequirements.array_typec                 C  r   )z.target platform implements a native JSON type.r   r   r   r   r   	json_typeV  r   zSuiteRequirements.json_typec                 C  ro   )zNtarget platform supports numeric array indexes
        within a JSON structure)r   r   r   r   r   json_array_indexes\  rq   z$SuiteRequirements.json_array_indexesc                 C  r   r+   r   r   r   r   r   (json_index_supplementary_unicode_elementc  r-   z:SuiteRequirements.json_index_supplementary_unicode_elementc                 C  r   )zBackend has a JSON_EXTRACT or similar function that returns a
        valid JSON string in all cases.

        Used to test a legacy feature and is not needed.

        r   r   r   r   r   !legacy_unconditional_json_extractg  r   z3SuiteRequirements.legacy_unconditional_json_extractc                 C  r   )zRtarget backend has general support for moderately high-precision
        numerics.r   r   r   r   r   precision_numerics_generalq  r   z,SuiteRequirements.precision_numerics_generalc                 C  r   )zbtarget backend supports Decimal() objects using E notation
        to represent very small values.r   r   r   r   r   "precision_numerics_enotation_smallw  r   z4SuiteRequirements.precision_numerics_enotation_smallc                 C  r   )zbtarget backend supports Decimal() objects using E notation
        to represent very large values.r   r   r   r   r   "precision_numerics_enotation_large}  r   z4SuiteRequirements.precision_numerics_enotation_largec                 C  r   )ztarget backend supports values with many digits on both sides,
        such as 319438950232418390.273596, 87673.594069654243

        r   r   r   r   r   *precision_numerics_many_significant_digits  rD   z<SuiteRequirements.precision_numerics_many_significant_digitsc                 C  ro   )z}same as precision_numerics_many_significant_digits but within the
        context of a CAST statement (hello MySQL)

        )r   r   r   r   r   /cast_precision_numerics_many_significant_digits     zASuiteRequirements.cast_precision_numerics_many_significant_digitsc                 C  r   )a  target backend will return a selected Decimal as a Decimal, not
        a string.

        e.g.::

            expr = decimal.Decimal("15.7563")

            value = e.scalar(select(literal(expr)))

            assert value == expr

        See :ticket:`4036`

        r   r   r   r   r   implicit_decimal_binds  s   z(SuiteRequirements.implicit_decimal_bindsc                 C  r   )aF  target backend will return result columns that are explicitly
        against NUMERIC or similar precision-numeric datatypes (not including
        FLOAT or INT types) as Python Decimal objects, and not as floats
        or ints, including when no SQLAlchemy-side typing information is
        associated with the statement (e.g. such as a raw SQL string).

        This should be enabled if either the DBAPI itself returns Decimal
        objects, or if the dialect has set up DBAPI-specific return type
        handlers such that Decimal objects come back automatically.

        r   r   r   r   r   #numeric_received_as_decimal_untyped  s   z5SuiteRequirements.numeric_received_as_decimal_untypedc                 C  r   )zhtarget database can select an aggregate from a subquery that's
        also using an aggregate

        r   r   r   r   r   nested_aggregates  rD   z#SuiteRequirements.nested_aggregatesc                 C  r   )zbtarget database must support ON DELETE CASCADE on a self-referential
        foreign key

        r   r   r   r   r   recursive_fk_cascade  rD   z&SuiteRequirements.recursive_fk_cascadec                 C  r   )zA precision numeric type will return empty significant digits,
        i.e. a value such as 10.000 will come back in Decimal form with
        the .000 maintained.r   r   r   r   r   -precision_numerics_retains_significant_digits  rD   z?SuiteRequirements.precision_numerics_retains_significant_digitsc                 C  r   )z@The Float type can persist and load float('inf'), float('-inf').r   r   r   r   r   infinity_floats  r   z!SuiteRequirements.infinity_floatsc                 C  r   r+   r   r   r   r   r   -float_or_double_precision_behaves_generically  r-   z?SuiteRequirements.float_or_double_precision_behaves_genericallyc                 C  r   )ztarget backend will return native floating point numbers with at
        least seven decimal places when using the generic Float type.

        r   r   r   r   r   precision_generic_float_type  rD   z.SuiteRequirements.precision_generic_float_typec                 C  r   )ztarget backend will return the exact float value 15.7563
        with only four significant digits from this statement:

        SELECT :param

        where :param is the Python float 15.7563

        i.e. it does not return 15.75629997253418

        r   r   r   r   r   literal_float_coercion  r'   z(SuiteRequirements.literal_float_coercionc                 C  r   )ztarget backend can return a floating-point number with four
        significant digits (such as 15.7563) accurately
        (i.e. without FP inaccuracies, such as 15.75629997253418).

        r   r   r   r   r   floats_to_four_decimals  rG   z)SuiteRequirements.floats_to_four_decimalsc                 C  r   )ztarget backend doesn't crash when you try to select a NUMERIC
        value that has a value of NULL.

        Added to support Pyodbc bug #351.
        r   r   r   r   r   fetch_null_from_numeric  r   z)SuiteRequirements.fetch_null_from_numericc                 C  r   )z*target backend uses Numeric for Float/Dualr   r   r   r   r   float_is_numeric   r   z"SuiteRequirements.float_is_numericc                 C  r   )zUTarget database must support an unbounded Text() "
        "type such as TEXT or CLOBr   r   r   r   r   	text_type  r#   zSuiteRequirements.text_typec                 C  r   )zTtarget database can persist/return an empty string with a
        varchar.

        r   r   r   r   r   empty_strings_varchar  rD   z'SuiteRequirements.empty_strings_varcharc                 C  r   )zRtarget database can persist/return an empty string with an
        unbounded text.r   r   r   r   r   empty_strings_text  r#   z$SuiteRequirements.empty_strings_textc                 C  r   )zUtarget database supports use of an unbounded textual field in a
        WHERE clause.r   r   r   r   r   "expressions_against_unbounded_text  r#   z4SuiteRequirements.expressions_against_unbounded_textc                 C  r   )z;target driver must support the literal statement 'select 1'r   r   r   r   r   	selectone#  rQ   zSuiteRequirements.selectonec                 C  r   )z(Target database must support savepoints.r   r   r   r   r   
savepoints(  r   zSuiteRequirements.savepointsc                 C  r   )z4Target database must support two-phase transactions.r   r   r   r   r   two_phase_transactions.  r   z(SuiteRequirements.two_phase_transactionsc                 C  r   )z'Target must support UPDATE..FROM syntaxr   r   r   r   r   update_from4  rQ   zSuiteRequirements.update_fromc                 C  r   )z=Target must support DELETE FROM..FROM or DELETE..USING syntaxr   r   r   r   r   delete_from9  rQ   zSuiteRequirements.delete_fromc                 C  r   )a  Target must support UPDATE (or DELETE) where the same table is
        present in a subquery in the WHERE clause.

        This is an ANSI-standard syntax that apparently MySQL can't handle,
        such as:

        .. sourcecode:: sql

            UPDATE documents SET flag=1 WHERE documents.title IN
                (SELECT max(documents.title) AS title
                    FROM documents GROUP BY documents.user_id
                )

        r   r   r   r   r   update_where_target_in_subquery>  r   z1SuiteRequirements.update_where_target_in_subqueryc                 C  r   )zOtarget database must use a plain percent '%' as the 'modulus'
        operator.r   r   r   r   r   mod_operator_as_percent_signP  r   z.SuiteRequirements.mod_operator_as_percent_signc                 C  r   )a  target backend supports weird identifiers with percent signs
        in them, e.g. 'some % column'.

        this is a very weird use case but often has problems because of
        DBAPIs that use python formatting.  It's not a critical use
        case either.

        r   r   r   r   r   percent_schema_namesV  rI   z&SuiteRequirements.percent_schema_namesc                 C  r   )ztarget database supports ordering by a column from a SELECT
        inside of a UNION

        E.g.:

        .. sourcecode:: sql

            (SELECT id, ...) UNION (SELECT id, ...) ORDER BY id

        r   r   r   r   r   order_by_col_from_unionb  r'   z)SuiteRequirements.order_by_col_from_unionc                 C  r   )a4  target backend supports ORDER BY a column label within an
        expression.

        Basically this:

        .. sourcecode:: sql

            select data as foo from test order by foo || 'bar'

        Lots of databases including PostgreSQL don't support this,
        so this is off by default.

        r   r   r   r   r   order_by_label_with_expressionp  s   z0SuiteRequirements.order_by_label_with_expressionc                   s    fdd}t |S )Nc                   s&   z  |  W dS  ty   Y dS w r   )get_order_by_collationr   r8   r   r   r   check  s   
z3SuiteRequirements.order_by_collation.<locals>.checkr_   r   r  r   r   r   order_by_collation  s   
z$SuiteRequirements.order_by_collationc                 C  s   t  r+   )r   r   r9   r   r   r   r    s   z(SuiteRequirements.get_order_by_collationc                 C  r   )zUTarget driver must support non-ASCII characters being passed at
        all.
        r   r   r   r   r   unicode_connections  r#   z%SuiteRequirements.unicode_connectionsc                 C  r   )zTarget driver must raise a DBAPI-level exception, such as
        InterfaceError, when the underlying connection has been closed
        and the execute() method is called.
        r   r   r   r   r   graceful_disconnects  rD   z&SuiteRequirements.graceful_disconnectsc                 C  r   )zU
        Target must support simultaneous, independent database connections.
        r   r   r   r   r   independent_connections  r#   z)SuiteRequirements.independent_connectionsc                 C  r   )z
        Target must support simultaneous, independent database connections
        that will be used in a readonly fashion.

        r   r   r   r   r    independent_readonly_connections  rG   z2SuiteRequirements.independent_readonly_connectionsc                 C  r   )z9Catchall for a large variety of MySQL on Windows failuresr   r   r   r   r   skip_mysql_on_windows  rQ   z'SuiteRequirements.skip_mysql_on_windowsc                 C  s   t dd S )a   Test environment must allow ad-hoc engine/connection creation.

        DBs that scale poorly for many connections, even when closed, i.e.
        Oracle, may use the "--low-connections" option which flags this
        requirement as not present.

        c                 S     | j jS r+   )optionslow_connectionsr8   r   r   r   r0         z2SuiteRequirements.ad_hoc_engines.<locals>.<lambda>r_   r   r   r   r   ad_hoc_engines  s   	z SuiteRequirements.ad_hoc_enginesc                 C  s   t |  S r+   )r   r`   _running_on_windowsr   r   r   r   
no_windows  s   zSuiteRequirements.no_windowsc                 C  s   t jdd ddS )Nc                   S  s   t  dkS )NWindows)platformsystemr   r   r   r   r0     r^   z7SuiteRequirements._running_on_windows.<locals>.<lambda>zrunning on Windows)description)r   LambdaPredicater   r   r   r   r%    s   z%SuiteRequirements._running_on_windowsc                 C     ddl m} |jjS Nr   r8   ) r9   add_to_markertiming_intensiver  r   r   r   r0       z"SuiteRequirements.timing_intensivec                 C  r,  r-  )r.  r9   r/  memory_intensiver  r   r   r   r2    r1  z"SuiteRequirements.memory_intensivec                 C  rZ   )z}Mark tests that use threading and mock at the same time - stability
        issues have been observed with coverage

        c                 S  r   r+   r!  has_coverager8   r   r   r   r0     r#  z7SuiteRequirements.threading_with_mock.<locals>.<lambda>zStability issues with coverager_   r   r   r   r   threading_with_mock  s   z%SuiteRequirements.threading_with_mockc                 C  r4   )Nc                 S  $   zt d W dS  ty   Y dS w Nzsqlalchemy-stubs.ext.mypyFT
__import__ImportErrorr8   r   r   r   r       
z2SuiteRequirements.sqlalchemy2_stubs.<locals>.checkr1   r  r   r   r   sqlalchemy2_stubs     
z#SuiteRequirements.sqlalchemy2_stubsc                 C  r4   )Nc                 S  r6  r7  r8  r8   r   r   r   r    r;  z5SuiteRequirements.no_sqlalchemy2_stubs.<locals>.checkr_   r  r   r   r   no_sqlalchemy2_stubs  r=  z&SuiteRequirements.no_sqlalchemy2_stubsc                 C  rZ   )Nc                   S     t jS r+   )r   py38r   r   r   r   r0         z,SuiteRequirements.python38.<locals>.<lambda>zPython 3.8 or above requiredr1   r   r   r   r   python38     zSuiteRequirements.python38c                 C  rZ   )Nc                   S  r?  r+   )r   py39r   r   r   r   r0     rA  z,SuiteRequirements.python39.<locals>.<lambda>zPython 3.9 or above requiredr1   r   r   r   r   python39  rC  zSuiteRequirements.python39c                 C  rZ   )Nc                   S  r?  r+   )r   py310r   r   r   r   r0     rA  z-SuiteRequirements.python310.<locals>.<lambda>zPython 3.10 or above requiredr1   r   r   r   r   	python310  rC  zSuiteRequirements.python310c                 C  rZ   )Nc                   S  r?  r+   )r   py311r   r   r   r   r0     rA  z-SuiteRequirements.python311.<locals>.<lambda>zPython 3.11 or above requiredr1   r   r   r   r   	python311  rC  zSuiteRequirements.python311c                 C  rZ   )Nc                   S  r?  r+   )r   py312r   r   r   r   r0     rA  z-SuiteRequirements.python312.<locals>.<lambda>zPython 3.12 or above requiredr1   r   r   r   r   	python312  rC  zSuiteRequirements.python312c                 C  rZ   )Nc                   S  r?  r+   )r   cpythonr   r   r   r   r0     rA  z+SuiteRequirements.cpython.<locals>.<lambda>zcPython interpreter neededr1   r   r   r   r   rL    rC  zSuiteRequirements.cpythonc                 C  rZ   )Nc                   S  r?  r+   )r   is64bitr   r   r   r   r0     rA  z+SuiteRequirements.is64bit.<locals>.<lambda>z64bit requiredr1   r   r   r   r   rM    s   zSuiteRequirements.is64bitc                 C  s   dd }t |dS )Nc                   S  r6  )NpatchFTr8  r   r   r   r   	check_lib#  r;  z2SuiteRequirements.patch_library.<locals>.check_libzpatch library neededr1   )r   rO  r   r   r   patch_library!  s   zSuiteRequirements.patch_libraryc                 C  ro   )ztarget platform must remove all cycles unconditionally when
        gc.collect() is called, as well as clean out unreferenced subclasses.

        )rL  r   r   r   r   predictable_gc-  r   z SuiteRequirements.predictable_gcc                 C  rZ   )zTest should be skipped if coverage is enabled.

        This is to block tests that exercise libraries that seem to be
        sensitive to coverage, such as PostgreSQL notice logging.

        c                 S  r   r+   r3  r8   r   r   r   r0   >  r#  z/SuiteRequirements.no_coverage.<locals>.<lambda>z(Issues observed when coverage is enabledr_   r   r   r   r   no_coverage5  rz   zSuiteRequirements.no_coveragec                 C     dS NFr   r  r   r   r   _has_mysql_on_windowsB     z'SuiteRequirements._has_mysql_on_windowsc                 C  rS  rT  r   r  r   r   r   _has_mysql_fully_case_sensitiveE  rV  z1SuiteRequirements._has_mysql_fully_case_sensitivec                   r.   )Nc                     s
       S r+   )_has_sqliter   r   r   r   r0   J  ru   z*SuiteRequirements.sqlite.<locals>.<lambda>r_   r   r   r   r   sqliteH  s   zSuiteRequirements.sqlitec                 C  rZ   )Nc                   S  s
   t   S r+   )r   has_compiled_extr   r   r   r   r0   O  ru   z/SuiteRequirements.cextensions.<locals>.<lambda>zCython extensions not installedr_   r   r   r   r   cextensionsL  rb   zSuiteRequirements.cextensionsc                 C  s0   ddl m} z|d W dS  ty   Y dS w )Nr   r	   z	sqlite://TF)
sqlalchemyr
   r:  )r   r
   r   r   r   rX  S  s   zSuiteRequirements._has_sqlitec                 C  r   )z@dialect makes use of await_() to invoke operations on the DBAPI.r   r   r   r   r   async_dialect\  r   zSuiteRequirements.async_dialectc                 C  ro   r+   )greenletr   r   r   r   r   b  r   zSuiteRequirements.asyncioc                 C  r4   )Nc                 S  s$   zdd l }W dS  ty   Y dS w )Nr   TF)r^  r:  r9   r^  r   r   r   r:   h  r;  z)SuiteRequirements.no_greenlet.<locals>.gor1   r;   r   r   r   no_greenletf  r=  zSuiteRequirements.no_greenletc                 C  r4   )Nc                 S  s.   t jsdS zdd l}W dS  ty   Y dS w )NFr   T)_test_asyncioENABLE_ASYNCIOr^  r:  r_  r   r   r   r:   t  s   
z&SuiteRequirements.greenlet.<locals>.gor1   r;   r   r   r   r^  r  s   
zSuiteRequirements.greenletc                 C  r   )zSupports computed columnsr   r   r   r   r   computed_columns  rQ   z"SuiteRequirements.computed_columnsc                 C  r   )z/Supports computed columns with `persisted=True`r   r   r   r   r   computed_columns_stored  rQ   z)SuiteRequirements.computed_columns_storedc                 C  r   )z0Supports computed columns with `persisted=False`r   r   r   r   r   computed_columns_virtual  rQ   z*SuiteRequirements.computed_columns_virtualc                 C  r   )zSIf the default persistence is virtual or stored when `persisted`
        is omittedr   r   r   r   r   "computed_columns_default_persisted  r   z4SuiteRequirements.computed_columns_default_persistedc                 C  r   )zTIf persistence information is returned by the reflection of
        computed columnsr   r   r   r   r   "computed_columns_reflect_persisted  r   z4SuiteRequirements.computed_columns_reflect_persistedc                 C  r   )z1If a backend supports the DISTINCT ON in a selectr   r   r   r   r   supports_distinct_on  rQ   z&SuiteRequirements.supports_distinct_onc                 C  rZ   )a   Supports some form of "x IS [NOT] DISTINCT FROM y" construct.
        Different dialects will implement their own flavour, e.g.,
        sqlite will emit "x IS NOT y" instead of "x IS DISTINCT FROM y".

        .. seealso::

            :meth:`.ColumnOperators.is_distinct_from`

        c                 S  r[   r+   )r6   r\   supports_is_distinct_fromr8   r   r   r   r0     r^   z=SuiteRequirements.supports_is_distinct_from.<locals>.<lambda>z4driver doesn't support an IS DISTINCT FROM constructr_   r   r   r   r   ri    s   z+SuiteRequirements.supports_is_distinct_fromc                 C  r   )zKIf a backend supports GENERATED { ALWAYS | BY DEFAULT }
        AS IDENTITYr   r   r   r   r   identity_columns  r   z"SuiteRequirements.identity_columnsc                 C  r   )zIf a backend supports GENERATED { ALWAYS | BY DEFAULT }
        AS IDENTITY with a standard syntax.
        This is mainly to exclude MSSql.
        r   r   r   r   r   identity_columns_standard  rD   z+SuiteRequirements.identity_columns_standardc                 C  r   )z+backend supports the regexp_match operator.r   r   r   r   r   regexp_match  rQ   zSuiteRequirements.regexp_matchc                 C  r   )z-backend supports the regexp_replace operator.r   r   r   r   r   regexp_replace  rQ   z SuiteRequirements.regexp_replacec                 C  r   )z(backend supports the fetch first clause.r   r   r   r   r   fetch_first  rQ   zSuiteRequirements.fetch_firstc                 C  r   )z5backend supports the fetch first clause with percent.r   r   r   r   r   fetch_percent  rQ   zSuiteRequirements.fetch_percentc                 C  r   )z2backend supports the fetch first clause with ties.r   r   r   r   r   
fetch_ties  rQ   zSuiteRequirements.fetch_tiesc                 C  r   )z1backend supports the fetch first without order byr   r   r   r   r   fetch_no_order_by  rQ   z#SuiteRequirements.fetch_no_order_byc                 C  r   )zwbackend supports the offset when using fetch first with percent
        or ties. basically this is "not mssql"
        r   r   r   r   r   fetch_offset_with_options  r#   z+SuiteRequirements.fetch_offset_with_optionsc                 C  r   )zbackend supports fetch / offset with expression in them, like

        SELECT * FROM some_table
        OFFSET 1 + 1 ROWS FETCH FIRST 1 + 1 ROWS ONLY
        r   r   r   r   r   fetch_expression  rG   z"SuiteRequirements.fetch_expressionc                 C  r   )zIf autoincrement=True on a column does not require an explicit
        sequence. This should be false only for oracle.
        r   r   r   r   r   autoincrement_without_sequence  r#   z0SuiteRequirements.autoincrement_without_sequencec                 C  r   )z=If X[Y] can be implemented with ``__class_getitem__``. py3.7+r   r   r   r   r   generic_classes  rQ   z!SuiteRequirements.generic_classesc                 C  r   )z@indicates if the json_deserializer function is called with bytesr   r   r   r   r   json_deserializer_binary  rQ   z*SuiteRequirements.json_deserializer_binaryc                 C  r   )z6Target database must support reflecting table_options.r   r   r   r   r   reflect_table_options  rQ   z'SuiteRequirements.reflect_table_optionsc                 C  r   )z0Target database must support MATERIALIZED VIEWs.r   r   r   r   r   materialized_views  rQ   z$SuiteRequirements.materialized_viewsc                 C  r   )z/Target database reflect MATERIALIZED VIEWs pks.r   r   r   r   r   materialized_views_reflect_pk  rQ   z/SuiteRequirements.materialized_views_reflect_pkc                 C  r   )z#Target database supports bitwise orr   r   r   r   r   supports_bitwise_or  rQ   z%SuiteRequirements.supports_bitwise_orc                 C  r   )z$Target database supports bitwise andr   r   r   r   r   supports_bitwise_and  rQ   z&SuiteRequirements.supports_bitwise_andc                 C  r   )z$Target database supports bitwise notr   r   r   r   r   supports_bitwise_not  rQ   z&SuiteRequirements.supports_bitwise_notc                 C  r   )z$Target database supports bitwise xorr   r   r   r   r   supports_bitwise_xor  rQ   z&SuiteRequirements.supports_bitwise_xorc                 C  r   )z4Target database supports bitwise left or right shiftr   r   r   r   r   supports_bitwise_shift!  rQ   z(SuiteRequirements.supports_bitwise_shiftN)r   r   r   propertyr   r   r   r   r    r!   r"   r$   r%   r&   r(   r)   r*   r,   r3   r<   r=   r>   r?   r@   rA   rB   rC   rE   rF   rH   rJ   rK   rL   rM   rN   rO   rP   rR   rS   rT   rU   rV   rW   rX   rY   ra   rf   rh   rn   rp   rr   rt   rw   rx   ry   r}   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r  r	  r
  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r$  r&  r%  r0  r2  r5  r<  r>  rB  rE  rG  rI  rK  rL  rM  rP  rQ  rR  rU  rW  rY  r[  rX  r]  r   r`  r^  rc  rd  re  rf  rg  rh  ri  rj  rk  rl  rm  rn  ro  rp  rq  rr  rs  rt  ru  rv  rw  rx  ry  rz  r{  r|  r}  r~  r   r   r   r   r   $   s   














	









































	
	









	













	










































	


	&		

	r   )__doc__
__future__r   r(  r.  r   ra  r   r   r
   r   r7   r   r   r   r   r   r   r   <module>   s   	
