Skip to content

Setting custom type for the named parameter #3943

New issue

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

Open
vladmiller opened this issue Apr 24, 2025 · 0 comments
Open

Setting custom type for the named parameter #3943

vladmiller opened this issue Apr 24, 2025 · 0 comments

Comments

@vladmiller
Copy link

What do you want to change?

In my codebase I have

type Identity int64

Imagine a query like

-- name: GoGetThem :many
SELECT * FROM users WHERE id = ANY(@ids::bigserial[]);

That would generate an interface

func GoGetThem(ctx context.Context, ids []int64) 

It would have been amazing if type override supported overrides for named parameters, so sqlc could generate an interface like

func GoGetThem(ctx context.Context, ids []Identity) 

What database engines need to be changed?

No response

What programming language backends need to be changed?

No response

@vladmiller vladmiller added the enhancement New feature or request label Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant