File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -2779,7 +2779,8 @@ def to_sql(
27792779 ----------
27802780 name : str
27812781 Name of SQL table.
2782- con : sqlalchemy.engine.(Engine or Connection) or sqlite3.Connection
2782+ con : ADBC connection, sqlalchemy.engine.(Engine or Connection) or sqlite3.Connection
2783+ ADBC provides high performance I/O with native type support, where available.
27832784 Using SQLAlchemy makes it possible to use any DB supported by that
27842785 library. Legacy support is provided for sqlite3.Connection objects. The user
27852786 is responsible for engine disposal and connection closure for the SQLAlchemy
@@ -2966,6 +2967,22 @@ def to_sql(
29662967 >>> with engine.connect() as conn:
29672968 ... conn.execute(text("SELECT * FROM integers")).fetchall()
29682969 [(1,), (None,), (2,)]
2970+
2971+ .. versionadded:: 2.2.0
2972+
2973+ pandas now supports writing via ADBC drivers
2974+
2975+ >>> df = pd.DataFrame({'name' : ['User 10', 'User 11', 'User 12']})
2976+ >>> df
2977+ name
2978+ 0 User 10
2979+ 1 User 11
2980+ 2 User 12
2981+
2982+ >>> from adbc_driver_sqlite import dbapi # doctest:+SKIP
2983+ >>> with dbapi.connect("sqlite://") as conn: # doctest:+SKIP
2984+ ... df.to_sql(name="users", con=conn)
2985+ 3
29692986 """ # noqa: E501
29702987 from pandas .io import sql
29712988
You can’t perform that action at this time.
0 commit comments