
    -hW                         S 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\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.

    N   )asyncio)
exclusionsonly_on   )util)	QueuePoolc                       \ rS rSrSrg)Requirements    N)__name__
__module____qualname____firstlineno____static_attributes__r       tC:\Users\ROHAN GUPTA\OneDrive\Desktop\mathbuddy-assessment\venv\Lib\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       rxSv 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       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       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       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       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_exists-          ""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_exists3   r)   r   c                 ,    [         R                  " 5       $ )z*Target database must support foreign keys.r   r   s    r   foreign_keysSuiteRequirements.foreign_keys9   r    r   c                 ,    [         R                  " 5       $ )zDatabase / dialect supports a query like::

     SELECT * FROM VALUES ( (c1, c2), (c1, c2), ...)
     AS some_table(col1, col2)

SQLAlchemy generates this with the :func:`_sql.values` function.

r%   r   s    r   table_value_constructor)SuiteRequirements.table_value_constructor?          ""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_cascadef   r)   r   c                 ,    [         R                  " 5       $ Nr%   r   s    r   deferrable_fks SuiteRequirements.deferrable_fksl         ""r   c                 8   ^  [         R                  " U 4S j5      $ )Nc                  j   > T R                   R                  =(       d    T R                  R                  $ r?   )r8   enabledr@   r   s   r   <lambda>?SuiteRequirements.on_update_or_deferrable_fks.<locals>.<lambda>v   s*    D**22 +""**+r   r   only_ifr   s   `r   on_update_or_deferrable_fks-SuiteRequirements.on_update_or_deferrable_fksp   s    
 !!+
 	
r   c                 4    S n[         R                  " U5      $ )z"target database is using QueuePoolc                 J    [        U R                  R                  [        5      $ r?   )
isinstancedbpoolr
   configs    r   go(SuiteRequirements.queue_pool.<locals>.go~   s    fiinni88r   rH   r   rS   s     r   
queue_poolSuiteRequirements.queue_poolz   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   rm   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       
   ""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   rm   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_delete         ""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  r   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_insert%  r:   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_commit,  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_expression9  rx   r   c                 2    [         R                  " S S5      $ )Nc                 L    U R                   R                  R                  (       + $ r?   )rO   dialectsupports_sane_rowcountrQ   s    r   rF   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                  (       + $ r?   )rO   r   supports_sane_multi_rowcountrQ   s    r   rF   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                  (       + $ r?   )rO   r    supports_sane_rowcount_returningrQ   s    r   rF   =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                  $ r?   )rO   r   supports_empty_insertsupports_default_valuessupports_default_metavaluerQ   s    r   rF   1SuiteRequirements.empty_inserts.<locals>.<lambda>b  sI    699,,BB <yy  88<yy  ;;<r   zempty inserts not supportedrH   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_executemanyh  s    
 !!!r   c                 ,    [         R                  " 5       $ )z.target platform supports INSERT from a SELECT.r   r   s    r   insert_from_select$SuiteRequirements.insert_from_selecto  r    r   c                 2    [         R                  " S S5      $ )zRtarget platform supports RETURNING completely, including
multiple rows returned.

c                 B    U R                   R                  R                  $ r?   )rO   r   full_returningrQ   s    r   rF   2SuiteRequirements.full_returning.<locals>.<lambda>}  s    699,,;;r   z:%(database)s %(does_support)s 'RETURNING of multiple rows'rH   r   s    r   r    SuiteRequirements.full_returningu  s     !!;H
 	
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                  $ r?   )rO   r   insert_executemany_returningrQ   s    r   rF   @SuiteRequirements.insert_executemany_returning.<locals>.<lambda>  s    699,,IIr   zR%(database)s %(does_support)s 'RETURNING of multiple rows with INSERT executemany'rH   r   s    r   r   .SuiteRequirements.insert_executemany_returning  s     !!I5
 	
r   c                 2    [         R                  " S S5      $ )zrtarget platform supports RETURNING for at least one row.

.. seealso::

    :attr:`.Requirements.full_returning`

c                 B    U R                   R                  R                  $ r?   )rO   r   implicit_returningrQ   s    r   rF   -SuiteRequirements.returning.<locals>.<lambda>  s    699,,??r   z9%(database)s %(does_support)s 'RETURNING of a single row'rH   r   s    r   	returningSuiteRequirements.returning  s     !!?G
 	
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  r:   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                  (       + $ r?   )rO   r   requires_name_normalizerQ   s    r   rF   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                  (       + $ r?   )rO   r   supports_multivalues_insertrQ   s    r   rF   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  rm   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  r3   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                  $ r?   )rO   r   supports_schemasrQ   s    r   rF   +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 refleciton 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  r3   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_switch  r   r   c                 4    [         R                  " S /S5      $ )z0Target dialect must support server side cursors.c                 B    U R                   R                  R                  $ r?   )rO   r   supports_server_side_cursorsrQ   s    r   rF   7SuiteRequirements.server_side_cursors.<locals>.<lambda>   s    FII--JJr   zno server side cursors supportrH   r   s    r   server_side_cursors%SuiteRequirements.server_side_cursors  s      !!JK,
 	
r   c                 4    [         R                  " S /S5      $ )z'Target database must support SEQUENCEs.c                 B    U R                   R                  R                  $ r?   )rO   r   supports_sequencesrQ   s    r   rF   -SuiteRequirements.sequences.<locals>.<lambda>)  s    FII--@@r   zno sequence supportrH   r   s    r   	sequencesSuiteRequirements.sequences$  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                  $ r?   )rO   r   r  sequences_optionalrQ   s    r   rF   6SuiteRequirements.sequences_optional.<locals>.<lambda>;  s1    vyy00CC  9II%%88 9r   z.no sequence support, or sequences not optionalrH   r   s    r   r)  $SuiteRequirements.sequences_optional4  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                  $ r?   rO   r   postfetch_lastrowidrQ   s    r   rF   6SuiteRequirements.supports_lastrowid.<locals>.<lambda>K  s    FII--AAr   rH   r   s    r   supports_lastrowid$SuiteRequirements.supports_lastrowidA  s     !!AB
 	
r   c                 2    [         R                  " S /5      $ )z"the opposite of supports_lastrowidc                 L    U R                   R                  R                  (       + $ r?   r.  rQ   s    r   rF   8SuiteRequirements.no_lastrowid_support.<locals>.<lambda>R  s    		 1 1 E EEr   rH   r   s    r   no_lastrowid_support&SuiteRequirements.no_lastrowid_supportN  s     !!EF
 	
r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   reflects_pk_names#SuiteRequirements.reflects_pk_namesU  rB   r   c                 ,    [         R                  " 5       $ )z8target database has general support for table reflectionr   r   s    r   table_reflection"SuiteRequirements.table_reflectionY         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^  r   r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   comment_reflection$SuiteRequirements.comment_reflectione  rB   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_reflectioni  s     zzr   c                     U R                   $ )zKtarget database must support inspection of the full CREATE VIEW
definition.rF  r   s    r   view_reflection!SuiteRequirements.view_reflections  s     zzr   c                     U R                   $ r?   )r  r   s    r   schema_reflection#SuiteRequirements.schema_reflectiony  s    ||r   c                 ,    [         R                  " 5       $ r?   r   r   s    r   !primary_key_constraint_reflection3SuiteRequirements.primary_key_constraint_reflection}        r   c                 ,    [         R                  " 5       $ r?   r   r   s    r   !foreign_key_constraint_reflection3SuiteRequirements.foreign_key_constraint_reflection  rR  r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   1foreign_key_constraint_option_reflection_ondeleteCSuiteRequirements.foreign_key_constraint_option_reflection_ondelete  rB   r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   1fk_constraint_option_reflection_ondelete_restrictCSuiteRequirements.fk_constraint_option_reflection_ondelete_restrict  rB   r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   1fk_constraint_option_reflection_ondelete_noactionCSuiteRequirements.fk_constraint_option_reflection_ondelete_noaction  rB   r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   1foreign_key_constraint_option_reflection_onupdateCSuiteRequirements.foreign_key_constraint_option_reflection_onupdate  rB   r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   1fk_constraint_option_reflection_onupdate_restrictCSuiteRequirements.fk_constraint_option_reflection_onupdate_restrict  rB   r   c                 ,    [         R                  " 5       $ r?   r   r   s    r   temp_table_reflection'SuiteRequirements.temp_table_reflection  rR  r   c                     U R                   $ r?   )rf  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       $ r?   r   r   s    r   index_reflection"SuiteRequirements.index_reflection  rR  r   c                 ,    [         R                  " 5       $ r?   r%   r   s    r   index_reflects_included_columns1SuiteRequirements.index_reflects_included_columns  rB   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       $ )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       $ )z8target dialect supports reflection of unique constraintsr   r   s    r   unique_constraint_reflection.SuiteRequirements.unique_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  rm   r   c                 ,    [         R                  " 5       $ )z3Target database must support VARCHAR with no lengthr   r   s    r   unbounded_varchar#SuiteRequirements.unbounded_varchar  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_data  rt   r   c                 ,    [         R                  " 5       $ )zBTarget driver must support some degree of non-ascii symbol
names.
r%   r   s    r   unicode_ddlSuiteRequirements.unicode_ddl  r   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_quote  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.datetime  r:   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_timezone  r   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_timezone  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  rt   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  r:   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"  r   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_historic3  r   r   c                 ,    [         R                  " 5       $ )zItarget dialect supports representation of Python
datetime.date() objects.r   r   s    r   dateSuiteRequirements.date:  r:   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_datetimeA  r:   r   c                 ,    [         R                  " 5       $ r  r%   r   s    r   date_historicSuiteRequirements.date_historicH  r   r   c                 ,    [         R                  " 5       $ )zItarget dialect supports representation of Python
datetime.time() objects.r   r   s    r   timeSuiteRequirements.timeO  r:   r   c                 ,    [         R                  " 5       $ )zZtarget dialect supports representation of Python
datetime.time() with microsecond objects.r   r   s    r   time_microseconds#SuiteRequirements.time_microsecondsV  r:   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]  rm   r   c                 ,    [         R                  " 5       $ )ztarget backend supports simple binary literals, e.g. an
expression like::

    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_literalse         r   c                 ,    [         R                  " 5       $ )z:target dialect supports 'AUTOCOMMIT' as an isolation_levelr%   r   s    r   
autocommitSuiteRequirements.autocommitu  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_levelz  r  r   c                     g)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"
        ]
    }
Nr   r   rR   s     r   get_isolation_levels&SuiteRequirements.get_isolation_levels  s    r   c                 ,    [         R                  " 5       $ )z.target platform implements a native JSON type.r%   r   s    r   	json_typeSuiteRequirements.json_type  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       $ r?   r   r   s    r   (json_index_supplementary_unicode_element:SuiteRequirements.json_index_supplementary_unicode_element  rR  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_extract  r  r   c                 ,    [         R                  " 5       $ )zJtarget backend has general support for moderately high-precision
numerics.r   r   s    r   precision_numerics_general,SuiteRequirements.precision_numerics_general  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_small  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       $ )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       $ )zXtarget database can select an aggregate from a subquery that's
also using an aggregate

r   r   s    r   nested_aggregates#SuiteRequirements.nested_aggregates  rm   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  rm   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       $ )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  rm   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$  rt   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-         r   c                 ,    [         R                  " 5       $ )zMTarget database must support an unbounded Text() "
"type such as TEXT or CLOBr   r   s    r   	text_typeSuiteRequirements.text_type7  r:   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>  rm   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_textF  r:   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_textM  r:   r   c                 ,    [         R                  " 5       $ )z;target driver must support the literal statement 'select 1'r   r   s    r   	selectoneSuiteRequirements.selectoneT  r>  r   c                 ,    [         R                  " 5       $ )z(Target database must support savepoints.r%   r   s    r   
savepointsSuiteRequirements.savepointsY  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_frome  r   r   c                 ,    [         R                  " 5       $ )z=Target must support DELETE FROM..FROM or DELETE..USING syntaxr%   r   s    r   delete_fromSuiteRequirements.delete_fromj  r   r   c                 ,    [         R                  " 5       $ )ab  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::

    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_subqueryo  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_names  r3   r   c                 ,    [         R                  " 5       $ )ztarget database supports ordering by a column from a SELECT
inside of a UNION

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

r   r   s    r   order_by_col_from_union)SuiteRequirements.order_by_col_from_union  r
  r   c                 ,    [         R                  " 5       $ )ztarget backend supports ORDER BY a column label within an
expression.

Basically this::

    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_collationNotImplementedError)rR   r   s    r   check3SuiteRequirements.order_by_collation.<locals>.check  s+    ++F3& s    
""r   r   r9  s   ` r   order_by_collation$SuiteRequirements.order_by_collation  s    	 !!%((r   c                     [        5       er?   )r8  r  s     r   r7  (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  r:   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  rm   r   c                 ,    [         R                  " 5       $ )zE
Target must support simultaneous, independent database connections.
r   r   s    r   independent_connections)SuiteRequirements.independent_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                  $ r?   )optionslow_connectionsrQ   s    r   rF   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      $ r?   )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   rF   7SuiteRequirements._running_on_windows.<locals>.<lambda>  s    HOO%2r   zrunning on Windows)description)r   LambdaPredicater   s    r   rT  %SuiteRequirements._running_on_windows  s    ))2,
 	
r   c                 .    [         R                  " S5      $ )Ntiming_intensiver   requires_tagr   s    r   ra  "SuiteRequirements.timing_intensive      &&'9::r   c                 .    [         R                  " S5      $ )Nmemory_intensiverb  r   s    r   rg  "SuiteRequirements.memory_intensive  re  r   c                 2    [         R                  " S S5      $ )zzMark tests that use threading and mock at the same time - stability
issues have been observed with coverage + python 3.3

c                 \    [         R                  =(       a    U R                  R                  $ r?   )r	   py3krN  has_coveragerQ   s    r   rF   7SuiteRequirements.threading_with_mock.<locals>.<lambda>  s    499D)D)DDr   z%Stability issues with coverage + py3kr   r   s    r   threading_with_mock%SuiteRequirements.threading_with_mock  s     !!D3
 	
r   c                 4    S n[         R                  " U5      $ )Nc                 <     [        S5        g! [         a     gf = f)Nzsqlalchemy-stubs.ext.mypyTF
__import__ImportErrorrQ   s    r   r9  2SuiteRequirements.sqlalchemy2_stubs.<locals>.check  s)    67       
rH   r;  s     r   sqlalchemy2_stubs#SuiteRequirements.sqlalchemy2_stubs  s    	 !!%((r   c                 2    [         R                  " S S5      $ )Nc                  (    [         R                  S:  $ N)   sysversion_infor   r   r   rF   +SuiteRequirements.python2.<locals>.<lambda>  s    C$$,r   z Python version 2.xx is required.r   r   s    r   python2SuiteRequirements.python2	  s    !!,.
 	
r   c                 2    [         R                  " S S5      $ )Nc                  (    [         R                  S:  $ r{  r}  r   r   r   rF   +SuiteRequirements.python3.<locals>.<lambda>  s    C$$t+r   z Python version 3.xx is required.r   r   s    r   python3SuiteRequirements.python3  s    !!+-O
 	
r   c                     U R                   $ r?   )python36r   s    r   pep520SuiteRequirements.pep520      }}r   c                     U R                   $ r?   python37r   s    r   insert_order_dicts$SuiteRequirements.insert_order_dicts  r  r   c                 2    [         R                  " S S5      $ )Nc                  (    [         R                  S:  $ )N)r|     r}  r   r   r   rF   ,SuiteRequirements.python36.<locals>.<lambda>!      C$$v-r   z*Python version 3.6 or greater is required.r   r   s    r   r  SuiteRequirements.python36      !!-8
 	
r   c                 2    [         R                  " S S5      $ )Nc                  (    [         R                  S:  $ )N)r|     r}  r   r   r   rF   ,SuiteRequirements.python37.<locals>.<lambda>(  r  r   z*Python version 3.7 or greater is required.r   r   s    r   r  SuiteRequirements.python37%  r  r   c                     U R                   $ r?   r  r   s    r   dataclassesSuiteRequirements.dataclasses,  r  r   c                 2    [         R                  " S S5      $ )Nc                  "    [         R                  $ r?   )r	   py38r   r   r   rF   ,SuiteRequirements.python38.<locals>.<lambda>3  s    DIIr   zPython 3.8 or above requiredrH   r   s    r   python38SuiteRequirements.python380  s    !!=
 	
r   c                 2    [         R                  " S S5      $ )Nc                  "    [         R                  $ r?   )r	   cpythonr   r   r   rF   +SuiteRequirements.cpython.<locals>.<lambda>9  s    DLLr   zcPython interpreter neededrH   r   s    r   r  SuiteRequirements.cpython6  s    !! ">
 	
r   c                 2    [         R                  " S S5      $ )Nc                  "    [         R                  $ r?   )r	   is64bitr   r   r   rF   +SuiteRequirements.is64bit.<locals>.<lambda>>  s    $,,r   z64bit requiredrH   r   s    r   r  SuiteRequirements.is64bit<  s    !!"68HIIr   c                 6    S n[         R                  " US5      $ )Nc                  <     [        S5        g! [         a     gf = f)NpatchTFrr  r   r   r   	check_lib2SuiteRequirements.patch_library.<locals>.check_libB  s(    7#   rv  zpatch library neededrH   )r   r  s     r   patch_librarySuiteRequirements.patch_library@  s    	 !!)-CDDr   c                 F   ^ SSK Jm  [        R                  " U4S jS5      $ )Nr   picklec                     > [         R                  =(       a    T R                  S:H  =(       d    [        R                  S:  $ )NcPickle)r|  r   )r	   r  r   r~  r  r  s   r   rF   5SuiteRequirements.non_broken_pickle.<locals>.<lambda>Q  s2    DLL -9,*6)*r   z.Needs cPickle+cPython or newer Python 3 pickle)sqlalchemy.utilr  r   rI   )r   r  s    @r   non_broken_pickle#SuiteRequirements.non_broken_pickleL  s#    *!!* =	
 	
r   c                     U R                   $ )ztarget platform must remove all cycles unconditionally when
gc.collect() is called, as well as clean out unreferenced subclasses.

)r  r   s    r   predictable_gc SuiteRequirements.predictable_gcW  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                  $ r?   )rN  rl  rQ   s    r   rF   /SuiteRequirements.no_coverage.<locals>.<lambda>h  s    6>>66r   z(Issues observed when coverage is enabledr   r   s    r   no_coverageSuiteRequirements.no_coverage_  s     !!66
 	
r   c                     gNFr   r  s     r   _has_mysql_on_windows'SuiteRequirements._has_mysql_on_windowsl      r   c                     gr  r   r  s     r   _has_mysql_fully_case_sensitive1SuiteRequirements._has_mysql_fully_case_sensitiveo  r  r   c                 8   ^  [         R                  " U 4S j5      $ )Nc                  .   > T R                  5       (       + $ r?   )_has_sqliter   s   r   rF   *SuiteRequirements.sqlite.<locals>.<lambda>t  s    d.>.>.@*@r   r   r   s   `r   sqliteSuiteRequirements.sqliter  s    !!"@AAr   c                 2    [         R                  " S S5      $ )Nc                  6    [         R                  " 5       (       + $ r?   )r	   has_compiled_extr   r   r   rF   /SuiteRequirements.cextensions.<locals>.<lambda>y  s    --//r   zC extensions not installedr   r   s    r   cextensionsSuiteRequirements.cextensionsv  s    !!/1M
 	
r   c                 B    SSK Jn   U" S5        g! [         a     gf = f)Nr   )create_enginez	sqlite://TF)
sqlalchemyr  rt  )r   r  s     r   r  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                   $ r?   )greenletr   s    r   r   SuiteRequirements.asyncio  r  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_ASYNCIOr  rt  )rR   r  s     r   rS   &SuiteRequirements.greenlet.<locals>.go  s/     //   s    
**rH   rU   s     r   r  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                  (       + $ r?   )rO   r   supports_is_distinct_fromrQ   s    r   rF   =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  r   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
  r:   r   c                 0    [         R                  " S 5      $ )z=If X[Y] can be implemented with ``__class_getitem__``. py3.7+c                  "    [         R                  $ r?   )r	   py37r   r   r   rF   3SuiteRequirements.generic_classes.<locals>.<lambda>  s    $))r   rH   r   s    r   generic_classes!SuiteRequirements.generic_classes  s     !!"344r   r   N)r   r   r   r   propertyr   r"   r'   r+   r.   r1   r5   r8   r<   r@   rJ   rV   rY   r\   r_   rb   re   rh   rk   ro   rr   rv   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)  r1  r6  r9  r<  r@  rC  rG  rJ  rM  rP  rT  rW  rZ  r]  r`  rc  rf  ri  rl  ro  rr  ru  rx  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  r3  r<  r7  rA  rD  rG  rJ  rQ  rU  rT  ra  rg  rn  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       s   ! !
 ! !
 # #
 # #
 ! !
 	# 	# ! !& ! ! # #
 # # 
 
 & & ! !
 ! !
 ! !
 ! !
 ! ! ! !
 ! ! ! ! ! ! 	! 	! ! ! # #
 ! !
 # #
 # # ! ! # # # # # # # #
 # # # # ! ! 
! 
! 	! 	! 
 
 
 
 
 
 	
 	
 " " ! !
 	
 	
 
 
 
 
 # #   ! ! 
 
 
 
 ! ! 	# 	# # # # # # #
 J J # #
 	# 	# # # # # 
 
 
 
 7 7 

 

 

 

 
 
 # # ! ! # # # #    
   ! ! ! ! # # # # # # # # # # ! ! * * # # # # ! ! # # ! ! # # ! ! # # ! ! # # ! ! ! !
 ! ! # # ! ! # # ! ! # # # # ! ! ! ! # # + + # # ! ! ! ! # # ! ! ! ! ! ! ! ! # # # #4 # #
   ! ! # # ! !
 # #
 # #
 # # ? ? ! !( ! ! ! ! # # # #
 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! # #
 # #
 # # # # ! ! # #
 	# 	# ! ! # # ) )$ ! ! ! ! ! ! ! ! 

 

 > >
 ; ; ; ; 
 
 	) 	) 
 
 
 

     
 
 
 
   
 

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

 J J 	E 	E 
 
   

 

 B B 
 

 # #
   & & # # # # # # # #
 # #
 # # 
 
 # #
 # # # # # # # # # # # # # # # # # # ! ! 5 5r   r   )__doc__rZ  r~   r   r  r   r   r	   rP   r
   objectr   r   r   r   r   <module>r/     s;     
 &    	6 	t5 t5r   