sqlc
sqlc copied to clipboard
Support multiple conflict targets in upsert statements for SQLite parser
What do you want to change?
The SQLite docs mentions that "The ON CONFLICT clauses are checked in the order specified", implying that there can be multiple conflict targets in an upsert statement which is not the case in sqlc. Currently, the SQLite parser will fail to parse queries that contain multiple conflict targets.
This gist contains the output of sqlc verify against a query, schema, and config file to demonstrate the issue.
What database engines need to be changed?
SQLite
What programming language backends need to be changed?
Go
@maxsei — Ironically, I ran into this exact same need a few days ago. 🤷♂️