Closed
Description
Version
Other
What happened?
I've been trying out the new beta sqlite support using the main branch of sqlc, and it seems to work perfectly for the most part, but the RETURNING
statement doesn't work.
Relevant log output
extraneous input 'RETURNING' expecting {<EOF>, ';', ALTER_, ANALYZE_, ATTACH_, BEGIN_, COMMIT_, CREATE_, DEFAULT_, DELETE_, DETACH_, DROP_, END_, EXPLAIN_, INSERT_, PRAGMA_, REINDEX_, RELEASE_, REPLACE_, ROLLBACK_, SAVEPOINT_, SELECT_, UPDATE_, VACUUM_, VALUES_, WITH_}
Database schema
CREATE TABLE users (name text, id serial primary key);
SQL queries
-- name: InsertUser :one
INSERT INTO users (name) VALUES (?) RETURNING id;
-- name: UpdateUser :one
UPDATE users SET name = ?
RETURNING id;
-- name: DeleteUser :one
DELETE FROM users
WHERE name = ?
RETURNING id;
Configuration
No response
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
No response
What type of code are you generating?
Go