[ WIP ] Adding ability to switch between insert & update

@gwicke , Want to know how I can concatenate index values here