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 @@ -742,6 +742,7 @@ def pandasSQL_builder(con, schema: str | None = None):
742
742
provided parameters.
743
743
"""
744
744
import sqlite3
745
+ import warnings
745
746
746
747
if isinstance (con , sqlite3 .Connection ) or con is None :
747
748
return SQLiteDatabase (con )
@@ -754,10 +755,13 @@ def pandasSQL_builder(con, schema: str | None = None):
754
755
if isinstance (con , sqlalchemy .engine .Connectable ):
755
756
return SQLDatabase (con , schema = schema )
756
757
757
- raise ValueError (
758
+ warnings . warn (
758
759
"pandas only support SQLAlchemy connectable(engine/connection) or"
759
760
"database string URI or sqlite3 DBAPI2 connection"
761
+ "other DBAPI2 objects are not tested, please consider using SQLAlchemy" ,
762
+ UserWarning ,
760
763
)
764
+ return SQLiteDatabase (con )
761
765
762
766
763
767
class SQLTable (PandasObject ):
You can’t perform that action at this time.
0 commit comments