SetClause is an alias for AddSetClause. It sets the value of a column in the UPDATE SET clause, adding it if not present or replacing it if already there. Example: transform.Apply(stmt, transform.SetClause("status", "'active'"))
(column, valueSQL string)
| 93 | // |
| 94 | // transform.Apply(stmt, transform.SetClause("status", "'active'")) |
| 95 | func SetClause(column, valueSQL string) Rule { |
| 96 | return AddSetClause(column, valueSQL) |
| 97 | } |
| 98 | |
| 99 | // RemoveSetClause returns a Rule that removes a column from the UPDATE SET clause. |
| 100 | // If the column is not found the statement is left unchanged (no error). |