Add option to return affected rows