How to update SQLAlchemy row entry?

There are several ways to UPDATE using sqlalchemy 1) user.no_of_logins += 1 session.commit() 2) session.query(User).\ filter(User.username == form.username.data).\ update({‘no_of_logins’: User.no_of_logins + 1}) session.commit() 3) conn = engine.connect() stmt = User.update().\ values(no_of_logins=User.no_of_logins + 1).\ where(User.username == form.username.data) conn.execute(stmt) 4) setattr(user, ‘no_of_logins’, user.no_of_logins + 1) session.commit()

tech