I don't understand why the tests are failing on the CI but work here...
Ok I've disabled the conds/exprs part for upsert - I think insert on conflict do nothing will work fine for those.
Basic testing of the Upsert suggested that MySQL required a lot more work to…
Testcases for map[string]interface{}
have been added.
The exprs stuff is still untested and it would be good to see an example of what that should do.
So the next thing to do is to simplify the postgres and merge code to correctly handle this PK updates.
Then add some tests for the map[string]interface{}
, []map[string]interface{}
and…
OK so the next thing I've realised is that we can Upsert on with a table without an Unique index - so long as it has a PK autoincrement.
Actually thinking on I don't think you can reasonably do an upsert using these techniques if there is more than one unique constraint. So I think we should ban them.
OK, so if there is more than one unique constraint you really need to say which one you're upserting against. For example, it's possible for two different unique constraints to fail in two…
OK I think I have basic working implementation.
There are a couple of things needed:
- Testcases which use the
map[string]interface{}
,[]map[string]interface{}
and[]bean
routes. - It…