Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnConflict / Merge (upsert) in MSSQL #5646

Open
code-cream opened this issue Jul 31, 2023 · 0 comments
Open

OnConflict / Merge (upsert) in MSSQL #5646

code-cream opened this issue Jul 31, 2023 · 0 comments

Comments

@code-cream
Copy link

code-cream commented Jul 31, 2023

Environment

Knex version: 2.4.2
Database + version: MSSQL
OS: Windows

Feature discussion / request

1. Explain what is your use case

I'm struggling to find examples of how I can implement upsert functionality for MSSQL using Knex. Any advice for those trying to implement a pattern similar to onConflict().Merge() , but for MSSQL? Are there any plans to include onConflict or merge support for MSSQL eventually?

I dug into the implementation thread for pg/mysql and it seems like it was close but some tests were not passing. I'd be happy to attempt to contribute, especially if i'm not missing some larger reason why it isnt supported.

@smorey2 thank you so much for the assistance

2. Explain what kind of feature would support this

Ideally onConflict and merge would be available for MSSQL so that they can be used in a db agnostic way.

3. Give some API proposal, how the feature should work

The same way it does for postgres and mysql would be amazing

@code-cream code-cream changed the title Onconflict / Upsert in MSSQL OnConflict / Merge (upsert) in MSSQL Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant