Closed ehsen closed 3 years ago
dataset generates error if you try to update a column with rawsql without returning any rows. The column actually updates but generates an exception.
This result object does not return rows. It has been closed automatically.
I think the above error relates to sqlchemy rather then dataset. You can reproduce the error on Windows 7 with a following simple function.
def fix_null_checkout(date, employee_code, check_out_time,check_in_time): statement = f"UPDATE Attendance SET check_out='{check_out_time}',check_in='{check_in_time}' WHERE date='{date}' AND employee_code='{employee_code}'" try: attendance_db.query(statement) return True except Exception as e: print(e) return False
I think this was fixed in 1.5.0, see https://github.com/pudo/dataset/commit/c13b79fc596cd570e243376cbd42bea63fbae4eb can you check?
dataset generates error if you try to update a column with rawsql without returning any rows. The column actually updates but generates an exception.
This result object does not return rows. It has been closed automatically.
I think the above error relates to sqlchemy rather then dataset. You can reproduce the error on Windows 7 with a following simple function.