What should I do about the update of node-mysql indefinite parameters?

  node.js, question

Let’s say I have an API that updates user information. The parameters passed in different scenarios are also different, and only passed in some places.Name, sex, there are places are passed onName, height, weight,
conn.query('UPDATE user SET xx=? , xx=? , xx=? WHERE xxx=? AND status=0', [xx, xx, xx, xxx], ...

If I don’t want to passif-elseRespectively execute differentconn.queryHow do I put different situationsupdateAll written to onequery?

No. even if you write if else, you don’t have many lines of code. if else you write ifelse in js or sql.