transporter
transporter copied to clipboard
Support updating existing records in postgres
When running a simple app, moving data from mongo to postgres, if there's a unique constraint, and records exist already, it ends up failing.
Update the postgres adapter to support the "ON CONFLICT DO UPDATE" syntax seems the best way to prevent this.
Have a basic implementation that needs refining (I'm not v proficient in Go!)
The basic implementation:
- Needs tests
- Needs to act on primary keys not
- Shouldn't be as noisy logging!
- The idea of GenerateUpsertStatement is that it can be shared between update and insert, should refactor update