This repository was archived by the owner on Mar 4, 2019. It is now read-only.

Description
Postgres 9.5 introduced the ON CONFLICT clause which enables upsert behavior.
Would you be open to a PR to add support for this to Massive as an option on insert? Simplest solution would be to add a second options parameter. e.g.
db.table.insert({id: 'might exist'}, {onConflict: 'do nothing'})
// or
db.table.insert({id: 'might exist'}, {onConflict: 'do update'})
It should be possible to generate the rest of the do update clause automatically.
Alternatively the options could be flags like {ignoreConflict: true} and {upsert: true} respectively.
As mentioned in #278 (comment) this this could also be used for save.