[ WIP ] Adding ability to switch between insert & update

The `if` clause can be supplied to either insert or update.