Skip to content

Setting custom type for the named parameter #3943

Open
@vladmiller

Description

@vladmiller

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions