I am using postgres as my database and https://github.com/lib/pq as library. I am updating a record using prepared statement
stmt, _:= db.Prepare("UPDATE account set status='deleted' where id= $1")
defer stmt.Close()
result, _:= stmt.Exec(accountId)
success, _:= result.RowsAffected()
And I noticed that the even if the row is already updated with the status=deleted update query always returns success=1. Is there any way we can differentiate between already updated row and not yet updated row?