Changed the modifier argument to be required
This prevents accidentally forgetting to set a modifier, which would result in that by default all rows in the table would get updated/deleted (usually not desired)
Changed the return value to be the number of rows updated/deleted
Allows seeing how many rows were updated/deleted by the SQL command
Allows optimising the if (rows_potentially_affected() > 0) { update_rows() } else { add_row() } pattern to if (update_rows() == 0) { add_row() }
Changed the
modifier
argument to be required This prevents accidentally forgetting to set a modifier, which would result in that by default all rows in the table would get updated/deleted (usually not desired)Changed the return value to be the number of rows updated/deleted
if (rows_potentially_affected() > 0) { update_rows() } else { add_row() }
pattern toif (update_rows() == 0) { add_row() }