We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.27.0
created some tables and queries to insert values into the tables. the generated code doesn't generate sensible or expected results.
:execresult
pgconn.CommandTag
:execlastid
No response
CREATE TABLE users ( id uuid PRIMARY KEY DEFAULT gen_random_uuid(), email text NOT NULL UNIQUE, password text, enabled boolean NOT NULL DEFAULT TRUE ); CREATE TABLE lusers ( id serial PRIMARY KEY, email text NOT NULL UNIQUE, password text, enabled boolean NOT NULL DEFAULT TRUE );
-- name: CreateUserA :execresult insert into users (email, password, enabled) values ($1, $2, $3) returning *; -- name: CreateUserB :execlastid insert into users (email, password, enabled) values ($1, $2, $3) returning *; -- name: CreateUserC :execrows insert into users (email, password, enabled) values ($1, $2, $3) returning *; -- name: CreateUserD :exec insert into users (email, password, enabled) values ($1, $2, $3) returning *;
{ "version": "2", "sql": [{ "schema": "schema.sql", "queries": "query.sql", "engine": "postgresql", "gen": { "go": { "out": "db", "sql_package": "pgx/v5" } } }] }
https://play.sqlc.dev/p/1f7b12addc3f2d40a3e92ab77d5ea4e6e988e3c1cb1a521801a4023e2dc5b4dc
macOS
PostgreSQL
Go
The text was updated successfully, but these errors were encountered:
You have to use :one or :many rather than :execresult
:one
:many
Sorry, something went wrong.
No branches or pull requests
Version
1.27.0
What happened?
created some tables and queries to insert values into the tables. the generated code doesn't generate sensible or expected results.
:execresult
producespgconn.CommandTag
:execlastid
doesn't even generate the function at allRelevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/1f7b12addc3f2d40a3e92ab77d5ea4e6e988e3c1cb1a521801a4023e2dc5b4dc
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: