pudo / dataset

Easy-to-use data handling for SQL data stores with support for implicit table creation, bulk loading, and transactions.

Home Page:https://dataset.readthedocs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This result object does not return rows (dataset version 1.4.5)

ehsen opened this issue · comments

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 c13b79f can you check?