We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Other
with query_parameter_limit set to 3 (or any value)
query_parameter_limit
func (q *Queries) AddNewUser(ctx context.Context, db DBTX, iD string, password string) (Users, error) { row := db.QueryRow(ctx, addNewUser, iD, password) err := row.Scan(&i.ID, &i.Password) return i, err }
notice declaration of var i Users is missing it affects only AddNewUser since its the only one that has < 3 parameters.
var i Users
AddNewUser
< 3
No response
drop table if exists "clients"; create table "clients"( "id" uuid not null primary key, "secret" text not null, "redirect_uri" text not null, "claims" jsonb not null ); drop table if exists "users"; create table "users"( "id" text not null primary key, "password" text not null );
-- name: AddNewClient :one insert into "clients"( "id", "secret", "redirect_uri", "claims" ) values ( sqlc.arg('id'), sqlc.arg('secret'), sqlc.arg('redirect_uri'), sqlc.arg('claims') ) returning *; -- name: BulkAddNewClients :copyfrom insert into "clients"( "id", "secret", "redirect_uri", "claims" ) values ( sqlc.arg('id'), sqlc.arg('secret'), sqlc.arg('redirect_uri'), sqlc.arg('claims') ); -- name: DeleteClient :exec delete from "clients" where "id" = sqlc.arg('id'); -- name: AddNewUser :one insert into "users"( "id", "password" ) values ( sqlc.arg('id'), sqlc.arg('password') ) returning *; -- name: BulkAddNewUsers :copyfrom insert into "users"( "id", "password" ) values ( sqlc.arg('id'), sqlc.arg('password') ); -- name: DeleteUser :exec delete from "users" where "id" = sqlc.arg('id');
version: "2" overrides: go: rename: redirect_uri: "RedirectURI" overrides: - db_type: "uuid" go_type: import: "github.com/aofei/sandid" type: "SandID" - db_type: "json" go_type: import: "encoding/json" type: "RawMessage" - db_type: "jsonb" go_type: import: "encoding/json" type: "RawMessage" sql: - engine: "postgresql" schema: "internal/db/authumn.schema.sql" queries: "internal/db/authumn.query.sql" gen: go: out: "internal/db" package: "db" sql_package: "pgx/v5" emit_exact_table_names: true emit_methods_with_db_argument: true query_parameter_limit: 3
https://play.sqlc.dev/p/af9607b336d8ea4dee9a966b052679b54d15efe1b3d2e6493ceef59259f2ad83
Linux
PostgreSQL
Go
The text was updated successfully, but these errors were encountered:
(note) A minimum case to regenerate this issue. https://play.sqlc.dev/p/956cd1d3c1f7d528b2adaa59ed7e9a97daef623cc396bcbb0ffdcd5eb554e83c
Sorry, something went wrong.
fix(codegen/go): compare define type in codegen (#2263) (#2578)
80f6ec3
Successfully merging a pull request may close this issue.
Version
Other
What happened?
with
query_parameter_limit
set to 3 (or any value)notice declaration of
var i Users
is missingit affects only
AddNewUser
since its the only one that has< 3
parameters.Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/af9607b336d8ea4dee9a966b052679b54d15efe1b3d2e6493ceef59259f2ad83
What operating system are you using?
Linux
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: