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 @@ -731,6 +731,7 @@ def pandasSQL_builder(con, schema: str | None = None):
731731 provided parameters.
732732 """
733733 import sqlite3
734+ import warnings
734735
735736 if isinstance (con , sqlite3 .Connection ) or con is None :
736737 return SQLiteDatabase (con )
@@ -743,10 +744,13 @@ def pandasSQL_builder(con, schema: str | None = None):
743744 if isinstance (con , sqlalchemy .engine .Connectable ):
744745 return SQLDatabase (con , schema = schema )
745746
746- raise ValueError (
747+ warnings . warn (
747748 "pandas only support SQLAlchemy connectable(engine/connection) or"
748749 "database string URI or sqlite3 DBAPI2 connection"
750+ "other DBAPI2 objects are not tested, please consider using SQLAlchemy" ,
751+ UserWarning ,
749752 )
753+ return SQLiteDatabase (con )
750754
751755
752756class SQLTable (PandasObject ):
You can’t perform that action at this time.
0 commit comments