Open philon123 opened 1 year ago
I've started a Discussion about how to implement this in https://github.com/kyleconroy/sqlc/discussions/2385
Are we expecting this to be dynamic as well? Because Even subqueries and conflicts don't seem to work with copy from
What do you want to change?
I would like to use queries like
We have support for COPY here, but it's not as flexible or as easy to use as the above syntax. Also, the above syntax allows for
ON CONFLICT(id) UPDATE name = EXCLUDED.name
, which is great for bulk updates / upserts.The generated Go code should take a list of Param objects as input. I'm not quite sure how the SQL template should look, but maybe something like
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
Go