@@ -22,6 +22,7 @@ from pandas._typing import (
2222 DtypeArg ,
2323 DtypeBackend ,
2424 Scalar ,
25+ SequenceNotStr ,
2526 npt ,
2627)
2728
@@ -147,19 +148,19 @@ class PandasSQL:
147148 self ,
148149 frame : DataFrame ,
149150 name : str ,
150- if_exists : Literal ["fail" , "replace" , "append" ] = ... ,
151- index : bool = ... ,
152- index_label = ... ,
153- schema : str | None = ... ,
154- chunksize = ... ,
155- dtype : DtypeArg | None = ... ,
151+ if_exists : Literal ["fail" , "replace" , "append" , "delete_rows" ] = "fail" ,
152+ index : bool = True ,
153+ index_label : str | SequenceNotStr [ str ] | None = None ,
154+ schema : str | None = None ,
155+ chunksize : int | None = None ,
156+ dtype : DtypeArg | None = None ,
156157 method : (
157158 Literal ["multi" ]
158159 | Callable [[SQLTable , Any , list [str ], Iterable ], int | None ]
159160 | None
160- ) = ... ,
161- engine : str = ... ,
162- ** engine_kwargs : dict [ str , Any ] | None ,
161+ ) = None ,
162+ engine : str = "auto" ,
163+ ** engine_kwargs : Any ,
163164 ) -> int | None : ...
164165
165166class SQLTable :
@@ -169,22 +170,22 @@ class SQLTable:
169170 frame : DataFrame | None
170171 index : list [str ]
171172 schema : str
172- if_exists : Literal ["fail" , "replace" , "append" ]
173+ if_exists : Literal ["fail" , "replace" , "append" , "delete_rows" ]
173174 keys : list [str ]
174175 dtype : DtypeArg | None
175176 table : Any # sqlalchemy.Table
176177 def __init__ (
177178 self ,
178179 name : str ,
179180 pandas_sql_engine : PandasSQL ,
180- frame : DataFrame | None = ... ,
181- index : bool | str | list [str ] | None = ... ,
182- if_exists : Literal ["fail" , "replace" , "append" ] = ... ,
183- prefix : str = ... ,
184- index_label : str | list [str ] | None = ... ,
185- schema : str | None = ... ,
186- keys : str | list [str ] | None = ... ,
187- dtype : DtypeArg | None = ... ,
181+ frame : DataFrame | None = None ,
182+ index : bool | str | list [str ] | None = True ,
183+ if_exists : Literal ["fail" , "replace" , "append" , "delete_rows" ] = "fail" ,
184+ prefix : str = "pandas" ,
185+ index_label : str | list [str ] | None = None ,
186+ schema : str | None = None ,
187+ keys : str | list [str ] | None = None ,
188+ dtype : DtypeArg | None = None ,
188189 ) -> None : ...
189190 def exists (self ) -> bool : ...
190191 def sql_schema (self ) -> str : ...
0 commit comments