I'm routing all of the inserts, updates and deletes through a stored procedure. This is partly because handling upsert on the app side doesn't work well because `only_if_unmodified_since()` affects the behavior of `FOUND` which is used by the insert or update method provided by JDBC. We shouldn't have been doing the upsert using the JDBC method anyway.

It also provides a consistent interface from the app side regardless of what might change in the database. It should further separate the clients from the data storage.