Skip to content

Commit

Permalink
Fix not fetching cursor on insert/update
Browse files Browse the repository at this point in the history
  • Loading branch information
rad-pat committed Feb 6, 2025
1 parent e5afdca commit 98737c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions databend_sqlalchemy/databend_dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,11 @@ def create_server_side_cursor(self):
def create_default_cursor(self):
return self._dbapi_connection.cursor()

def post_exec(self):
if self.isinsert or self.isupdate or self.isdelete:
r = self.cursor.fetchall()
self._rowcount = r[0][0]


class DatabendTypeCompiler(compiler.GenericTypeCompiler):
def visit_ARRAY(self, type_, **kw):
Expand Down

0 comments on commit 98737c4

Please sign in to comment.