
    ,hM                       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
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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KJr  SSKJr  \R<                  (       a`  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 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%K.J/r/  SS&K.J0r0  SS'K.J1r1  SS(K.J2r2  \" S)\S*\34   S+9r4 " S, S-\5      r5 " S. S/\5      r6 " S0 S1\Rn                  5      r8 " S2 S3\Rr                  \\55      r:\:r;  " S4 S5\:5      r< " S6 S7\:\\4   5      r= " S8 S9\=\4   5      r> " S: S;\=\4   5      r? " S< S=\>\3   5      r@ " S> S?\?\3   5      rA " S@ SA\>SB   5      rB " SC SD\?SB   5      rC " SE SF\55      rD " SG SH\55      rE " SI SJ\?SB   5      rF " SK SL\>SM   5      rG " SN SO\?SM   5      rH " SP SQ\>SR   5      rI " SS ST\?SR   5      rJ " SU SV\>SW   5      rK " SX SY\?SW   5      rL " SZ S[\=SB   5      rM " S\ S]\=SB   5      rN " S^ S_\=S`   5      rO " Sa Sb\=S`   5      rP " Sc Sd\=SW   5      rQ " Se Sf\=SW   5      rR " Sg Sh\5      rS " Si Sj\S5      rT " Sk Sl\S5      rU " Sm Sn\T5      rV " So Sp\U5      rW  Ss       StSq jjrX SuSr jrYg)vzq
Provides the hierarchy of DDL-defining schema items as well as routines
to invoke them for a create/drop call.

    )annotationsN)Any)Callable)Generic)Iterable)List)Optional)Sequence)Tuple)TypeVar)Union   )roles)_generative)
Executable)SchemaVisitor)ClauseElement   )exc)util)topological)Protocol)Self)Compiled)DDLCompiler)BindParameter)Column)
Constraint)ForeignKeyConstraint)Index)
SchemaItem)Table)TableClause)
Connection)
CacheStats)CompiledCacheType)Dialect)SchemaTranslateMapType_SIr!   )boundc                  R    \ rS rSrSrSr S rSSS.             S	S jjrSrg)
BaseDDLElement=   zThe root of DDL constructs, including those that are sub-elements
within the "create table" and other processes.

.. versionadded:: 2.0

Fc                (    UR                   " X40 UD6$ )zFReturn a compiler appropriate for this ClauseElement, given a
Dialect.)ddl_compiler)selfdialectkws      J/var/www/auris/envauris/lib/python3.13/site-packages/sqlalchemy/sql/ddl.py	_compilerBaseDDLElement._compilerH   s     ##G8R88    N)for_executemanyschema_translate_mapc                   [        5       eNNotImplementedError)r0   r1   compiled_cachecolumn_keysr7   r8   r2   s          r3   _compile_w_cacheBaseDDLElement._compile_w_cacheN   s     "##r6    )r1   r'   r=   zOptional[CompiledCacheType]r>   z	List[str]r7   boolr8   z Optional[SchemaTranslateMapType]r2   r   returnzJTuple[Compiled, Optional[typing_Sequence[BindParameter[Any]]], CacheStats])	__name__
__module____qualname____firstlineno____doc___hierarchy_supports_cachingr4   r?   __static_attributes__rA   r6   r3   r,   r,   =   sm     #(B9 !&AE$$ 4	$
 $ $ ?$ $
$ $r6   r,   c                  P    \ rS rSr  SSS.                 SS jjjrSrg)	DDLIfCallable]   N.)compilerc                   g r:   rA   )	r0   ddltargetbindtablesstater1   rN   
checkfirsts	            r3   __call__DDLIfCallable.__call__^   s     r6   rA   NN)rP   r,   rQ   Union[SchemaItem, str]rR   Optional[Connection]rS   zOptional[List[Table]]rT   Optional[Any]r1   r'   rN   Optional[DDLCompiler]rU   rB   rC   rB   )rD   rE   rF   rG   rV   rJ   rA   r6   r3   rL   rL   ]   sv     )-# +. ' #	
 &   (  
 r6   rL   c                  Z    \ rS rSr% S\S'   S\S'   S\S'    S           SS	 jjrS
rg)DDLIfl   Optional[str]r1   Optional[DDLIfCallable]	callable_r[   rT   Nc                   Ub  UR                   nOUb  UR                   nO S5       e[        U R                   [        5      (       a  U R                   UR                  :w  a  gOE[        U R                   [        [
        [        45      (       a  UR                  U R                   ;  a  gU R                  b)  U R                  " UUU4U R                  UUS.UD6(       d  gg)NFzcompiler or dialect is required)rT   r1   rN   T)	r1   
isinstancestrnametuplelistsetrb   rT   )r0   rP   rQ   rR   rN   r2   r1   s          r3   _should_executeDDLIf._should_executeq   s     llG!&&G;;;5dllC((||w||+ ,udC&899||4<</>>%dnn/
 **/
 /
 r6   rA   r:   )rP   r,   rQ   rY   rR   rZ   rN   r\   r2   r   rC   rB   )rD   rE   rF   rG   __annotations__rj   rJ   rA   r6   r3   r^   r^   l   s]    && +/   '  #	 
 (    
   r6   r^   c                      \ rS rSr% SrSrS\S'   SrS\S'   S r\	SS	 j5       r
\	   S       SS
 jj5       rS rS rS rS rSrg)ExecutableDDLElement   aE  Base class for standalone executable DDL expression constructs.

This class is the base for the general purpose :class:`.DDL` class,
as well as the various create/drop clause constructs such as
:class:`.CreateTable`, :class:`.DropTable`, :class:`.AddConstraint`,
etc.

.. versionchanged:: 2.0  :class:`.ExecutableDDLElement` is renamed from
   :class:`.DDLElement`, which still exists for backwards compatibility.

:class:`.ExecutableDDLElement` integrates closely with SQLAlchemy events,
introduced in :ref:`event_toplevel`.  An instance of one is
itself an event receiving callable::

    event.listen(
        users,
        "after_create",
        AddConstraint(constraint).execute_if(dialect="postgresql"),
    )

.. seealso::

    :class:`.DDL`

    :class:`.DDLEvents`

    :ref:`event_toplevel`

    :ref:`schema_ddl_sequences`

NzOptional[DDLIf]_ddl_ifzUnion[SchemaItem, str, None]rQ   c                &    UR                  XU5      $ r:   )_execute_ddl)r0   
connectiondistilled_paramsexecution_optionss       r3   _execute_on_connection+ExecutableDDLElement._execute_on_connection   s     &&$5
 	
r6   c                    Xl         U $ )a  Return a copy of this :class:`_schema.ExecutableDDLElement` which
will include the given target.

This essentially applies the given item to the ``.target`` attribute of
the returned :class:`_schema.ExecutableDDLElement` object. This target
is then usable by event handlers and compilation routines in order to
provide services such as tokenization of a DDL string in terms of a
particular :class:`_schema.Table`.

When a :class:`_schema.ExecutableDDLElement` object is established as
an event handler for the :meth:`_events.DDLEvents.before_create` or
:meth:`_events.DDLEvents.after_create` events, and the event then
occurs for a given target such as a :class:`_schema.Constraint` or
:class:`_schema.Table`, that target is established with a copy of the
:class:`_schema.ExecutableDDLElement` object using this method, which
then proceeds to the :meth:`_schema.ExecutableDDLElement.execute`
method in order to invoke the actual DDL instruction.

:param target: a :class:`_schema.SchemaItem` that will be the subject
 of a DDL operation.

:return: a copy of this :class:`_schema.ExecutableDDLElement` with the
 ``.target`` attribute assigned to the given
 :class:`_schema.SchemaItem`.

.. seealso::

    :class:`_schema.DDL` - uses tokenization against the "target" when
    processing the DDL string.

)rQ   )r0   rQ   s     r3   againstExecutableDDLElement.against   s    B r6   c                (    [        XU5      U l        U $ )a  Return a callable that will execute this
:class:`_ddl.ExecutableDDLElement` conditionally within an event
handler.

Used to provide a wrapper for event listening::

    event.listen(
        metadata,
        "before_create",
        DDL("my_ddl").execute_if(dialect="postgresql"),
    )

:param dialect: May be a string or tuple of strings.
  If a string, it will be compared to the name of the
  executing database dialect::

    DDL("something").execute_if(dialect="postgresql")

  If a tuple, specifies multiple dialect names::

    DDL("something").execute_if(dialect=("postgresql", "mysql"))

:param callable\_: A callable, which will be invoked with
  three positional arguments as well as optional keyword
  arguments:

    :ddl:
      This DDL element.

    :target:
      The :class:`_schema.Table` or :class:`_schema.MetaData`
      object which is the
      target of this event. May be None if the DDL is executed
      explicitly.

    :bind:
      The :class:`_engine.Connection` being used for DDL execution.
      May be None if this construct is being created inline within
      a table, in which case ``compiler`` will be present.

    :tables:
      Optional keyword argument - a list of Table objects which are to
      be created/ dropped within a MetaData.create_all() or drop_all()
      method call.

    :dialect: keyword argument, but always present - the
      :class:`.Dialect` involved in the operation.

    :compiler: keyword argument.  Will be ``None`` for an engine
      level DDL invocation, but will refer to a :class:`.DDLCompiler`
      if this DDL element is being created inline within a table.

    :state:
      Optional keyword argument - will be the ``state`` argument
      passed to this function.

    :checkfirst:
     Keyword argument, will be True if the 'checkfirst' flag was
     set during the call to ``create()``, ``create_all()``,
     ``drop()``, ``drop_all()``.

  If the callable returns a True value, the DDL statement will be
  executed.

:param state: any value which will be passed to the callable\_
  as the ``state`` keyword argument.

.. seealso::

    :meth:`.SchemaItem.ddl_if`

    :class:`.DDLEvents`

    :ref:`event_toplevel`

)r^   rp   )r0   r1   rb   rT   s       r3   
execute_ifExecutableDDLElement.execute_if   s    f W7r6   c                Z    U R                   c  gU R                   R                  " XU40 UD6$ NT)rp   rj   r0   rQ   rR   r2   s       r3   rj   $ExecutableDDLElement._should_execute9  s+    <<<<//dIbIIr6   c                h    U R                  U R                  U5      (       a  UR                  U 5      $ g r:   )rj   rQ   execute)r0   rR   s     r3   _invoke_with!ExecutableDDLElement._invoke_with?  s-    T22<<%% 3r6   c                D    U R                  U5      R                  U5        g)z"Execute the DDL as a ddl_listener.N)ry   r   r   s       r3   rV   ExecutableDDLElement.__call__C  s     	V))$/r6   c                    U R                   R                  U R                   5      nU R                  R                  5       Ul        U$ r:   )	__class____new____dict__copy)r0   ss     r3   	_generateExecutableDDLElement._generateH  s3    NN""4>>2]]'')
r6   )rp   rQ   )rQ   r!   rC   r   )NNN)r1   r`   rb   ra   rT   r[   rC   r   )rD   rE   rF   rG   rH   rp   rl   rQ   rv   r   ry   r|   rj   r   rV   r   rJ   rA   r6   r3   rn   rn      s    @  $G_#+/F(/
 ! !F  "&-1#	SS +S 	S
 
S SjJ&0
r6   rn   c                  ,    \ rS rSrSrSrSS jrS rSrg)	DDLiR  a  A literal DDL statement.

Specifies literal SQL DDL to be executed by the database.  DDL objects
function as DDL event listeners, and can be subscribed to those events
listed in :class:`.DDLEvents`, using either :class:`_schema.Table` or
:class:`_schema.MetaData` objects as targets.
Basic templating support allows
a single DDL instance to handle repetitive tasks for multiple tables.

Examples::

  from sqlalchemy import event, DDL

  tbl = Table("users", metadata, Column("uid", Integer))
  event.listen(tbl, "before_create", DDL("DROP TRIGGER users_trigger"))

  spow = DDL("ALTER TABLE %(table)s SET secretpowers TRUE")
  event.listen(tbl, "after_create", spow.execute_if(dialect="somedb"))

  drop_spow = DDL("ALTER TABLE users SET secretpowers FALSE")
  connection.execute(drop_spow)

When operating on Table events, the following ``statement``
string substitutions are available:

.. sourcecode:: text

  %(table)s  - the Table name, with any required quoting applied
  %(schema)s - the schema name, with any required quoting applied
  %(fullname)s - the Table name including schema, quoted if needed

The DDL's "context", if any, will be combined with the standard
substitutions noted above.  Keys present in the context will override
the standard substitutions.

rP   Nc                    [        U[        5      (       d  [        R                  " SU-  5      eXl        U=(       d    0 U l        g)a}  Create a DDL statement.

:param statement:
  A string or unicode string to be executed.  Statements will be
  processed with Python's string formatting operator using
  a fixed set of string substitutions, as well as additional
  substitutions provided by the optional :paramref:`.DDL.context`
  parameter.

  A literal '%' in a statement must be escaped as '%%'.

  SQL bind parameters are not available in DDL statements.

:param context:
  Optional dictionary, defaults to None.  These values will be
  available for use in string substitutions on the DDL statement.

.. seealso::

    :class:`.DDLEvents`

    :ref:`event_toplevel`

z4Expected a string or unicode SQL statement, got '%r'N)rd   re   r   ArgumentError	statementcontext)r0   r   r   s      r3   __init__DDL.__init__z  sA    4 )S))##F 
 #}"r6   c                    [        U R                  5      /nU R                  (       a  UR                  SU R                   35        S[	        U 5      R
                  < S[        U 5      < SSR                  U5      < S3$ )Nzcontext=<@z; , >)reprr   r   appendtyperD   idjoin)r0   partss     r3   __repr__DDL.__repr__  s^    dnn%&<<LL8DLL>23 JtHIIe
 	
r6   )r   r   r:   )	rD   rE   rF   rG   rH   __visit_name__r   r   rJ   rA   r6   r3   r   r   R  s    #J N!%F	
r6   r   c                  8    \ rS rSrSrSS jr\S 5       rS rSr	g)	_CreateDropBasei  zBase class for DDL constructs that represent CREATE and DROP or
equivalents.

The common theme of _CreateDropBase is a single
``element`` attribute which refers to the element
to be created or dropped.

c                D    U=U l         U l        [        USS 5      U l        g )Nrp   )elementrQ   getattrrp   r0   r   s     r3   r   _CreateDropBase.__init__  s     %,,t{w	48r6   c                p    [        U R                  [        5      (       a   eU R                  R                  $ r:   )rd   r   re   create_drop_stringify_dialect)r0   s    r3   stringify_dialect!_CreateDropBase.stringify_dialect  s)    dllC0000||999r6   c                    g)zAllow disable of _create_rule using a callable.

Pass to _create_rule using
util.portable_instancemethod(self._create_rule_disable)
to retain serializability.

FrA   )r0   rN   s     r3   _create_rule_disable$_CreateDropBase._create_rule_disable  s     r6   )rp   r   rQ   N)r   r)   rC   None)
rD   rE   rF   rG   rH   r   propertyr   r   rJ   rA   r6   r3   r   r     s%    9 : :r6   r   c                  0   ^  \ rS rSrSSU 4S jjjrSrU =r$ )_CreateBasei  c                0   > [         TU ]  U5        X l        g r:   )superr   if_not_existsr0   r   r   r   s      r3   r   _CreateBase.__init__  s    !*r6   r   F)r   r)   r   rB   rC   r   rD   rE   rF   rG   r   rJ   __classcell__r   s   @r3   r   r     s    + +r6   r   c                  0   ^  \ rS rSrSSU 4S jjjrSrU =r$ )	_DropBasei  c                0   > [         TU ]  U5        X l        g r:   )r   r   	if_existsr0   r   r   r   s      r3   r   _DropBase.__init__  s    !"r6   r   r   )r   r)   r   rB   rC   r   r   r   s   @r3   r   r     s    # #r6   r   c                  H   ^  \ rS rSrSrSrSr S     SU 4S jjjrSrU =r	$ )	CreateSchemai  z[Represent a CREATE SCHEMA statement.

The argument here is the string name of the schema.

create_schemadefaultc                    > [         TU ]  XS9  g)z.Create a new :class:`.CreateSchema` construct.)r   r   Nr   r   )r0   rf   r   r   s      r3   r   CreateSchema.__init__  s     	Cr6   rA   r   )rf   re   r   rB   rC   r   
rD   rE   rF   rG   rH   r   r   r   rJ   r   r   s   @r3   r   r     sE     %N!
 $DD D 
	D Dr6   r   c                  N   ^  \ rS rSrSrSrSr  S       SU 4S jjjrSrU =r	$ )	
DropSchemai  zYRepresent a DROP SCHEMA statement.

The argument here is the string name of the schema.

drop_schemar   c                ,   > [         TU ]  XS9  X l        g)z,Create a new :class:`.DropSchema` construct.)r   r   N)r   r   cascade)r0   rf   r   r   r   s       r3   r   DropSchema.__init__  s     	;r6   r   )FF)rf   re   r   rB   r   rB   rC   r   r   r   s   @r3   r   r     sM     #N!
 			 	 		
 
	 	r6   r   c                  J   ^  \ rS rSrSrSr  S       SU 4S jjjrSrU =r$ )CreateTablei  z#Represent a CREATE TABLE statement.create_tablec                   > [         TU ]  XS9  UR                   Vs/ s H  n[        U5      PM     snU l        X l        gs  snf )a+  Create a :class:`.CreateTable` construct.

:param element: a :class:`_schema.Table` that's the subject
 of the CREATE
:param on: See the description for 'on' in :class:`.DDL`.
:param include_foreign_key_constraints: optional sequence of
 :class:`_schema.ForeignKeyConstraint` objects that will be included
 inline within the CREATE construct; if omitted, all foreign key
 constraints that do not specify use_alter=True are included.

:param if_not_exists: if True, an IF NOT EXISTS operator will be
 applied to the construct.

 .. versionadded:: 1.4.0b2

r   N)r   r   columnsCreateColumninclude_foreign_key_constraints)r0   r   r   r   columnr   s        r3   r   CreateTable.__init__  s@    0 	>;B??K?V,?K/N, Ls   A)r   r   NF)r   r"   r   z/Optional[typing_Sequence[ForeignKeyConstraint]]r   rB   rC   r   	rD   rE   rF   rG   rH   r   r   rJ   r   r   s   @r3   r   r     sI    -#N #OO*
O O 
O Or6   r   r"   c                      \ rS rSrSrSrSrg)	_DropViewi!  zSemi-public 'DROP VIEW' construct.

Used by the test suite for dialect-agnostic drops of views.
This object will eventually be part of a public "view" API.

	drop_viewrA   NrD   rE   rF   rG   rH   r   rJ   rA   r6   r3   r   r   !  s     !Nr6   r   c                  *    \ rS rSr% S\S'   SS jrSrg)CreateConstrainti,  r   r   c                    Xl         g r:   r   r   s     r3   r   CreateConstraint.__init__/      r6   r   N)r   r   rC   r   )rD   rE   rF   rG   rl   r   rJ   rA   r6   r3   r   r   ,  s    r6   r   c                  2    \ rS rSr% SrSrS\S'   S	S jrSrg)
r   i3  aX  Represent a :class:`_schema.Column`
as rendered in a CREATE TABLE statement,
via the :class:`.CreateTable` construct.

This is provided to support custom column DDL within the generation
of CREATE TABLE statements, by using the
compiler extension documented in :ref:`sqlalchemy.ext.compiler_toplevel`
to extend :class:`.CreateColumn`.

Typical integration is to examine the incoming :class:`_schema.Column`
object, and to redirect compilation if a particular flag or condition
is found::

    from sqlalchemy import schema
    from sqlalchemy.ext.compiler import compiles


    @compiles(schema.CreateColumn)
    def compile(element, compiler, **kw):
        column = element.element

        if "special" not in column.info:
            return compiler.visit_create_column(element, **kw)

        text = "%s SPECIAL DIRECTIVE %s" % (
            column.name,
            compiler.type_compiler.process(column.type),
        )
        default = compiler.get_column_default_string(column)
        if default is not None:
            text += " DEFAULT " + default

        if not column.nullable:
            text += " NOT NULL"

        if column.constraints:
            text += " ".join(
                compiler.process(const) for const in column.constraints
            )
        return text

The above construct can be applied to a :class:`_schema.Table`
as follows::

    from sqlalchemy import Table, Metadata, Column, Integer, String
    from sqlalchemy import schema

    metadata = MetaData()

    table = Table(
        "mytable",
        MetaData(),
        Column("x", Integer, info={"special": True}, primary_key=True),
        Column("y", String(50)),
        Column("z", String(20), info={"special": True}),
    )

    metadata.create_all(conn)

Above, the directives we've added to the :attr:`_schema.Column.info`
collection
will be detected by our custom compilation scheme:

.. sourcecode:: sql

    CREATE TABLE mytable (
            x SPECIAL DIRECTIVE INTEGER NOT NULL,
            y VARCHAR(50),
            z SPECIAL DIRECTIVE VARCHAR(20),
        PRIMARY KEY (x)
    )

The :class:`.CreateColumn` construct can also be used to skip certain
columns when producing a ``CREATE TABLE``.  This is accomplished by
creating a compilation rule that conditionally returns ``None``.
This is essentially how to produce the same effect as using the
``system=True`` argument on :class:`_schema.Column`, which marks a column
as an implicitly-present "system" column.

For example, suppose we wish to produce a :class:`_schema.Table`
which skips
rendering of the PostgreSQL ``xmin`` column against the PostgreSQL
backend, but on other backends does render it, in anticipation of a
triggered rule.  A conditional compilation rule could skip this name only
on PostgreSQL::

    from sqlalchemy.schema import CreateColumn


    @compiles(CreateColumn, "postgresql")
    def skip_xmin(element, compiler, **kw):
        if element.element.name == "xmin":
            return None
        else:
            return compiler.visit_create_column(element, **kw)


    my_table = Table(
        "mytable",
        metadata,
        Column("id", Integer, primary_key=True),
        Column("xmin", Integer),
    )

Above, a :class:`.CreateTable` construct will generate a ``CREATE TABLE``
which only includes the ``id`` column in the string; the ``xmin`` column
will be omitted, but only against the PostgreSQL backend.

create_columnColumn[Any]r   c                    Xl         g r:   r   r   s     r3   r   CreateColumn.__init__  r   r6   r   N)r   r   rC   r   )	rD   rE   rF   rG   rH   r   rl   r   rJ   rA   r6   r3   r   r   3  s    l\ %Nr6   r   c                  8   ^  \ rS rSrSrSrSSU 4S jjjrSrU =r$ )	DropTablei  z!Represent a DROP TABLE statement.
drop_tablec                    > [         TU ]  XS9  g)a  Create a :class:`.DropTable` construct.

:param element: a :class:`_schema.Table` that's the subject
 of the DROP.
:param on: See the description for 'on' in :class:`.DDL`.
:param if_exists: if True, an IF EXISTS operator will be applied to the
 construct.

 .. versionadded:: 1.4.0b2

r   Nr   r   s      r3   r   DropTable.__init__  s     	6r6   rA   r   )r   r"   r   rB   rC   r   r   r   s   @r3   r   r     s    +!N7 7r6   r   c                      \ rS rSrSrSrSrg)CreateSequencei  z&Represent a CREATE SEQUENCE statement.create_sequencerA   Nr   rA   r6   r3   r   r     s
    0&Nr6   r   r
   c                      \ rS rSrSrSrSrg)DropSequencei  z$Represent a DROP SEQUENCE statement.drop_sequencerA   Nr   rA   r6   r3   r   r     s
    .$Nr6   r   c                  8   ^  \ rS rSrSrSrSSU 4S jjjrSrU =r$ )CreateIndexi  z#Represent a CREATE INDEX statement.create_indexc                    > [         TU ]  XS9  g)zCreate a :class:`.Createindex` construct.

:param element: a :class:`_schema.Index` that's the subject
 of the CREATE.
:param if_not_exists: if True, an IF NOT EXISTS operator will be
 applied to the construct.

 .. versionadded:: 1.4.0b2

r   Nr   r   s      r3   r   CreateIndex.__init__  s     	>r6   rA   r   )r   r    r   rB   rC   r   r   r   s   @r3   r   r     s    -#N? ?r6   r   r    c                  8   ^  \ rS rSrSrSrSSU 4S jjjrSrU =r$ )	DropIndexi  z!Represent a DROP INDEX statement.
drop_indexc                    > [         TU ]  XS9  g)zCreate a :class:`.DropIndex` construct.

:param element: a :class:`_schema.Index` that's the subject
 of the DROP.
:param if_exists: if True, an IF EXISTS operator will be applied to the
 construct.

 .. versionadded:: 1.4.0b2

r   Nr   r   s      r3   r   DropIndex.__init__  s     	6r6   rA   r   )r   r    r   rB   rC   r   r   r   s   @r3   r  r    s    +!N7 7r6   r  c                  F   ^  \ rS rSrSrSrSS.     SU 4S jjjrSrU =r$ )	AddConstrainti  z2Represent an ALTER TABLE ADD CONSTRAINT statement.add_constraintT)isolate_from_tablec               ~   > [         TU ]  U5        U(       a&  [        R                  " U R                  5      Ul        gg)a  Construct a new :class:`.AddConstraint` construct.

:param element: a :class:`.Constraint` object

:param isolate_from_table: optional boolean, defaults to True.  Has
 the effect of the incoming constraint being isolated from being
 included in a CREATE TABLE sequence when associated with a
 :class:`.Table`.

 .. versionadded:: 2.0.39 - added
    :paramref:`.AddConstraint.isolate_from_table`, defaulting
    to True.  Previously, the behavior of this parameter was implicitly
    turned on in all cases.

N)r   r   r   portable_instancemethodr   _create_rule)r0   r   r
  r   s      r3   r   AddConstraint.__init__  s6    * 	!#'#?#?))$G  r6   rA   )r   r   r
  rB   rC   r   r   r   s   @r3   r  r    s6    <%N $(	 !	
 
 r6   r  r   c                  V   ^  \ rS rSrSrSrSSSS.           S	U 4S jjjrSrU =r$ )
DropConstrainti  z3Represent an ALTER TABLE DROP CONSTRAINT statement.drop_constraintFT)r   r   r
  c                  > X l         [        TU ]  " U4SU0UD6  U(       a&  [        R                  " U R
                  5      Ul        gg)a  Construct a new :class:`.DropConstraint` construct.

:param element: a :class:`.Constraint` object
:param cascade: optional boolean, indicates backend-specific
 "CASCADE CONSTRAINT" directive should be rendered if available
:param if_exists: optional boolean, indicates backend-specific
 "IF EXISTS" directive should be rendered if available
:param isolate_from_table: optional boolean, defaults to True.  Has
 the effect of the incoming constraint being isolated from being
 included in a CREATE TABLE sequence when associated with a
 :class:`.Table`.

 .. versionadded:: 2.0.39 - added
    :paramref:`.DropConstraint.isolate_from_table`, defaulting
    to True.  Previously, the behavior of this parameter was implicitly
    turned on in all cases.

r   N)r   r   r   r   r  r   r  )r0   r   r   r   r
  r2   r   s         r3   r   DropConstraint.__init__  sE    6 <I<<#'#?#?))$G  r6   r   )r   r   r   rB   r   rB   r
  rB   r2   r   rC   r   r   r   s   @r3   r  r    sZ    =&N #'!! 	!
 ! !! ! 
! !r6   r  c                      \ rS rSrSrSrSrg)SetTableCommenti;  z*Represent a COMMENT ON TABLE IS statement.set_table_commentrA   Nr   rA   r6   r3   r  r  ;  s
    4(Nr6   r  c                      \ rS rSrSrSrSrg)DropTableCommentiA  z^Represent a COMMENT ON TABLE '' statement.

Note this varies a lot across database backends.

drop_table_commentrA   Nr   rA   r6   r3   r  r  A  s     *Nr6   r  c                      \ rS rSrSrSrSrg)SetColumnCommentiK  z+Represent a COMMENT ON COLUMN IS statement.set_column_commentrA   Nr   rA   r6   r3   r  r  K  s
    5)Nr6   r  r   c                      \ rS rSrSrSrSrg)DropColumnCommentiQ  z0Represent a COMMENT ON COLUMN IS NULL statement.drop_column_commentrA   Nr   rA   r6   r3   r  r  Q  s
    :*Nr6   r  c                      \ rS rSrSrSrSrg)SetConstraintCommentiW  z/Represent a COMMENT ON CONSTRAINT IS statement.set_constraint_commentrA   Nr   rA   r6   r3   r!  r!  W  s
    9-Nr6   r!  c                      \ rS rSrSrSrSrg)DropConstraintCommenti]  z4Represent a COMMENT ON CONSTRAINT IS NULL statement.drop_constraint_commentrA   Nr   rA   r6   r3   r$  r$  ]  s
    >.Nr6   r$  c                  >    \ rS rSrS r\R                  S 5       rSrg)InvokeDDLBaseic  c                N    Xl         U(       a   SUR                  5        35       eg )NzUnexpected keywords: )rs   keys)r0   rs   r2   s      r3   r   InvokeDDLBase.__init__d  s$    $:.rwwyk::v2r6   c                    [        5       e)\helper context manager that will apply appropriate DDL events
to a CREATE or DROP operation.r;   r0   rQ   r2   s      r3   with_ddl_eventsInvokeDDLBase.with_ddl_eventsh  s    
 "##r6   )rs   N)	rD   rE   rF   rG   r   
contextlibcontextmanagerr.  rJ   rA   r6   r3   r'  r'  c  s!    ; $ $r6   r'  c                  8    \ rS rSr\R
                  S 5       rSrg)InvokeCreateDDLBaseip  c              +     #    UR                   R                  " XR                  4SU 0UD6  Sv   UR                   R                  " XR                  4SU 0UD6  g7fr,  _ddl_runnerN)dispatchbefore_creaters   after_creater-  s      r3   r.  #InvokeCreateDDLBase.with_ddl_eventsq  s^     
 	%%OO	
15	
9;	
 	$$OO	
15	
9;	
   AArA   NrD   rE   rF   rG   r0  r1  r.  rJ   rA   r6   r3   r3  r3  p      

 

r6   r3  c                  8    \ rS rSr\R
                  S 5       rSrg)InvokeDropDDLBasei  c              +     #    UR                   R                  " XR                  4SU 0UD6  Sv   UR                   R                  " XR                  4SU 0UD6  g7fr5  )r7  before_droprs   
after_dropr-  s      r3   r.  !InvokeDropDDLBase.with_ddl_events  s^     
 	##OO	
15	
9;	
 	""OO	
15	
9;	
r;  rA   Nr<  rA   r6   r3   r?  r?    r=  r6   r?  c                  p   ^  \ rS rSr SU 4S jjrS rS rS rS r   SS jr	S r
SS	 jrSS
 jrSrU =r$ )SchemaGeneratori  c                |   > [         TU ]  " U40 UD6  X0l        X@l        UR                  U l        Xl        0 U l        g r:   r   r   rU   rS   identifier_preparerpreparerr1   memor0   r1   rs   rU   rS   kwargsr   s         r3   r   SchemaGenerator.__init__  :     	.v.$33	r6   c                ^   U R                   R                  UR                  5        U R                  R	                  U5      nU(       a  U R                   R                  U5        U R
                  (       + =(       d4    U R                   R                  U R                  UR                  US9(       + $ N)schemar1   validate_identifierrf   rs   schema_for_objectrU   	has_tabler0   tableeffective_schemas      r3   _can_create_table!SchemaGenerator._can_create_table  s    ((4??<<UCLL,,-=>??" 
$,,*@*@OOUZZ0@ +A +
 '
 	
r6   c                R   U R                   R                  UR                  5      nU(       a  U R                  R	                  U5        U R
                  (       + =(       dI    U R                  R                  U R                   UR                  R                  UR                  US9(       + $ rP  rs   rT  rW  r1   rS  rU   	has_indexrf   r0   indexrX  s      r3   _can_create_index!SchemaGenerator._can_create_index  s    ??<<U[[ILL,,-=>??" 
$,,*@*@OOKKJJ#	 +A +
 '
 	
r6   c                ~   U R                   R                  U5      nU R                  R                  =(       a    U R                  R                  (       + =(       d    UR
                  (       + =(       aL    U R                  (       + =(       d4    U R                  R                  U R                   UR                  US9(       + $ rP  	rs   rT  r1   supports_sequencessequences_optionaloptionalrU   has_sequencerf   r0   sequencerX  s      r3   _can_create_sequence$SchemaGenerator._can_create_sequence  s    ??<<XF||.. 
000I8I8I4I OO# ||00OOX]];K 1  		
r6   c           	        U R                   b  U R                   nO#[        UR                   R                  5       5      n[        U Vs/ s H  o0R	                  U5      (       d  M  UPM     sn5      nUR
                  R                  5        Vs/ s H,  nUR                  b  M  U R                  U5      (       d  M*  UPM.     nnU VVs/ s H  u  p7Uc  M
  UPM     nnnU R                  UUU R                  S9   U H  n	U R                  U	SS9  M     U H6  u  pU
b  U R                  U
SUSS9  M  U H  nU R                  U5        M     M8     S S S 5        g s  snf s  snf s  snnf ! , (       d  f       g = f)NrS   rU   T	create_ok)ro  r   _is_metadata_operation)rS   rh   valuessort_tables_and_constraintsrY  
_sequencesr   rj  r.  rU   traverse_single)r0   metadatarS   t
collectionr   seq_collfksevent_collectionseqrW  fkcsfkcs                r3   visit_metadataSchemaGenerator.visit_metadata  sj   ;;"[[F(//0023F0<1"8"8";Q<

 ((//1
1xx $($=$=a$@ 1 	 
 /9Jj(1AAjJ!!# " 

  $$SD$9    *$(("&8</3	 )   $,,S1  $  *
 
 =
 K
 
s7   E$EE"E:E	E!E!8AE''
E5c                (   U(       d  U R                  U5      (       d  g U R                  UU R                  US9   UR                   H-  nUR                  c  M  U R                  UR                  5        M/     U R                  R                  (       d  S n[        UUS9R                  U R                  5        [        US5      (       a#  UR                   H  nU R                  USS9  M     U R                  R                  (       a  U R                  R                  (       d  UR                  b$  [!        U5      R                  U R                  5        UR                   H6  nUR                  c  M  [#        U5      R                  U R                  5        M8     U R                  R$                  (       aF  UR&                   H6  nUR                  c  M  U R                  R)                  [+        U5      5        M8     S S S 5        g ! , (       d  f       g = f)NrU   rp  )r   indexesTrn  )rY  r.  rU   r   r   rt  r1   supports_alterr   r   rs   hasattrr  supports_commentsinline_commentscommentr  r  supports_constraint_commentsconstraintsr   r!  )r0   rW  ro  r   rp  r   r_  
constraints           r3   visit_tableSchemaGenerator.visit_table  s    !7!7!>!>!!#9 " 

  -->>-((8 ( <<..26/3
 l4??+ui(("]]E(($(? + ..44==,#E*77H#mmF~~1(0==dooN , <<<<&+&7&7
%--9 OO33 4Z @ '8I
 
 
s   HDH1AH(H
Hc                    U R                   R                  (       d  g U R                  U5         [        U5      R	                  U R
                  5        S S S 5        g ! , (       d  f       g = fr:   )r1   r  r.  r  r   rs   r0   r  s     r3   visit_foreign_key_constraint,SchemaGenerator.visit_foreign_key_constraint  sC    ||**!!*-*%224??C .--   %A
A*c                    U(       d  U R                  U5      (       d  g U R                  U5         [        U5      R                  U R                  5        S S S 5        g ! , (       d  f       g = fr:   )rj  r.  r   r   rs   )r0   ri  ro  s      r3   visit_sequenceSchemaGenerator.visit_sequence  sI    !:!:8!D!D!!(+8$11$//B ,++   %A
A,c                    U(       d  U R                  U5      (       d  g U R                  U5         [        U5      R                  U R                  5        S S S 5        g ! , (       d  f       g = fr:   )r`  r.  r   r   rs   )r0   r_  ro  s      r3   visit_indexSchemaGenerator.visit_index!  sI    !7!7!>!>!!%(++DOO< )((r  rU   r1   rJ  rI  rS   FN)FNFr   )rD   rE   rF   rG   r   rY  r`  rj  r~  r  r  r  r  rJ   r   r   s   @r3   rE  rE    sG    <@
	

$2R (,$2hDC= =r6   rE  c                  p   ^  \ rS rSr SU 4S jjrS rS rS rS rSS jr	   SS jr
S	 rSS
 jrSrU =r$ )SchemaDropperi(  c                |   > [         TU ]  " U40 UD6  X0l        X@l        UR                  U l        Xl        0 U l        g r:   rG  rK  s         r3   r   SchemaDropper.__init__)  rN  r6   c                z  ^  T R                   b  T R                   nO#[        UR                   R                  5       5      n U Vs/ s H  nT R                  U5      (       d  M  UPM     nn[        [	        [        UU 4S jS95      5      nUR$                  R                  5        Vs/ s H  nT R'                  U5      (       d  M  UPM     nnU VV	s/ s H  u  p9Uc  M
  UPM     n
nn	T R)                  UU
T R*                  S	9   U H6  u  pUb  T R-                  US
S
US9  M  U H  nT R-                  U5        M     M8     U H  nT R-                  XR.                  S L S9  M      S S S 5        g s  snf ! [        R                   Ga  nT R                  R                  (       dz  [        R                  " SSR                  [        UR                   Vs/ s H  o3R                  PM     Os  snf sn5      5      -  5        W Vs/ s H  o3S4PM     Os  snf nn S nAGN[        R                  " UR                   S   UR                  UR"                  SSR                  [        UR                   Vs/ s H  o3R                  PM     Os  snf sn5      5      -  S9UeS nAff = fs  snf s  sn	nf ! , (       d  f       g = f)Nc                \   > TR                   R                  (       a  U R                  c  S$ S $ r   )r1   r  rf   )r  r0   s    r3   <lambda>.SchemaDropper.visit_metadata.<locals>.<lambda>?  s.    #'<<#>#>)6 " & "&&r6   )	filter_fna4  Can't sort tables for DROP; an unresolvable foreign key dependency exists between tables: %s; and backend does not support ALTER.  To restore at least a partial sort, apply use_alter=True to ForeignKey and ForeignKeyConstraint objects involved in the cycle to mark these as known cycles that will be ignored.r   rA   r   zCan't sort tables for DROP; an unresolvable foreign key dependency exists between tables: %s.  Please ensure that the ForeignKey and ForeignKeyConstraint objects involved in the cycle have names so that they can be dropped using DROP CONSTRAINT.)msgrm  T)drop_okrp  _ignore_sequences)r  )rS   rh   rq  _can_drop_tablereversedrr  r   CircularDependencyErrorr1   r  r   warnr   sortedcyclesfullnameargsedgesrs  _can_drop_sequencer.  rU   rt  r   )r0   ru  rS   rv  unsorted_tablesrw  err2r   rx  ry  rz  rW  r|  r}  r{  s   `              r3   r~  SchemaDropper.visit_metadata3  sn   ;;"[[F(//0023F*	*0L&QD4H4H4Kq&OL/'#
JX ((//1
1&&q) 1 	 
 /9Jj(1AAjJ!!# " 

  *$(( $/3*2	 )   $,,S1  $  *  $$S**2D$E  #
 
g M ** 	<<..		3 yyT[[(I[[(I!JKM
 0??!"g?
?
11IIaLKKJJ' yyT[[(I[[(I!JKM	 	:
 K
 
s    E1 E,"E,("E1 &J!J!	J&J&A!J,,E1 1JA
JG&%J HJAJ.JJJ,
J:c                T   U R                   R                  UR                  5        U R                  R	                  U5      nU(       a  U R                   R                  U5        U R
                  (       + =(       d/    U R                   R                  U R                  UR                  US9$ rP  rR  rV  s      r3   r  SchemaDropper._can_drop_table  s}    ((4??<<UCLL,,-=>??" 
dll&<&<OOUZZ0@ '= '
 	
r6   c                H   U R                   R                  UR                  5      nU(       a  U R                  R	                  U5        U R
                  (       + =(       dD    U R                  R                  U R                   UR                  R                  UR                  US9$ rP  r\  r^  s      r3   _can_drop_indexSchemaDropper._can_drop_index  sy    ??<<U[[ILL,,-=>??" 
dll&<&<OOKKJJ#	 '= '
 	
r6   c                t   U R                   R                  U5      nU R                  R                  =(       a    U R                  R                  (       + =(       d    UR
                  (       + =(       aG    U R                  (       + =(       d/    U R                  R                  U R                   UR                  US9$ rP  rc  rh  s      r3   r   SchemaDropper._can_drop_sequence  s    ??<<XF||.. 
000I8I8I4I OO# <<,,OOX]];K - 		
r6   c                    U(       d  U R                  U5      (       d  g U R                  U5         [        U5      " XR                  5        S S S 5        g ! , (       d  f       g = fr:   )r  r.  r  rs   )r0   r_  r  s      r3   r  SchemaDropper.visit_index  sC    t33E::!!%(eUOO4 )((s   A
A#c                   U(       d  U R                  U5      (       d  g U R                  UU R                  US9   [        U5      R	                  U R
                  5        UR                   H?  nUR                  c  M  UR                  U;  d  M$  U R                  UR                  5        MA     S S S 5        g ! , (       d  f       g = f)Nr  )	r  r.  rU   r   r   rs   r   r   rt  )r0   rW  r  rp  r  r   s         r3   r  SchemaDropper.visit_table  s     t33E::!!#9 " 

 e))$//:  --NN..??((8 (
 
 
s   ?B7=B7B77
Cc                    U R                   R                  (       d  g U R                  U5         [        U5      R	                  U R
                  5        S S S 5        g ! , (       d  f       g = fr:   )r1   r  r.  r  r   rs   r  s     r3   r  *SchemaDropper.visit_foreign_key_constraint  sC    ||**!!*-:&33DOOD .--r  c                    U(       d  U R                  U5      (       d  g U R                  U5         [        U5      R                  U R                  5        S S S 5        g ! , (       d  f       g = fr:   )r  r.  r   r   rs   )r0   ri  r  s      r3   r  SchemaDropper.visit_sequence  sI    t66x@@!!(+"//@ ,++r  r  r  r   )FFrA   )rD   rE   rF   rG   r   r~  r  r  r  r  r  r  r  rJ   r   r   s   @r3   r  r  (  sI    <@LF\
	


5 $9>EA Ar6   r  c                x   ^ Ub	  UmU4S jnOSn[        U UUSS9 VVs/ s H  u  pEUc  M
  UPM     snn$ s  snnf )ai	  Sort a collection of :class:`_schema.Table` objects based on
dependency.

This is a dependency-ordered sort which will emit :class:`_schema.Table`
objects such that they will follow their dependent :class:`_schema.Table`
objects.
Tables are dependent on another based on the presence of
:class:`_schema.ForeignKeyConstraint`
objects as well as explicit dependencies
added by :meth:`_schema.Table.add_is_dependent_on`.

.. warning::

    The :func:`._schema.sort_tables` function cannot by itself
    accommodate automatic resolution of dependency cycles between
    tables, which are usually caused by mutually dependent foreign key
    constraints. When these cycles are detected, the foreign keys
    of these tables are omitted from consideration in the sort.
    A warning is emitted when this condition occurs, which will be an
    exception raise in a future release.   Tables which are not part
    of the cycle will still be returned in dependency order.

    To resolve these cycles, the
    :paramref:`_schema.ForeignKeyConstraint.use_alter` parameter may be
    applied to those constraints which create a cycle.  Alternatively,
    the :func:`_schema.sort_tables_and_constraints` function will
    automatically return foreign key constraints in a separate
    collection when cycles are detected so that they may be applied
    to a schema separately.

    .. versionchanged:: 1.3.17 - a warning is emitted when
       :func:`_schema.sort_tables` cannot perform a proper sort due to
       cyclical dependencies.  This will be an exception in a future
       release.  Additionally, the sort will continue to return
       other tables not involved in the cycle in dependency order
       which was not the case previously.

:param tables: a sequence of :class:`_schema.Table` objects.

:param skip_fn: optional callable which will be passed a
 :class:`_schema.ForeignKeyConstraint` object; if it returns True, this
 constraint will not be considered as a dependency.  Note this is
 **different** from the same parameter in
 :func:`.sort_tables_and_constraints`, which is
 instead passed the owning :class:`_schema.ForeignKeyConstraint` object.

:param extra_dependencies: a sequence of 2-tuples of tables which will
 also be considered as dependent on each other.

.. seealso::

    :func:`.sort_tables_and_constraints`

    :attr:`_schema.MetaData.sorted_tables` - uses this function to sort


Nc                J   > U R                    H  nT" U5      (       d  M    g   g r   )elements)r}  fkfixed_skip_fns     r3   _skip_fnsort_tables.<locals>._skip_fn  s$    ll $$ # r6   T)r  extra_dependencies_warn_for_cycles)rr  )rS   skip_fnr  r  rv  r|  r  s         @r3   sort_tablesr    s`    B 	  51!	
	
IQ  	

	 	 	s   	66c           
     *  ^ [        5       n[        5       nUb  UR                  U5        [        5       nU  H  mTR                   Hr  nUR                  SL a  UR	                  U5        M%  U(       a   U" U5      nUSL a  UR	                  U5        ML  UR
                  n	U	TLd  M_  UR	                  U	T45        Mt     UR                  U4S jTR                   5       5        M      [        [        R                  " UR                  U5      U 5      5      n
U
 Vs/ s H  nXR                  R)                  U5      4PM!     snS[        U5      4/-   $ ! [        R                   Ga(  nU(       aD  [        R                  " SSR                  [!        S UR"                   5       5      5      < S35        UR$                   H  nX;   d  M
  US   mTUR"                  ;  a  M!  TR                   Vs/ s H  nUb  U" U5      S	Ld  M  UPM     Os  snf nnUR                  U5        U H)  nUR
                  n	U	TLd  M  UR'                  U	T45        M+     M     [        [        R                  " UR                  U5      U 5      5      n
 SnAGNtSnAff = fs  snf )
aP  Sort a collection of :class:`_schema.Table`  /
:class:`_schema.ForeignKeyConstraint`
objects.

This is a dependency-ordered sort which will emit tuples of
``(Table, [ForeignKeyConstraint, ...])`` such that each
:class:`_schema.Table` follows its dependent :class:`_schema.Table`
objects.
Remaining :class:`_schema.ForeignKeyConstraint`
objects that are separate due to
dependency rules not satisfied by the sort are emitted afterwards
as ``(None, [ForeignKeyConstraint ...])``.

Tables are dependent on another based on the presence of
:class:`_schema.ForeignKeyConstraint` objects, explicit dependencies
added by :meth:`_schema.Table.add_is_dependent_on`,
as well as dependencies
stated here using the :paramref:`~.sort_tables_and_constraints.skip_fn`
and/or :paramref:`~.sort_tables_and_constraints.extra_dependencies`
parameters.

:param tables: a sequence of :class:`_schema.Table` objects.

:param filter_fn: optional callable which will be passed a
 :class:`_schema.ForeignKeyConstraint` object,
 and returns a value based on
 whether this constraint should definitely be included or excluded as
 an inline constraint, or neither.   If it returns False, the constraint
 will definitely be included as a dependency that cannot be subject
 to ALTER; if True, it will **only** be included as an ALTER result at
 the end.   Returning None means the constraint is included in the
 table-based result unless it is detected as part of a dependency cycle.

:param extra_dependencies: a sequence of 2-tuples of tables which will
 also be considered as dependent on each other.

.. seealso::

    :func:`.sort_tables`


NTc              3  *   >#    U  H  oT4v   M
     g 7fr:   rA   ).0parentrW  s     r3   	<genexpr>.sort_tables_and_constraints.<locals>.<genexpr>t  s      "
*CUO*Cs   zLCannot correctly sort tables; there are unresolvable cycles between tables "r   c              3  8   #    U  H  oR                   v   M     g 7fr:   )r  )r  rv  s     r3   r  r    s     #C
1JJ
s   z", which is usually caused by mutually dependent foreign key constraints.  Foreign key constraints involving these tables will not be considered; this warning may raise an error in a future release.r   F)ri   updateforeign_key_constraints	use_alteraddreferred_table_extra_dependenciesrh   r   sortunionr   r  r   r  r   r  r  r  discard
difference)rS   r  r  r  fixed_dependenciesmutable_dependenciesremaining_fkcsr}  filtereddependent_oncandidate_sorterredge
can_removerW  s                 `r3   rr  rr  .  sy   \ 5%!!"45UN00C}}$""3'$S>t#"&&s+--L5($((,)>? 1  	!! "
*/*C*C"
 	
# *%
"(()=>
P $#E 
--88HI# ^$	%&' 'A && 
II 99V#C

#CCDG IID+Q

*  %<<< (IcN%,G <
 
 %%j1%C#&#5#5L#50,44lE5JK &  "(()=>
3
@s>   %/E &JJ%AJ%J+HH-J8A
JJrX   )rS   zIterable[TableClause]r  z0Optional[Callable[[ForeignKeyConstraint], bool]]r  z:Optional[typing_Sequence[Tuple[TableClause, TableClause]]]rC   zList[Table])NNF)ZrH   
__future__r   r0  typingr   r   r   r   r   r	   r
   typing_Sequencer   r   r    r   baser   r   r   r  r   r   r   r   util.typingr   r   TYPE_CHECKINGrN   r   r   r   rQ  r   r   r   r    r!   r"   
selectabler#   engine.baser$   engine.interfacesr%   r&   r'   r(   re   r)   r,   rL   
NamedTupler^   DDLRolern   
DDLElementr   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r  r!  r$  r'  r3  r?  rE  r  r  rr  rA   r6   r3   <module>r     s  
 #         .        #    " 	"%'",",'(.5+:e5s!234$] $@H %F %Pw5==*n wt "
 HT

 T
n*GCL <+/#& +#$ #D;s# D*3 .O+g& OD!	'" !~ t> tn7	'" 7('[, '%9Z( %?+g& ?&7	'" 7&K- D&Y|, &R)og. )*w/ **}5 *+6 +.?<8 ./OL9 /
$M 
$
- 

 
W=) W=tiA% iA\ AE 	W!W=WW Wv GLt'r6   