Skip to content

Customize parameter names #71

@kyleconroy

Description

@kyleconroy

Certain queries end up with generic (read: terrible) names in parameter structs. For example

CREATE TABLE foo (bar text not null);

-- name: ListBar :many
SELECT bar FROM foo WHERE $1:bool;

There is no way to generate a good name for lone parameter in this query. Maybe another special comment? -- param could work.

-- name: ListBar :many
-- param: 1 IsTrue
SELECT bar FROM foo WHERE $1:bool;

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions