

def post_exec(self):
    if self._embedded_scope_identity:
        while True:
            try:
                row = self.cursor.fetchall()[0]
                break
            except self.dialect.dbapi.Error:
                self.cursor.nextset()
        self._lastrowid = int(row[0])
    if ((self.isinsert or self.isupdate or self.isdelete) and self.compiled.returning):
        self._result_proxy = engine.FullyBufferedResultProxy(self)
    if self._enable_identity_insert:
        table = self.dialect.identifier_preparer.format_table(self.compiled.statement.table)
        self.cursor.execute(('SET IDENTITY_INSERT %s OFF' % table))

dataset/ETHPy150Open RoseOu/flasky/venv/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/zxjdbc.py MSExecutionContext_zxjdbc.post_exec/original