getInstance("QueryBuilder@qb")
.from("foo")
.returning(["bar","baz"])
.where("key", "=", "someValue")
.update(values={freshValue: 42}, toSql=true);
produces
UPDATE [foo] SET [FRESHVALUE] = ? WHERE [key] = ?
but should be something like
UPDATE [foo] SET [FRESHVALUE] = ? OUTPUT INSERTED.[bar], INSERTED.[baz] WHERE [key] = ?
probably returning in an update context would need to accept something like
returning({inserted: ["bar","baz"], deleted: ["bar","baz"]})
since an UPDATE can output both the old and new values.
produces
but should be something like
probably
returningin an update context would need to accept something likesince an UPDATE can output both the old and new values.