You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, postgres upsert only takes primary keys into consideration for generating ON CONFLICT statements. It would be helpful to also be able to upsert against unique fields. One solution would be to be able to pass in 'pkeys' via options.
Current code: if (this.upsert) this.pkeys = this.getPrimaryKeys();
Currently, postgres upsert only takes primary keys into consideration for generating ON CONFLICT statements. It would be helpful to also be able to upsert against unique fields. One solution would be to be able to pass in 'pkeys' via options.
Current code:
if (this.upsert) this.pkeys = this.getPrimaryKeys();
Suggested Change:
if (this.upsert) this.pkeys = this.options.pkeys ? Promise.resolve(this.options.pkeys) : this.getPrimaryKeys();
The text was updated successfully, but these errors were encountered: