drizzle-team / drizzle-team/drizzle-orm
[FEATURE]: MySQL REPLACE statement
Open
db/mysql
enhancement
qb/crud
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Describe what you want
Add support for `REPLACE` statement in MySQL
> [REPLACE](https://dev.mysql.com/doc/refman/8.0/en/replace.html) works exactly like [INSERT](https://dev.mysql.com/doc/refman/8.0/en/insert.html), except that if an old row in the table has the same value as a new row for a PRIMARY KEY or a UNIQUE index, the old row is deleted before the new row is inserted.
`INSERT` and `REPLACE` have a very similar structure, should be easy to implement
Contributor guide
Assessment
This issue has not been assessed yet.