sqlc
sqlc copied to clipboard
Support RETURNING with :copyfrom
What do you want to change?
Support RETURNING statement with :copyfrom
Example:
-- name: CreateSignalsAndReturnUuid :copyfrom
INSERT INTO metadata.signals (slug, name, description)
VALUES ($1, $2, $3) RETURNING uuid;
Table schema:
-- object: metadata.signals | type: TABLE --
-- DROP TABLE IF EXISTS metadata.signals CASCADE;
CREATE TABLE metadata.signals
(
uuid uuid NOT NULL DEFAULT uuidv7(),
slug metadata.slug NOT NULL,
name text NOT NULL,
description text NOT NULL DEFAULT '',
);
Currently go generate returns :copyfrom is not compatible with RETURNING
What database engines need to be changed?
PostgreSQL
What programming language backends need to be changed?
No response
I'd like to help with this issue if that's ok. Is anyone already working on it, or may I take it?
cc @kyleconroy