@@ -11,6 +11,7 @@ from .. import util
1111from ..engine import Engine , Connection , Connectable
1212from ..engine .url import URL
1313from .compiler import DDLCompiler
14+ from .expression import FunctionElement
1415import threading
1516
1617_T = TypeVar ('_T' )
@@ -90,25 +91,25 @@ class Column(SchemaItem, ColumnClause[_T]):
9091 def __init__ (self , name : str , type_ : Type [TypeEngine [_T ]], * args : Any , autoincrement : Union [bool , str ] = ...,
9192 default : Any = ..., doc : str = ..., key : str = ..., index : bool = ..., info : Mapping [str , Any ] = ...,
9293 nullable : bool = ..., onupdate : Any = ..., primary_key : bool = ..., server_default : Any = ...,
93- server_onupdate : FetchedValue = ..., quote : Optional [bool ] = ..., unique : bool = ...,
94+ server_onupdate : Union [ FetchedValue , FunctionElement ] = ..., quote : Optional [bool ] = ..., unique : bool = ...,
9495 system : bool = ..., comment : str = ...) -> None : ...
9596 @overload
9697 def __init__ (self , type_ : Type [TypeEngine [_T ]], * args : Any , autoincrement : Union [bool , str ] = ...,
9798 default : Any = ..., doc : str = ..., key : str = ..., index : bool = ..., info : Mapping [str , Any ] = ...,
9899 nullable : bool = ..., onupdate : Any = ..., primary_key : bool = ..., server_default : Any = ...,
99- server_onupdate : FetchedValue = ..., quote : Optional [bool ] = ..., unique : bool = ...,
100+ server_onupdate : Union [ FetchedValue , FunctionElement ] = ..., quote : Optional [bool ] = ..., unique : bool = ...,
100101 system : bool = ..., comment : str = ...) -> None : ...
101102 @overload
102103 def __init__ (self , name : str , type_ : TypeEngine [_T ], * args : Any , autoincrement : Union [bool , str ] = ...,
103104 default : Any = ..., doc : str = ..., key : str = ..., index : bool = ..., info : Mapping [str , Any ] = ...,
104105 nullable : bool = ..., onupdate : Any = ..., primary_key : bool = ..., server_default : Any = ...,
105- server_onupdate : FetchedValue = ..., quote : Optional [bool ] = ..., unique : bool = ...,
106+ server_onupdate : Union [ FetchedValue , FunctionElement ] = ..., quote : Optional [bool ] = ..., unique : bool = ...,
106107 system : bool = ..., comment : str = ...) -> None : ...
107108 @overload
108109 def __init__ (self , type_ : TypeEngine [_T ], * args : Any , autoincrement : Union [bool , str ] = ...,
109110 default : Any = ..., doc : str = ..., key : str = ..., index : bool = ..., info : Mapping [str , Any ] = ...,
110111 nullable : bool = ..., onupdate : Any = ..., primary_key : bool = ..., server_default : Any = ...,
111- server_onupdate : FetchedValue = ..., quote : Optional [bool ] = ..., unique : bool = ...,
112+ server_onupdate : Union [ FetchedValue , FunctionElement ] = ..., quote : Optional [bool ] = ..., unique : bool = ...,
112113 system : bool = ..., comment : str = ...) -> None : ...
113114 def references (self , column : Column [Any ]) -> bool : ...
114115 def append_foreign_key (self , fk : ForeignKey ) -> None : ...
@@ -260,7 +261,7 @@ class ForeignKeyConstraint(ColumnCollectionConstraint):
260261 use_alter : bool = ...
261262 match : Optional [str ] = ...
262263 elements : List [ForeignKey ] = ...
263- def __init__ (self , columns : Sequence [str ], refcolumns : Sequence [Union [str , Column [Any ]]], name : Optional [str ] = ...,
264+ def __init__ (self , columns : SequenceType [str ], refcolumns : SequenceType [Union [str , Column [Any ]]], name : Optional [str ] = ...,
264265 onupdate : Optional [str ] = ..., ondelete : Optional [str ] = ..., deferrable : Optional [bool ] = ...,
265266 initially : Optional [str ] = ..., use_alter : bool = ..., link_to_name : bool = ..., match : Optional [str ] = ...,
266267 table : Optional [Table ] = ..., info : Optional [Mapping [str , Any ]] = ..., ** dialect_kw : Any ) -> None : ...
@@ -325,12 +326,12 @@ class MetaData(SchemaItem):
325326 @property
326327 def sorted_tables (self ) -> List [Table ]: ...
327328 def reflect (self , bind : Optional [Connectable ] = ..., schema : Optional [str ] = ..., views : bool = ...,
328- only : Optional [Union [Sequence [str ], Callable [[str , MetaData ], bool ]]] = ..., extend_existing : bool = ...,
329+ only : Optional [Union [SequenceType [str ], Callable [[str , MetaData ], bool ]]] = ..., extend_existing : bool = ...,
329330 autoload_replace : bool = ..., ** dialect_kwargs : Any ) -> None : ...
330331 def append_ddl_listener (self , event_name : str , listener : Callable [[str , MetaData , Connection ], None ]) -> None : ...
331- def create_all (self , bind : Optional [Connectable ] = ..., tables : Optional [Sequence [Table ]] = ...,
332+ def create_all (self , bind : Optional [Connectable ] = ..., tables : Optional [SequenceType [Table ]] = ...,
332333 checkfirst : bool = ...) -> None : ...
333- def drop_all (self , bind : Optional [Connectable ] = ..., tables : Optional [Sequence [Table ]] = ...,
334+ def drop_all (self , bind : Optional [Connectable ] = ..., tables : Optional [SequenceType [Table ]] = ...,
334335 checkfirst : bool = ...) -> None : ...
335336
336337class ThreadLocalMetaData (MetaData ):
0 commit comments