File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -742,6 +742,7 @@ def pandasSQL_builder(con, schema: str | None = None):
742742 provided parameters.
743743 """
744744 import sqlite3
745+ import warnings
745746
746747 if isinstance (con , sqlite3 .Connection ) or con is None :
747748 return SQLiteDatabase (con )
@@ -754,10 +755,13 @@ def pandasSQL_builder(con, schema: str | None = None):
754755 if isinstance (con , sqlalchemy .engine .Connectable ):
755756 return SQLDatabase (con , schema = schema )
756757
757- raise ValueError (
758+ warnings . warn (
758759 "pandas only support SQLAlchemy connectable(engine/connection) or"
759760 "database string URI or sqlite3 DBAPI2 connection"
761+ "other DBAPI2 objects are not tested, please consider using SQLAlchemy" ,
762+ UserWarning ,
760763 )
764+ return SQLiteDatabase (con )
761765
762766
763767class SQLTable (PandasObject ):
You can’t perform that action at this time.
0 commit comments