Fix circular dependency in parameter validator
Add option to return affected rows