
    ,h                        S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSKJ	r	  SS	KJ
r
  SS
KJr  SSKJr   " S S5      r " S S\5      rg)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                      \ rS rSrSrg)Requirements!    N)__name__
__module____qualname____firstlineno____static_attributes__r       W/var/www/auris/envauris/lib/python3.13/site-packages/sqlalchemy/testing/requirements.pyr   r   !   s    r   r   c                     \ rS rSr\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r \S 5       r!\S 5       r"\S  5       r#\S! 5       r$\S" 5       r%\S# 5       r&\S$ 5       r'\S% 5       r(\S& 5       r)\S' 5       r*\S( 5       r+\S) 5       r,\S* 5       r-\S+ 5       r.\S, 5       r/\S- 5       r0\S. 5       r1\S/ 5       r2\S0 5       r3\S1 5       r4\S2 5       r5\S3 5       r6\S4 5       r7\S5 5       r8\S6 5       r9\S7 5       r:\S8 5       r;\S9 5       r<\S: 5       r=\S; 5       r>\S< 5       r?\S= 5       r@\S> 5       rA\S? 5       rB\S@ 5       rC\SA 5       rD\SB 5       rE\SC 5       rF\SD 5       rG\SE 5       rH\SF 5       rI\SG 5       rJ\SH 5       rK\SI 5       rL\SJ 5       rM\SK 5       rN\SL 5       rO\SM 5       rP\SN 5       rQ\SO 5       rR\SP 5       rS\SQ 5       rT\SR 5       rU\SS 5       rV\ST 5       rW\SU 5       rX\SV 5       rY\SW 5       rZ\SX 5       r[\SY 5       r\\SZ 5       r]\S[ 5       r^\S\ 5       r_\S] 5       r`\S^ 5       ra\S_ 5       rb\S` 5       rc\Sa 5       rd\Sb 5       re\Sc 5       rf\Sd 5       rg\Se 5       rh\Sf 5       ri\Sg 5       rj\Sh 5       rk\Si 5       rl\Sj 5       rm\Sk 5       rn\Sl 5       ro\Sm 5       rp\Sn 5       rq\So 5       rr\Sp 5       rs\Sq 5       rt\Sr 5       ru\Ss 5       rv\St 5       rw\Su 5       rx\Sv 5       ry\Sw 5       rz\Sx 5       r{\Sy 5       r|\Sz 5       r}\S{ 5       r~\S| 5       r\S} 5       r\S~ 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rS rS r\S 5       r\S 5       rS r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rSrg)SuiteRequirements%   c                ,    [         R                  " 5       $ )z/target platform can emit basic CreateTable DDL.r   openselfs    r   create_tableSuiteRequirements.create_table&          r   c                ,    [         R                  " 5       $ )z-target platform can emit basic DropTable DDL.r   r   s    r   
drop_tableSuiteRequirements.drop_table,   r#   r   c                ,    [         R                  " 5       $ )z>target platform supports IF NOT EXISTS / IF EXISTS for tables.r   closedr   s    r   table_ddl_if_exists%SuiteRequirements.table_ddl_if_exists2          ""r   c                ,    [         R                  " 5       $ )z?target platform supports IF NOT EXISTS / IF EXISTS for indexes.r(   r   s    r   index_ddl_if_exists%SuiteRequirements.index_ddl_if_exists8   r,   r   c                ,    [         R                  " 5       $ )z0Return databases that support the UUID datatype.r(   r   s    r   uuid_data_type SuiteRequirements.uuid_data_type>   r,   r   c                ,    [         R                  " 5       $ )z*Target database must support foreign keys.r   r   s    r   foreign_keysSuiteRequirements.foreign_keysD   r#   r   c                ,    [         R                  " 5       $ )zCTarget database creates an index that's reflected for
foreign keys.r(   r   s    r   foreign_keys_reflect_as_index/SuiteRequirements.foreign_keys_reflect_as_indexJ       
   ""r   c                ,    [         R                  " 5       $ )z=Target database reflects unique indexes as unique constrains.r(   r   s    r   *unique_index_reflect_as_unique_constraints<SuiteRequirements.unique_index_reflect_as_unique_constraintsQ   r,   r   c                ,    [         R                  " 5       $ )z7Target database reflects unique constraints as indexes.r(   r   s    r   #unique_constraints_reflect_as_index5SuiteRequirements.unique_constraints_reflect_as_indexW   r,   r   c                ,    [         R                  " 5       $ )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   s    r   table_value_constructor)SuiteRequirements.table_value_constructor]   s       ""r   c                ,    [         R                  " 5       $ )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   s    r   standard_cursor_sql%SuiteRequirements.standard_cursor_sqlk   s    $   r   c                ,    [         R                  " 5       $ )zItarget database must support ON UPDATE..CASCADE behavior in
foreign keys.r   r   s    r   on_update_cascade#SuiteRequirements.on_update_cascade       
   r   c                ,    [         R                  " 5       $ )zOtarget database must *not* support ON UPDATE..CASCADE behavior in
foreign keys.r(   r   s    r   non_updating_cascade&SuiteRequirements.non_updating_cascade   r,   r   c                ,    [         R                  " 5       $ Nr(   r   s    r   deferrable_fks SuiteRequirements.deferrable_fks         ""r   c                8   ^  [         R                  " U 4S j5      $ )Nc                 j   > T R                   R                  =(       d    T R                  R                  $ rN   )rG   enabledrO   r   s   r   <lambda>?SuiteRequirements.on_update_or_deferrable_fks.<locals>.<lambda>   s*    D**22 +""**+r   r   only_ifr   s   `r   on_update_or_deferrable_fks-SuiteRequirements.on_update_or_deferrable_fks   s    
 !!+
 	
r   c                4    S n[         R                  " U5      $ )z"target database is using QueuePoolc                J    [        U R                  R                  [        5      $ rN   )
isinstancedbpoolr   configs    r   go(SuiteRequirements.queue_pool.<locals>.go   s    fiinni88r   rW   r    rb   s     r   
queue_poolSuiteRequirements.queue_pool   s    	9 !!"%%r   c                ,    [         R                  " 5       $ )z;Target database must support self-referential foreign keys.r   r   s    r   self_referential_foreign_keys/SuiteRequirements.self_referential_foreign_keys   r#   r   c                ,    [         R                  " 5       $ )z=Target database must support the DDL phrases for FOREIGN KEY.r   r   s    r   foreign_key_ddl!SuiteRequirements.foreign_key_ddl   r#   r   c                ,    [         R                  " 5       $ )z3target database must support names for constraints.r   r   s    r   named_constraints#SuiteRequirements.named_constraints   r#   r   c                ,    [         R                  " 5       $ )z8target database must apply names to unnamed constraints.r   r   s    r   implicitly_named_constraints.SuiteRequirements.implicitly_named_constraints   r#   r   c                ,    [         R                  " 5       $ )ztarget 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   s    r   unusual_column_name_characters0SuiteRequirements.unusual_column_name_characters   s       r   c                ,    [         R                  " 5       $ )z(Target database must support subqueries.r   r   s    r   
subqueriesSuiteRequirements.subqueries   r#   r   c                ,    [         R                  " 5       $ )zBtarget database can render OFFSET, or an equivalent, in a
SELECT.
r   r   s    r   offsetSuiteRequirements.offset          r   c                ,    [         R                  " 5       $ )zGtarget database can render LIMIT and/or OFFSET using a bound
parameter
r   r   s    r   bound_limit_offset$SuiteRequirements.bound_limit_offset   r|   r   c                ,    [         R                  " 5       $ )ztarget database can render LIMIT and/or OFFSET with a complete
SQL expression, such as one that uses the addition operator.
parameter
r   r   s    r   sql_expression_limit_offset-SuiteRequirements.sql_expression_limit_offset          r   c                ,    [         R                  " 5       $ )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   s    r   /parens_in_union_contained_select_w_limit_offsetASuiteRequirements.parens_in_union_contained_select_w_limit_offset          r   c                ,    [         R                  " 5       $ )a<  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   s    r   0parens_in_union_contained_select_wo_limit_offsetBSuiteRequirements.parens_in_union_contained_select_wo_limit_offset          r   c                ,    [         R                  " 5       $ )z;Target database must support boolean expressions as columnsr(   r   s    r   boolean_col_expressions)SuiteRequirements.boolean_col_expressions   r,   r   c                ,    [         R                  " 5       $ )z5Target database allows boolean columns to store NULL.r   r   s    r   nullable_booleans#SuiteRequirements.nullable_booleans  r#   r   c                ,    [         R                  " 5       $ )z,Target backends that support nulls ordering.r(   r   s    r   nullsorderingSuiteRequirements.nullsordering  r,   r   c                ,    [         R                  " 5       $ )zwtarget database/driver supports bound parameters as column
expressions without being in the context of a typed column.
r   r   s    r   standalone_binds"SuiteRequirements.standalone_binds  rI   r   c                ,    [         R                  " 5       $ )zytarget database/driver supports bound parameters with NULL in the
WHERE clause, in situations where it has to be typed.

r   r   s    r   !standalone_null_binds_whereclause3SuiteRequirements.standalone_null_binds_whereclause  r|   r   c                ,    [         R                  " 5       $ )z5Target database must support INTERSECT or equivalent.r(   r   s    r   	intersectSuiteRequirements.intersect          ""r   c                ,    [         R                  " 5       $ )z?Target database must support EXCEPT or equivalent (i.e. MINUS).r(   r   s    r   except_SuiteRequirements.except_%  r   r   c                ,    [         R                  " 5       $ )z.Target database must support window functions.r(   r   s    r   window_functions"SuiteRequirements.window_functions*  r   r   c                ,    [         R                  " 5       $ )zTarget database supports CTEsr(   r   s    r   ctesSuiteRequirements.ctes/  r,   r   c                ,    [         R                  " 5       $ )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   s    r   ctes_with_update_delete)SuiteRequirements.ctes_with_update_delete5         ""r   c                ,    [         R                  " 5       $ )zutarget database supports CTES which consist of INSERT, UPDATE
or DELETE *within* the CTE, e.g. WITH x AS (UPDATE....)r(   r   s    r   ctes_on_dmlSuiteRequirements.ctes_on_dml>  r9   r   c                ,    [         R                  " 5       $ )zvtarget platform generates new surrogate integer primary key values
when insert() is executed, excluding the pk column.r   r   s    r   autoincrement_insert&SuiteRequirements.autoincrement_insertE  rI   r   c                ,    [         R                  " 5       $ )ztarget 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   s    r   fetch_rows_post_commit(SuiteRequirements.fetch_rows_post_commitL  s       r   c                ,    [         R                  " 5       $ )zqtarget platform supports SQL expressions in GROUP BY

e.g.

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

r   r   s    r   group_by_complex_expression-SuiteRequirements.group_by_complex_expressionY  r   r   c                2    [         R                  " S S5      $ )Nc                L    U R                   R                  R                  (       + $ rN   )r^   dialectsupports_sane_rowcountr`   s    r   rU   1SuiteRequirements.sane_rowcount.<locals>.<lambda>h  s    vyy00GGGr   z&driver doesn't support 'sane' rowcountr   skip_ifr   s    r   sane_rowcountSuiteRequirements.sane_rowcounte  s    !!G4
 	
r   c                2    [         R                  " S S5      $ )Nc                L    U R                   R                  R                  (       + $ rN   )r^   r   supports_sane_multi_rowcountr`   s    r   rU   7SuiteRequirements.sane_multi_rowcount.<locals>.<lambda>o  s    vyy00MMMr   z;driver %(driver)s %(doesnt_support)s 'sane' multi row countr   fails_ifr   s    r   sane_multi_rowcount%SuiteRequirements.sane_multi_rowcountl  s    ""MI
 	
r   c                2    [         R                  " S S5      $ )Nc                L    U R                   R                  R                  (       + $ rN   )r^   r    supports_sane_rowcount_returningr`   s    r   rU   =SuiteRequirements.sane_rowcount_w_returning.<locals>.<lambda>v  s    		!!BBr   z;driver doesn't support 'sane' rowcount when returning is onr   r   s    r   sane_rowcount_w_returning+SuiteRequirements.sane_rowcount_w_returnings  s     "" J	
 	
r   c                2    [         R                  " S S5      $ )zYtarget platform supports INSERT with no values, i.e.
INSERT DEFAULT VALUES or equivalent.c                    U R                   R                  R                  =(       dG    U R                   R                  R                  =(       d     U R                   R                  R                  $ rN   )r^   r   supports_empty_insertsupports_default_valuessupports_default_metavaluer`   s    r   rU   1SuiteRequirements.empty_inserts.<locals>.<lambda>  sI    699,,BB <yy  88<yy  ;;<r   zempty inserts not supportedrW   r   s    r   empty_insertsSuiteRequirements.empty_inserts|  s!    
 !!< *	
 	
r   c                    U R                   $ )zntarget platform supports INSERT with no values, i.e.
INSERT DEFAULT VALUES or equivalent, within executemany())r   r   s    r   empty_inserts_executemany+SuiteRequirements.empty_inserts_executemany  s    
 !!!r   c                ,    [         R                  " 5       $ )z.target platform supports INSERT from a SELECT.r   r   s    r   insert_from_select$SuiteRequirements.insert_from_select  r#   r   c                2    [         R                  " S S5      $ )z.target platform supports DELETE ... RETURNING.c                B    U R                   R                  R                  $ rN   )r^   r   delete_returningr`   s    r   rU   4SuiteRequirements.delete_returning.<locals>.<lambda>      699,,==r   z4%(database)s %(does_support)s 'DELETE ... RETURNING'rW   r   s    r   r   "SuiteRequirements.delete_returning       !!=B
 	
r   c                2    [         R                  " S S5      $ )z.target platform supports INSERT ... RETURNING.c                B    U R                   R                  R                  $ rN   )r^   r   insert_returningr`   s    r   rU   4SuiteRequirements.insert_returning.<locals>.<lambda>  r   r   z4%(database)s %(does_support)s 'INSERT ... RETURNING'rW   r   s    r   r   "SuiteRequirements.insert_returning  r   r   c                2    [         R                  " S S5      $ )z.target platform supports UPDATE ... RETURNING.c                B    U R                   R                  R                  $ rN   )r^   r   update_returningr`   s    r   rU   4SuiteRequirements.update_returning.<locals>.<lambda>  r   r   z4%(database)s %(does_support)s 'UPDATE ... RETURNING'rW   r   s    r   r   "SuiteRequirements.update_returning  r   r   c                2    [         R                  " S S5      $ )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                B    U R                   R                  R                  $ rN   )r^   r   insert_executemany_returningr`   s    r   rU   @SuiteRequirements.insert_executemany_returning.<locals>.<lambda>  s    699,,IIr   zR%(database)s %(does_support)s 'RETURNING of multiple rows with INSERT executemany'rW   r   s    r   r   .SuiteRequirements.insert_executemany_returning  s     !!I5
 	
r   c                2    [         R                  " S S5      $ )Nc                    U R                   R                  R                  =(       aG    U R                   R                  R                  =(       a     U R                   R                  R                  $ rN   )r^   r   supports_multivalues_insertr   use_insertmanyvaluesr`   s    r   rU   4SuiteRequirements.insertmanyvalues.<locals>.<lambda>  sI    699,,HH 7		!!227		!!667r   z=%(database)s %(does_support)s 'insertmanyvalues functionalityrW   r   s    r   insertmanyvalues"SuiteRequirements.insertmanyvalues  s     !!7 L	
 	
r   c                ,    [         R                  " 5       $ )zJTarget platform supports the syntax
"(x, y) IN ((x1, y1), (x2, y2), ...)"
r(   r   s    r   tuple_inSuiteRequirements.tuple_in         ""r   c                    U R                   $ )z%Target platform tuple IN w/ empty set)r   r   s    r   tuple_in_w_empty"SuiteRequirements.tuple_in_w_empty  s     }}r   c                ,    [         R                  " 5       $ )zotarget platform supports a SELECT statement that has
the same name repeated more than once in the columns list.r   r   s    r   %duplicate_names_in_cursor_description7SuiteRequirements.duplicate_names_in_cursor_description  rI   r   c                2    [         R                  " S S5      $ )zSTarget database must have 'denormalized', i.e.
UPPERCASE as case insensitive names.c                L    U R                   R                  R                  (       + $ rN   )r^   r   requires_name_normalizer`   s    r   rU   6SuiteRequirements.denormalized_names.<locals>.<lambda>  s    vyy00HHHr   z,Backend does not require denormalized names.r   r   s    r   denormalized_names$SuiteRequirements.denormalized_names  s    
 !!H:
 	
r   c                2    [         R                  " S S5      $ )zLtarget database must support multiple VALUES clauses in an
INSERT statement.c                L    U R                   R                  R                  (       + $ rN   )r^   r   r   r`   s    r   rU   7SuiteRequirements.multivalues_inserts.<locals>.<lambda>  s    vyy00LLLr   z*Backend does not support multirow inserts.r   r   s    r   multivalues_inserts%SuiteRequirements.multivalues_inserts  s    
 !!L8
 	
r   c                ,    [         R                  " 5       $ )zftarget dialect implements the executioncontext.get_lastrowid()
method without reliance on RETURNING.

r   r   s    r   implements_get_lastrowid*SuiteRequirements.implements_get_lastrowid  r|   r   c                ,    [         R                  " 5       $ )zDdialect includes the required pep-249 attribute
``cursor.arraysize``r   r   s    r   	arraysizeSuiteRequirements.arraysize  rI   r   c                ,    [         R                  " 5       $ )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   s    r   emulated_lastrowid$SuiteRequirements.emulated_lastrowid         ""r   c                ,    [         R                  " 5       $ )ztarget dialect retrieves cursor.lastrowid or an equivalent
after an insert() construct executes, even if the table has a
Sequence on it.

r(   r   s    r   &emulated_lastrowid_even_with_sequences8SuiteRequirements.emulated_lastrowid_even_with_sequences
  r   r   c                ,    [         R                  " 5       $ )zMtarget platform includes a 'lastrowid' accessor on the DBAPI
cursor object.

r(   r   s    r   dbapi_lastrowid!SuiteRequirements.dbapi_lastrowid  r   r   c                ,    [         R                  " 5       $ )z#Target database must support VIEWs.r(   r   s    r   viewsSuiteRequirements.views  r,   r   c                    [        S 5      $ )zPTarget database must support external schemas, and have one
named 'test_schema'.c                B    U R                   R                  R                  $ rN   )r^   r   supports_schemasr`   s    r   rU   +SuiteRequirements.schemas.<locals>.<lambda>&  s    fii&7&7&H&Hr   r   r   s    r   schemasSuiteRequirements.schemas!  s    
 HIIr   c                ,    [         R                  " 5       $ )zBtarget system must support reflection of inter-schema
foreign keysr(   r   s    r   cross_schema_fk_reflection,SuiteRequirements.cross_schema_fk_reflection(  r,   r   c                ,    [         R                  " 5       $ )zTarget 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   s    r   &foreign_key_constraint_name_reflection8SuiteRequirements.foreign_key_constraint_name_reflection.  r  r   c                ,    [         R                  " 5       $ )zttarget system has a strong concept of 'default' schema that can
be referred to implicitly.

basically, PostgreSQL.

r(   r   s    r   implicit_default_schema)SuiteRequirements.implicit_default_schema:         ""r   c                ,    [         R                  " 5       $ )zXtarget dialect implements provisioning module including
set_default_schema_on_connectionr(   r   s    r   default_schema_name_switch,SuiteRequirements.default_schema_name_switchD  r9   r   c                4    [         R                  " S /S5      $ )z0Target dialect must support server side cursors.c                B    U R                   R                  R                  $ rN   )r^   r   supports_server_side_cursorsr`   s    r   rU   7SuiteRequirements.server_side_cursors.<locals>.<lambda>P  s    FII--JJr   zno server side cursors supportrW   r   s    r   server_side_cursors%SuiteRequirements.server_side_cursorsK  s      !!JK,
 	
r   c                4    [         R                  " S /S5      $ )z'Target database must support SEQUENCEs.c                B    U R                   R                  R                  $ rN   )r^   r   supports_sequencesr`   s    r   rU   -SuiteRequirements.sequences.<locals>.<lambda>Y  s    FII--@@r   zno sequence supportrW   r   s    r   	sequencesSuiteRequirements.sequencesT  s      !!@A!
 	
r   c                B    [         R                  " U R                  5      $ )zBthe opposite of "sequences", DB does not support sequences at
all.)r   NotPredicater?  r   s    r   no_sequencesSuiteRequirements.no_sequences]  s    
 &&t~~66r   c                4    [         R                  " S /S5      $ )z_Target database supports sequences, but also optionally
as a means of generating new PK values.c                    U R                   R                  R                  =(       a     U R                   R                  R                  $ rN   )r^   r   r=  sequences_optionalr`   s    r   rU   6SuiteRequirements.sequences_optional.<locals>.<lambda>k  s1    vyy00CC  9II%%88 9r   z.no sequence support, or sequences not optionalrW   r   s    r   rG  $SuiteRequirements.sequences_optionald  s&    
 !!9 =
 	
r   c                2    [         R                  " S /5      $ )ztarget 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                B    U R                   R                  R                  $ rN   r^   r   postfetch_lastrowidr`   s    r   rU   6SuiteRequirements.supports_lastrowid.<locals>.<lambda>{  s    FII--AAr   rW   r   s    r   supports_lastrowid$SuiteRequirements.supports_lastrowidq  s     !!AB
 	
r   c                2    [         R                  " S /5      $ )z"the opposite of supports_lastrowidc                L    U R                   R                  R                  (       + $ rN   rL  r`   s    r   rU   8SuiteRequirements.no_lastrowid_support.<locals>.<lambda>  s    		 1 1 E EEr   rW   r   s    r   no_lastrowid_support&SuiteRequirements.no_lastrowid_support~  s     !!EF
 	
r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   reflects_pk_names#SuiteRequirements.reflects_pk_names  rQ   r   c                ,    [         R                  " 5       $ )z8target database has general support for table reflectionr   r   s    r   table_reflection"SuiteRequirements.table_reflection         r   c                ,    [         R                  " 5       $ )z|target database supports creation and reflection of tables with no
columns, or at least tables that seem to have no columns.r(   r   s    r   reflect_tables_no_columns+SuiteRequirements.reflect_tables_no_columns  r9   r   c                ,    [         R                  " 5       $ )z:Indicates if the database support table comment reflectionr(   r   s    r   comment_reflection$SuiteRequirements.comment_reflection  r   r   c                ,    [         R                  " 5       $ )zkIndicates if the database support table comment reflection in the
full unicode range, including emoji etc.
r(   r   s    r   comment_reflection_full_unicode1SuiteRequirements.comment_reflection_full_unicode  r9   r   c                ,    [         R                  " 5       $ )zNindicates if the database support comments on constraints
and their reflectionr(   r   s    r   constraint_comment_reflection/SuiteRequirements.constraint_comment_reflection  r,   r   c                    U R                   $ )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   s    r   view_column_reflection(SuiteRequirements.view_column_reflection  s     zzr   c                    U R                   $ )zKtarget database must support inspection of the full CREATE VIEW
definition.rj  r   s    r   view_reflection!SuiteRequirements.view_reflection  s     zzr   c                    U R                   $ rN   )r&  r   s    r   schema_reflection#SuiteRequirements.schema_reflection  s    ||r   c                ,    [         R                  " 5       $ )zYtarget database supports schema create and dropped with
'CREATE SCHEMA' and 'DROP SCHEMA'r(   r   s    r   schema_create_delete&SuiteRequirements.schema_create_delete  r,   r   c                ,    [         R                  " 5       $ rN   r   r   s    r   !primary_key_constraint_reflection3SuiteRequirements.primary_key_constraint_reflection        r   c                ,    [         R                  " 5       $ rN   r   r   s    r   !foreign_key_constraint_reflection3SuiteRequirements.foreign_key_constraint_reflection  ry  r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   1foreign_key_constraint_option_reflection_ondeleteCSuiteRequirements.foreign_key_constraint_option_reflection_ondelete  rQ   r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   1fk_constraint_option_reflection_ondelete_restrictCSuiteRequirements.fk_constraint_option_reflection_ondelete_restrict  rQ   r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   1fk_constraint_option_reflection_ondelete_noactionCSuiteRequirements.fk_constraint_option_reflection_ondelete_noaction  rQ   r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   1foreign_key_constraint_option_reflection_onupdateCSuiteRequirements.foreign_key_constraint_option_reflection_onupdate  rQ   r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   1fk_constraint_option_reflection_onupdate_restrictCSuiteRequirements.fk_constraint_option_reflection_onupdate_restrict  rQ   r   c                ,    [         R                  " 5       $ rN   r   r   s    r   temp_table_reflection'SuiteRequirements.temp_table_reflection  ry  r   c                    U R                   $ rN   )r  r   s    r   temp_table_reflect_indexes,SuiteRequirements.temp_table_reflect_indexes  s    )))r   c                ,    [         R                  " 5       $ )z8target dialect supports listing of temporary table namesr(   r   s    r   temp_table_names"SuiteRequirements.temp_table_names  r   r   c                ,    [         R                  " 5       $ )z9target dialect supports checking a single temp table namer(   r   s    r   has_temp_table SuiteRequirements.has_temp_table  r   r   c                ,    [         R                  " 5       $ )z)target database supports temporary tablesr   r   s    r   temporary_tables"SuiteRequirements.temporary_tables  r\  r   c                ,    [         R                  " 5       $ )z(target database supports temporary viewsr(   r   s    r   temporary_views!SuiteRequirements.temporary_views  r   r   c                ,    [         R                  " 5       $ rN   r   r   s    r   index_reflection"SuiteRequirements.index_reflection  ry  r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   index_reflects_included_columns1SuiteRequirements.index_reflects_included_columns  rQ   r   c                ,    [         R                  " 5       $ )z?target database supports CREATE INDEX with per-column ASC/DESC.r   r   s    r   indexes_with_ascdesc&SuiteRequirements.indexes_with_ascdesc  r\  r   c                ,    [         R                  " 5       $ )zCtarget database supports reflecting INDEX with per-column
ASC/DESC.r   r   s    r   reflect_indexes_with_ascdesc.SuiteRequirements.reflect_indexes_with_ascdesc  r#   r   c                ,    [         R                  " 5       $ )zrtarget database supports reflecting INDEX with per-column
ASC/DESC but reflects them as expressions (like oracle).r(   r   s    r   *reflect_indexes_with_ascdesc_as_expression<SuiteRequirements.reflect_indexes_with_ascdesc_as_expression  r,   r   c                ,    [         R                  " 5       $ )z>target database supports CREATE INDEX against SQL expressions.r(   r   s    r   indexes_with_expressions*SuiteRequirements.indexes_with_expressions  r   r   c                ,    [         R                  " 5       $ )zDtarget database supports reflection of indexes with
SQL expressions.r(   r   s    r    reflect_indexes_with_expressions2SuiteRequirements.reflect_indexes_with_expressions  r,   r   c                ,    [         R                  " 5       $ )z8target dialect supports reflection of unique constraintsr   r   s    r   unique_constraint_reflection.SuiteRequirements.unique_constraint_reflection  r\  r   c                ,    [         R                  " 5       $ )z>target dialect supports reflection of inline check constraintsr(   r   s    r   "inline_check_constraint_reflection4SuiteRequirements.inline_check_constraint_reflection"  r   r   c                ,    [         R                  " 5       $ )z7target dialect supports reflection of check constraintsr(   r   s    r   check_constraint_reflection-SuiteRequirements.check_constraint_reflection'  r   r   c                ,    [         R                  " 5       $ )zptarget dialect raises IntegrityError when reporting an INSERT
with a primary key violation.  (hint: it should)

r   r   s    r   $duplicate_key_raises_integrity_error6SuiteRequirements.duplicate_key_raises_integrity_error,  r|   r   c                ,    [         R                  " 5       $ )z3Target database must support VARCHAR with no lengthr   r   s    r   unbounded_varchar#SuiteRequirements.unbounded_varchar4  r#   r   c                ,    [         R                  " 5       $ )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   s    r   unicode_data_no_special_types/SuiteRequirements.unicode_data_no_special_types:  r   r   c                ,    [         R                  " 5       $ )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   s    r   unicode_dataSuiteRequirements.unicode_dataC  r   r   c                ,    [         R                  " 5       $ )zBTarget driver must support some degree of non-ascii symbol
names.
r(   r   s    r   unicode_ddlSuiteRequirements.unicode_ddlL  r9   r   c                ,    [         R                  " 5       $ )z?Target driver can create tables with a name like 'some " table'r   r   s    r   symbol_names_w_double_quote-SuiteRequirements.symbol_names_w_double_quoteS  r\  r   c                ,    [         R                  " 5       $ )ztarget dialect supports rendering of a datetime.timedelta as a
literal string, e.g. via the TypeEngine.literal_processor() method.

r(   r   s    r   datetime_interval#SuiteRequirements.datetime_intervalX  r   r   c                ,    [         R                  " 5       $ )ztarget dialect supports rendering of a date, time, or datetime as a
literal string, e.g. via the TypeEngine.literal_processor() method.

r(   r   s    r   datetime_literals#SuiteRequirements.datetime_literals`  r   r   c                ,    [         R                  " 5       $ )zMtarget dialect supports representation of Python
datetime.datetime() objects.r   r   s    r   datetimeSuiteRequirements.datetimei  rI   r   c                ,    [         R                  " 5       $ )zntarget dialect supports representation of Python
datetime.datetime() with tzinfo with DateTime(timezone=True).r(   r   s    r   datetime_timezone#SuiteRequirements.datetime_timezonep  r9   r   c                ,    [         R                  " 5       $ )zftarget dialect supports representation of Python
datetime.time() with tzinfo with Time(timezone=True).r(   r   s    r   time_timezoneSuiteRequirements.time_timezonew  r9   r   c                ,    [         R                  " 5       $ )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   s    r   date_implicit_bound%SuiteRequirements.date_implicit_bound~  r   r   c                ,    [         R                  " 5       $ )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   s    r   time_implicit_bound%SuiteRequirements.time_implicit_bound  r   r   c                ,    [         R                  " 5       $ )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   s    r   datetime_implicit_bound)SuiteRequirements.datetime_implicit_bound  r   r   c                ,    [         R                  " 5       $ )z^target dialect supports representation of Python
datetime.datetime() with microsecond objects.r   r   s    r   datetime_microseconds'SuiteRequirements.datetime_microseconds  rI   r   c                ,    [         R                  " 5       $ )z|target dialect supports representation of Python
datetime.datetime() with microsecond objects but only
if TIMESTAMP is used.r(   r   s    r   timestamp_microseconds(SuiteRequirements.timestamp_microseconds  r9   r   c                    U R                   $ )ztarget 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   s    r   %timestamp_microseconds_implicit_bound7SuiteRequirements.timestamp_microseconds_implicit_bound  s     ***r   c                ,    [         R                  " 5       $ zmtarget dialect supports representation of Python
datetime.datetime() objects with historic (pre 1970) values.r(   r   s    r   datetime_historic#SuiteRequirements.datetime_historic  r9   r   c                ,    [         R                  " 5       $ )zItarget dialect supports representation of Python
datetime.date() objects.r   r   s    r   dateSuiteRequirements.date  rI   r   c                ,    [         R                  " 5       $ )zHtarget dialect accepts a datetime object as the target
of a date column.r   r   s    r   date_coerces_from_datetime,SuiteRequirements.date_coerces_from_datetime  rI   r   c                ,    [         R                  " 5       $ r  r(   r   s    r   date_historicSuiteRequirements.date_historic  r9   r   c                ,    [         R                  " 5       $ )zItarget dialect supports representation of Python
datetime.time() objects.r   r   s    r   timeSuiteRequirements.time  rI   r   c                ,    [         R                  " 5       $ )zZtarget dialect supports representation of Python
datetime.time() with microsecond objects.r   r   s    r   time_microseconds#SuiteRequirements.time_microseconds  rI   r   c                ,    [         R                  " 5       $ )zdtarget database/driver can allow BLOB/BINARY fields to be compared
against a bound parameter value.
r   r   s    r   binary_comparisons$SuiteRequirements.binary_comparisons  r|   r   c                ,    [         R                  " 5       $ )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   s    r   binary_literals!SuiteRequirements.binary_literals          r   c                ,    [         R                  " 5       $ )z:target dialect supports 'AUTOCOMMIT' as an isolation_levelr(   r   s    r   
autocommitSuiteRequirements.autocommit  r   r   c                ,    [         R                  " 5       $ )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   s    r   isolation_level!SuiteRequirements.isolation_level  r1  r   c                .   UR                   R                  5        n UR                  R                  UR                  R
                  5      nUR                  R                  US.sSSS5        $ ! [         a     SSS5        gf = f! , (       d  f       g= f)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"
        ]
    }
)default	supportedN)r^   connectr   get_isolation_level_values
connectiondbapi_connectiondefault_isolation_levelNotImplementedError)r    ra   connr  s       r   get_isolation_levels&SuiteRequirements.get_isolation_levels  s    2 YY D
 LLCCOO44	  $||CC!* ! 
 '  ! 
 ! s.   B/A.B.
B8BBB
Bc                4    S n[         R                  " U5      $ )zptarget dialect supports the
:meth:`_engine.Dialect.get_isolation_level_values`
method added in SQLAlchemy 2.0.

c                    U R                   R                  5        n UR                  R                  UR                  R
                  5         S S S 5        g! [         a     S S S 5        gf = f! , (       d  f       g = f)NTF)r^   r  r   r  r  r  r  )ra   r  s     r   rb   8SuiteRequirements.get_isolation_level_values.<locals>.go2  sj    ""$ LL;;88   %$
 + !  %$
! %$s.   A./AA.
A+ A.*A++A..
A<rW   rd   s     r   r  ,SuiteRequirements.get_isolation_level_values*  s    		  !!"%%r   c                4    S n[         R                  " U5      $ )z[test that the dialect allows the 'isolation_level' argument
to be handled by DefaultDialectc                     [        U R                  R                  SS9nUR                  R                  S:H  $ !    g= f)NzREAD COMMITTED)r  F)r   r^   urlr   _on_connect_isolation_level)ra   es     r   rb   ASuiteRequirements.dialect_level_isolation_level_param.<locals>.goD  sC    	!IIMM3C II99=MMs   9 =rW   rd   s     r   #dialect_level_isolation_level_param5SuiteRequirements.dialect_level_isolation_level_param?  s    

	 !!"%%r   c                ,    [         R                  " 5       $ )z.Target platform implements a native ARRAY typer(   r   s    r   
array_typeSuiteRequirements.array_typeR  r   r   c                ,    [         R                  " 5       $ )z.target platform implements a native JSON type.r(   r   s    r   	json_typeSuiteRequirements.json_typeW  r,   r   c                    U R                   $ )zFtarget platform supports numeric array indexes
within a JSON structure)r+  r   s    r   json_array_indexes$SuiteRequirements.json_array_indexes]  s    
 ~~r   c                ,    [         R                  " 5       $ rN   r   r   s    r   (json_index_supplementary_unicode_element:SuiteRequirements.json_index_supplementary_unicode_elementd  ry  r   c                ,    [         R                  " 5       $ )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   s    r   !legacy_unconditional_json_extract3SuiteRequirements.legacy_unconditional_json_extracth  r1  r   c                ,    [         R                  " 5       $ )zJtarget backend has general support for moderately high-precision
numerics.r   r   s    r   precision_numerics_general,SuiteRequirements.precision_numerics_generalr  r#   r   c                ,    [         R                  " 5       $ )zZtarget backend supports Decimal() objects using E notation
to represent very small values.r(   r   s    r   "precision_numerics_enotation_small4SuiteRequirements.precision_numerics_enotation_smallx  r,   r   c                ,    [         R                  " 5       $ )zZtarget backend supports Decimal() objects using E notation
to represent very large values.r   r   s    r   "precision_numerics_enotation_large4SuiteRequirements.precision_numerics_enotation_large~  r#   r   c                ,    [         R                  " 5       $ )zvtarget backend supports values with many digits on both sides,
such as 319438950232418390.273596, 87673.594069654243

r(   r   s    r   *precision_numerics_many_significant_digits<SuiteRequirements.precision_numerics_many_significant_digits  r   r   c                    U R                   $ )zmsame as precision_numerics_many_significant_digits but within the
context of a CAST statement (hello MySQL)

)r@  r   s    r   /cast_precision_numerics_many_significant_digitsASuiteRequirements.cast_precision_numerics_many_significant_digits  s     >>>r   c                ,    [         R                  " 5       $ )z8Target backend supports server side defaults for columnsr(   r   s    r   server_defaults!SuiteRequirements.server_defaults  r,   r   c                ,    [         R                  " 5       $ )zMTarget backend supports server side defaults with SQL expressions
for columnsr(   r   s    r   expression_server_defaults,SuiteRequirements.expression_server_defaults  r9   r   c                ,    [         R                  " 5       $ )ztarget 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   s    r   implicit_decimal_binds(SuiteRequirements.implicit_decimal_binds  s    "   r   c                ,    [         R                  " 5       $ )a  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   s    r   #numeric_received_as_decimal_untyped5SuiteRequirements.numeric_received_as_decimal_untyped  s       r   c                ,    [         R                  " 5       $ )zXtarget database can select an aggregate from a subquery that's
also using an aggregate

r   r   s    r   nested_aggregates#SuiteRequirements.nested_aggregates  r|   r   c                ,    [         R                  " 5       $ )zRtarget database must support ON DELETE CASCADE on a self-referential
foreign key

r   r   s    r   recursive_fk_cascade&SuiteRequirements.recursive_fk_cascade  r|   r   c                ,    [         R                  " 5       $ )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   s    r   -precision_numerics_retains_significant_digits?SuiteRequirements.precision_numerics_retains_significant_digits  r   r   c                ,    [         R                  " 5       $ )z@The Float type can persist and load float('inf'), float('-inf').r(   r   s    r   infinity_floats!SuiteRequirements.infinity_floats  r,   r   c                ,    [         R                  " 5       $ rN   r(   r   s    r   -float_or_double_precision_behaves_generically?SuiteRequirements.float_or_double_precision_behaves_generically  rQ   r   c                ,    [         R                  " 5       $ )ztarget backend will return native floating point numbers with at
least seven decimal places when using the generic Float type.

r   r   s    r   precision_generic_float_type.SuiteRequirements.precision_generic_float_type  r|   r   c                ,    [         R                  " 5       $ )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   s    r   literal_float_coercion(SuiteRequirements.literal_float_coercion  r   r   c                ,    [         R                  " 5       $ )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   s    r   floats_to_four_decimals)SuiteRequirements.floats_to_four_decimals  r   r   c                ,    [         R                  " 5       $ )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   s    r   fetch_null_from_numeric)SuiteRequirements.fetch_null_from_numeric  s       r   c                ,    [         R                  " 5       $ )z*target backend uses Numeric for Float/Dualr   r   s    r   float_is_numeric"SuiteRequirements.float_is_numeric  r#   r   c                ,    [         R                  " 5       $ )zMTarget database must support an unbounded Text() "
"type such as TEXT or CLOBr   r   s    r   	text_typeSuiteRequirements.text_type  rI   r   c                ,    [         R                  " 5       $ )zDtarget database can persist/return an empty string with a
varchar.

r   r   s    r   empty_strings_varchar'SuiteRequirements.empty_strings_varchar  r|   r   c                ,    [         R                  " 5       $ )zJtarget database can persist/return an empty string with an
unbounded text.r   r   s    r   empty_strings_text$SuiteRequirements.empty_strings_text#  rI   r   c                ,    [         R                  " 5       $ )zMtarget database supports use of an unbounded textual field in a
WHERE clause.r   r   s    r   "expressions_against_unbounded_text4SuiteRequirements.expressions_against_unbounded_text*  rI   r   c                ,    [         R                  " 5       $ )z;target driver must support the literal statement 'select 1'r   r   s    r   	selectoneSuiteRequirements.selectone1  r\  r   c                ,    [         R                  " 5       $ )z(Target database must support savepoints.r(   r   s    r   
savepointsSuiteRequirements.savepoints6  r,   r   c                ,    [         R                  " 5       $ )z4Target database must support two-phase transactions.r(   r   s    r   two_phase_transactions(SuiteRequirements.two_phase_transactions<  r,   r   c                ,    [         R                  " 5       $ )z'Target must support UPDATE..FROM syntaxr(   r   s    r   update_fromSuiteRequirements.update_fromB  r   r   c                ,    [         R                  " 5       $ )z=Target must support DELETE FROM..FROM or DELETE..USING syntaxr(   r   s    r   delete_fromSuiteRequirements.delete_fromG  r   r   c                ,    [         R                  " 5       $ )av  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   s    r   update_where_target_in_subquery1SuiteRequirements.update_where_target_in_subqueryL  r  r   c                ,    [         R                  " 5       $ )zGtarget database must use a plain percent '%' as the 'modulus'
operator.r(   r   s    r   mod_operator_as_percent_sign.SuiteRequirements.mod_operator_as_percent_sign^  r,   r   c                ,    [         R                  " 5       $ )ztarget 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   s    r   percent_schema_names&SuiteRequirements.percent_schema_namesd  r  r   c                ,    [         R                  " 5       $ )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   s    r   order_by_col_from_union)SuiteRequirements.order_by_col_from_unionp  r   r   c                ,    [         R                  " 5       $ )ztarget 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   s    r   order_by_label_with_expression0SuiteRequirements.order_by_label_with_expression~  s       ""r   c                <   ^  U 4S jn[         R                  " U5      $ )Nc                J   >  TR                  U 5        g! [         a     gf = f)NFT)get_order_by_collationr  )ra   r    s    r   check3SuiteRequirements.order_by_collation.<locals>.check  s+    ++F3& s    
""r   r    r  s   ` r   order_by_collation$SuiteRequirements.order_by_collation  s    	 !!%((r   c                    [        5       erN   )r  r    ra   s     r   r  (SuiteRequirements.get_order_by_collation  s    !##r   c                ,    [         R                  " 5       $ )zETarget driver must support non-ASCII characters being passed at
all.
r   r   s    r   unicode_connections%SuiteRequirements.unicode_connections  rI   r   c                ,    [         R                  " 5       $ )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   s    r   graceful_disconnects&SuiteRequirements.graceful_disconnects  r|   r   c                ,    [         R                  " 5       $ )zE
Target must support simultaneous, independent database connections.
r   r   s    r   independent_connections)SuiteRequirements.independent_connections  rI   r   c                ,    [         R                  " 5       $ )zn
Target must support simultaneous, independent database connections
that will be used in a readonly fashion.

r   r   s    r    independent_readonly_connections2SuiteRequirements.independent_readonly_connections  r   r   c                ,    [         R                  " 5       $ )z9Catchall for a large variety of MySQL on Windows failuresr   r   s    r   skip_mysql_on_windows'SuiteRequirements.skip_mysql_on_windows  r\  r   c                0    [         R                  " S 5      $ )zTest 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                .    U R                   R                  $ rN   )optionslow_connectionsr`   s    r   rU   2SuiteRequirements.ad_hoc_engines.<locals>.<lambda>  s    6>>99r   r   r   s    r   ad_hoc_engines SuiteRequirements.ad_hoc_engines  s     !!9
 	
r   c                J    [         R                  " U R                  5       5      $ rN   )r   r   _running_on_windowsr   s    r   
no_windowsSuiteRequirements.no_windows  s    !!$":":"<==r   c                .    [         R                  " S SS9$ )Nc                 2    [         R                  " 5       S:H  $ )NWindows)platformsystemr   r   r   rU   7SuiteRequirements._running_on_windows.<locals>.<lambda>  s    HOO%2r   zrunning on Windows)description)r   LambdaPredicater   s    r   r  %SuiteRequirements._running_on_windows  s    ))2,
 	
r   c                :    SSK Jn  UR                  R                  $ Nr   r`   ) ra   add_to_markertiming_intensiver  s     r   r  "SuiteRequirements.timing_intensive      ##444r   c                0    [         R                  " S 5      $ )Nc                 (    [         R                  S:g  $ )Nposix)osnamer   r   r   rU   )SuiteRequirements.posix.<locals>.<lambda>  s    "''W*<r   r   r   s    r   r  SuiteRequirements.posix  s    !!"<==r   c                :    SSK Jn  UR                  R                  $ r  )r  ra   r  memory_intensiver  s     r   r  "SuiteRequirements.memory_intensive  r  r   c                2    [         R                  " S S5      $ )zmMark tests that use threading and mock at the same time - stability
issues have been observed with coverage

c                .    U R                   R                  $ rN   r  has_coverager`   s    r   rU   7SuiteRequirements.threading_with_mock.<locals>.<lambda>      6>>66r   zStability issues with coverager   r   s    r   threading_with_mock%SuiteRequirements.threading_with_mock  s     !!6,
 	
r   c                4    S n[         R                  " U5      $ )Nc                <     [        S5        g! [         a     gf = fNzsqlalchemy-stubs.ext.mypyTF
__import__ImportErrorr`   s    r   r  2SuiteRequirements.sqlalchemy2_stubs.<locals>.check  )    67       
rW   r  s     r   sqlalchemy2_stubs#SuiteRequirements.sqlalchemy2_stubs      	 !!%((r   c                4    S n[         R                  " U5      $ )Nc                <     [        S5        g! [         a     gf = fr  r  r`   s    r   r  5SuiteRequirements.no_sqlalchemy2_stubs.<locals>.check  r  r  r   r  s     r   no_sqlalchemy2_stubs&SuiteRequirements.no_sqlalchemy2_stubs  r  r   c                4    S n[         R                  " U5      $ )Nc                    SS K nSS Kn[        USUR                  5      nUR	                  S5      nU" SUR
                  U   U4S9n[        U[           S5      $ )Nr   TypeAliasTypeTV
TA_generic)type_params	__value__)typingtyping_extensionsgetattrr  TypeVarListhasattrint)ra   r  r  r  r  r  s         r   r  :SuiteRequirements.up_to_date_typealias_type.<locals>.check  s^    $#):)H)HM %B&fkk"oB5J :c?K88r   rW   r  s     r   up_to_date_typealias_type+SuiteRequirements.up_to_date_typealias_type  s    	9 !!%((r   c                2    [         R                  " S S5      $ )Nc                 "    [         R                  $ rN   )r   py38r   r   r   rU   ,SuiteRequirements.python38.<locals>.<lambda>#      DIIr   zPython 3.8 or above requiredrW   r   s    r   python38SuiteRequirements.python38       !!=
 	
r   c                2    [         R                  " S S5      $ )Nc                 "    [         R                  $ rN   )r   py39r   r   r   rU   ,SuiteRequirements.python39.<locals>.<lambda>)  r  r   zPython 3.9 or above requiredrW   r   s    r   python39SuiteRequirements.python39&  r	  r   c                2    [         R                  " S S5      $ )Nc                 "    [         R                  $ rN   )r   py310r   r   r   rU   -SuiteRequirements.python310.<locals>.<lambda>/      DJJr   zPython 3.10 or above requiredrW   r   s    r   	python310SuiteRequirements.python310,      !! ?
 	
r   c                2    [         R                  " S S5      $ )Nc                 "    [         R                  $ rN   )r   py311r   r   r   rU   -SuiteRequirements.python311.<locals>.<lambda>5  r  r   zPython 3.11 or above requiredrW   r   s    r   	python311SuiteRequirements.python3112  r  r   c                2    [         R                  " S S5      $ )Nc                 "    [         R                  $ rN   )r   py312r   r   r   rU   -SuiteRequirements.python312.<locals>.<lambda>;  r  r   zPython 3.12 or above requiredrW   r   s    r   	python312SuiteRequirements.python3128  r  r   c                2    [         R                  " S S5      $ )Nc                 6    [         R                  R                  $ rN   )r   compatpy314b1r   r   r   rU   4SuiteRequirements.fail_python314b1.<locals>.<lambda>A  s    DKK''r   zFails as of python 3.14.0b1r   r   s    r   fail_python314b1"SuiteRequirements.fail_python314b1>  s    ""')F
 	
r   c                2    [         R                  " S S5      $ )zThis requirement is interim to assist with backporting of
issue #12405.

SQLAlchemy 2.0 still includes the ``await_fallback()`` method that
makes use of ``asyncio.get_event_loop_policy()``.  This is removed
in SQLAlchemy 2.1.

c                 "    [         R                  $ rN   )r   py314r   r   r   rU   1SuiteRequirements.not_python314.<locals>.<lambda>O  r  r   z"Python 3.14 or above not supportedr   r   s    r   not_python314SuiteRequirements.not_python314D  s     !! D
 	
r   c                2    [         R                  " S S5      $ )Nc                 "    [         R                  $ rN   )r   cpythonr   r   r   rU   +SuiteRequirements.cpython.<locals>.<lambda>U  s    DLLr   zcPython interpreter neededrW   r   s    r   r3  SuiteRequirements.cpythonR  s    !! ">
 	
r   c                2    [         R                  " S S5      $ )Nc                 "    [         R                  $ rN   )r   is64bitr   r   r   rU   +SuiteRequirements.is64bit.<locals>.<lambda>Z  s    $,,r   z64bit requiredrW   r   s    r   r8  SuiteRequirements.is64bitX  s    !!"68HIIr   c                6    S n[         R                  " US5      $ )Nc                 <     [        S5        g! [         a     gf = f)NpatchTFr  r   r   r   	check_lib2SuiteRequirements.patch_library.<locals>.check_lib^  s(    7#   r  zpatch library neededrW   )r    r>  s     r   patch_librarySuiteRequirements.patch_library\  s    	 !!)-CDDr   c                    U R                   $ )ztarget platform must remove all cycles unconditionally when
gc.collect() is called, as well as clean out unreferenced subclasses.

)r3  r   s    r   predictable_gc SuiteRequirements.predictable_gch  s     ||r   c                2    [         R                  " S S5      $ )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                .    U R                   R                  $ rN   r  r`   s    r   rU   /SuiteRequirements.no_coverage.<locals>.<lambda>y  r  r   z(Issues observed when coverage is enabledr   r   s    r   no_coverageSuiteRequirements.no_coveragep  s     !!66
 	
r   c                    gNFr   r  s     r   _has_mysql_on_windows'SuiteRequirements._has_mysql_on_windows}      r   c                    grK  r   r  s     r   _has_mysql_fully_case_sensitive1SuiteRequirements._has_mysql_fully_case_sensitive  rN  r   c                8   ^  [         R                  " U 4S j5      $ )Nc                 .   > T R                  5       (       + $ rN   )_has_sqliter   s   r   rU   *SuiteRequirements.sqlite.<locals>.<lambda>  s    d.>.>.@*@r   r   r   s   `r   sqliteSuiteRequirements.sqlite  s    !!"@AAr   c                2    [         R                  " S S5      $ )Nc                 6    [         R                  " 5       (       + $ rN   )r   has_compiled_extr   r   r   rU   /SuiteRequirements.cextensions.<locals>.<lambda>  s    --//r   zCython extensions not installedr   r   s    r   cextensionsSuiteRequirements.cextensions  s    !!/-
 	
r   c                B    SSK Jn   U" S5        g! [         a     gf = f)Nr   r
   z	sqlite://TF)
sqlalchemyr   r  )r    r   s     r   rT  SuiteRequirements._has_sqlite  s'    ,	+& 		s    
c                ,    [         R                  " 5       $ )z@dialect makes use of await_() to invoke operations on the DBAPI.r(   r   s    r   async_dialectSuiteRequirements.async_dialect  r,   r   c                    U R                   $ rN   )greenletr   s    r   r   SuiteRequirements.asyncio  s    }}r   c                4    S n[         R                  " U5      $ )Nc                .     SS K ng! [         a     gf = f)Nr   FT)re  r  ra   re  s     r   rb   )SuiteRequirements.no_greenlet.<locals>.go  s#       s    
rW   rd   s     r   no_greenletSuiteRequirements.no_greenlet  s    	 !!"%%r   c                4    S n[         R                  " U5      $ )Nc                Z    [         R                  (       d  g SS Kng! [         a     gf = f)NFr   T)_test_asyncioENABLE_ASYNCIOre  r  ri  s     r   rb   &SuiteRequirements.greenlet.<locals>.go  s/     //   s    
**rW   rd   s     r   re  SuiteRequirements.greenlet  s    		 !!"%%r   c                ,    [         R                  " 5       $ )zSupports computed columnsr(   r   s    r   computed_columns"SuiteRequirements.computed_columns  r   r   c                ,    [         R                  " 5       $ )z/Supports computed columns with `persisted=True`r(   r   s    r   computed_columns_stored)SuiteRequirements.computed_columns_stored  r   r   c                ,    [         R                  " 5       $ )z0Supports computed columns with `persisted=False`r(   r   s    r   computed_columns_virtual*SuiteRequirements.computed_columns_virtual  r   r   c                ,    [         R                  " 5       $ )zKIf the default persistence is virtual or stored when `persisted`
is omittedr(   r   s    r   "computed_columns_default_persisted4SuiteRequirements.computed_columns_default_persisted  r,   r   c                ,    [         R                  " 5       $ )zLIf persistence information is returned by the reflection of
computed columnsr(   r   s    r   "computed_columns_reflect_persisted4SuiteRequirements.computed_columns_reflect_persisted  r,   r   c                ,    [         R                  " 5       $ )z1If a backend supports the DISTINCT ON in a selectr(   r   s    r   supports_distinct_on&SuiteRequirements.supports_distinct_on  r   r   c                2    [         R                  " S S5      $ )zSupports 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                L    U R                   R                  R                  (       + $ rN   )r^   r   supports_is_distinct_fromr`   s    r   rU   =SuiteRequirements.supports_is_distinct_from.<locals>.<lambda>  s    vyy00JJJr   z4driver doesn't support an IS DISTINCT FROM constructr   r   s    r   r  +SuiteRequirements.supports_is_distinct_from  s     !!JB
 	
r   c                ,    [         R                  " 5       $ )zCIf a backend supports GENERATED { ALWAYS | BY DEFAULT }
AS IDENTITYr(   r   s    r   identity_columns"SuiteRequirements.identity_columns  r,   r   c                ,    [         R                  " 5       $ )z}If a backend supports GENERATED { ALWAYS | BY DEFAULT }
AS IDENTITY with a standard syntax.
This is mainly to exclude MSSql.
r(   r   s    r   identity_columns_standard+SuiteRequirements.identity_columns_standard  r   r   c                ,    [         R                  " 5       $ )z+backend supports the regexp_match operator.r(   r   s    r   regexp_matchSuiteRequirements.regexp_match  r   r   c                ,    [         R                  " 5       $ )z-backend supports the regexp_replace operator.r(   r   s    r   regexp_replace SuiteRequirements.regexp_replace  r   r   c                ,    [         R                  " 5       $ )z(backend supports the fetch first clause.r(   r   s    r   fetch_firstSuiteRequirements.fetch_first  r   r   c                ,    [         R                  " 5       $ )z5backend supports the fetch first clause with percent.r(   r   s    r   fetch_percentSuiteRequirements.fetch_percent	  r   r   c                ,    [         R                  " 5       $ )z2backend supports the fetch first clause with ties.r(   r   s    r   
fetch_tiesSuiteRequirements.fetch_ties  r   r   c                ,    [         R                  " 5       $ )z1backend supports the fetch first without order byr(   r   s    r   fetch_no_order_by#SuiteRequirements.fetch_no_order_by  r   r   c                ,    [         R                  " 5       $ )zgbackend supports the offset when using fetch first with percent
or ties. basically this is "not mssql"
r(   r   s    r   fetch_offset_with_options+SuiteRequirements.fetch_offset_with_options  r9   r   c                ,    [         R                  " 5       $ )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   s    r   fetch_expression"SuiteRequirements.fetch_expression  r   r   c                ,    [         R                  " 5       $ )zoIf autoincrement=True on a column does not require an explicit
sequence. This should be false only for oracle.
r   r   s    r   autoincrement_without_sequence0SuiteRequirements.autoincrement_without_sequence(  rI   r   c                ,    [         R                  " 5       $ )z=If X[Y] can be implemented with ``__class_getitem__``. py3.7+r   r   s    r   generic_classes!SuiteRequirements.generic_classes/  r\  r   c                ,    [         R                  " 5       $ )z@indicates if the json_deserializer function is called with bytesr(   r   s    r   json_deserializer_binary*SuiteRequirements.json_deserializer_binary4  r   r   c                ,    [         R                  " 5       $ )z6Target database must support reflecting table_options.r(   r   s    r   reflect_table_options'SuiteRequirements.reflect_table_options9  r   r   c                ,    [         R                  " 5       $ )z0Target database must support MATERIALIZED VIEWs.r(   r   s    r   materialized_views$SuiteRequirements.materialized_views>  r   r   c                ,    [         R                  " 5       $ )z/Target database reflect MATERIALIZED VIEWs pks.r(   r   s    r   materialized_views_reflect_pk/SuiteRequirements.materialized_views_reflect_pkC  r   r   c                ,    [         R                  " 5       $ )z#Target database supports bitwise orr(   r   s    r   supports_bitwise_or%SuiteRequirements.supports_bitwise_orH  r   r   c                ,    [         R                  " 5       $ )z$Target database supports bitwise andr(   r   s    r   supports_bitwise_and&SuiteRequirements.supports_bitwise_andM  r   r   c                ,    [         R                  " 5       $ )z$Target database supports bitwise notr(   r   s    r   supports_bitwise_not&SuiteRequirements.supports_bitwise_notR  r   r   c                ,    [         R                  " 5       $ )z$Target database supports bitwise xorr(   r   s    r   supports_bitwise_xor&SuiteRequirements.supports_bitwise_xorW  r   r   c                ,    [         R                  " 5       $ )z4Target database supports bitwise left or right shiftr(   r   s    r   supports_bitwise_shift(SuiteRequirements.supports_bitwise_shift\  r   r   c                ,    [         R                  " 5       $ )zFTarget backend supports custom ESCAPE characters
with LIKE comparisonsr   r   s    r   like_escapesSuiteRequirements.like_escapesa  r#   r   r   N)r   r   r   r   propertyr!   r%   r*   r.   r1   r4   r7   r;   r>   rA   rD   rG   rK   rO   rY   re   rh   rk   rn   rq   rt   rw   rz   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/  r3  r9  r?  rC  rG  rO  rT  rW  rZ  r^  ra  rd  rg  rk  rn  rq  rt  rw  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.  r1  r4  r7  r:  r=  r@  rC  rF  rI  rL  rO  rR  rU  rX  r[  r^  ra  rd  rg  rj  rm  rp  rs  rv  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/  r3  r8  r@  rC  rH  rL  rP  rV  r\  rT  rb  r   rk  re  rt  rw  rz  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   %   s   ! !
 ! !
 # #
 # #
 # #
 ! !
 # # # #
 # #
 # # ! !& ! ! # #
 # # 
 
 & & ! !
 ! !
 ! !
 ! !
 ! ! ! !
 ! ! ! ! ! ! 	! 	! ! ! # #
 ! !
 # #
 ! ! ! ! # # # # # # # #
 # # # # ! ! 
! 
! 	! 	! 
 
 
 
 
 
 	
 	
 " " ! !
 
 
 
 
 
 
 
 
 
 
 # #   ! ! 
 
 
 
 ! ! ! ! 	# 	# # # # # # #
 J J # #
 	# 	# # # # # 
 
 
 
 7 7 

 

 

 

 
 
 # # ! ! # # # # # # # #
    
   # #
 ! ! ! ! # # # # # # # # # # ! ! * * # # # # ! ! # # ! ! # # ! ! ! !
 # #
 # # # #
 ! ! # # # # ! ! ! !
 ! ! ! ! # # ! ! # # # # ! ! # # # # ! ! ! ! ! ! ! ! # # + + # # ! ! ! ! # # ! ! ! ! ! ! ! !" # # # #$L & &( & &$ # # # #
   ! ! # # ! !
 # #
 ! !
 # # ? ? # #
 # # ! !$ ! ! ! ! ! ! # # # #
 # # ! ! ! ! ! ! ! ! ! !
 ! ! ! ! ! ! ! ! ! ! # #
 # #
 # # # # ! !" # #
 	# 	# ! ! # #  ) )$ ! ! ! ! ! ! ! ! ! ! 

 

 > >
 5 5
 > > 5 5
 
 
 	) 	) 	) 	) ) )( 
 

 
 

 
 

 
 

 
 

 
 

 
 
 
 

 J J 	E 	E   

 

 B B 
 
 # #
   	& 	& & & # # # # # # # #
 # #
 # # 
 
 # #
 # # # # # # # # # # # # # # # # # # ! ! ! ! # # # # # # # # # # # # # # # # # # ! !r   r   )__doc__
__future__r   r  r  r  r   ro  r   r   r   r   r_   r   r   r   r   r   r   <module>r     s?    # 	  &     	 	@! @!r   