File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -731,6 +731,7 @@ def pandasSQL_builder(con, schema: str | None = None):
731
731
provided parameters.
732
732
"""
733
733
import sqlite3
734
+ import warnings
734
735
735
736
if isinstance (con , sqlite3 .Connection ) or con is None :
736
737
return SQLiteDatabase (con )
@@ -743,10 +744,13 @@ def pandasSQL_builder(con, schema: str | None = None):
743
744
if isinstance (con , sqlalchemy .engine .Connectable ):
744
745
return SQLDatabase (con , schema = schema )
745
746
746
- raise ValueError (
747
+ warnings . warn (
747
748
"pandas only support SQLAlchemy connectable(engine/connection) or"
748
749
"database string URI or sqlite3 DBAPI2 connection"
750
+ "other DBAPI2 objects are not tested, please consider using SQLAlchemy" ,
751
+ UserWarning ,
749
752
)
753
+ return SQLiteDatabase (con )
750
754
751
755
752
756
class SQLTable (PandasObject ):
You can’t perform that action at this time.
0 commit comments