Skip to content

Commit 87156b1

Browse files
committed
chore: using cursor from transaction
1 parent ac87d2c commit 87156b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/io/sql.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2510,9 +2510,9 @@ def sql_schema(self) -> str:
25102510
return str(";\n".join(self.table))
25112511

25122512
def _execute_create(self) -> None:
2513-
with self.pd_sql.run_transaction():
2513+
with self.pd_sql.run_transaction() as cur:
25142514
for stmt in self.table:
2515-
self.pd_sql.execute(stmt).close()
2515+
cur.execute(stmt)
25162516

25172517
def insert_statement(self, *, num_rows: int) -> str:
25182518
names = list(map(str, self.frame.columns))

0 commit comments

Comments
 (0)