Skip to content

Naming the return type #1

@hfjallemark

Description

@hfjallemark

Just like you can name the generated function with the -- name: comment it would be nice if you could name the return type as well as this type tends to get spread out in the code base as you pass it around in functions.

So instead of:

-- name: get_job_listings
select * from job_listing

generating:

GetJobListingsRow

you could provide a name:

-- name: get_job_listings
-- returns: JobListing
select * from job_listing

that would generate:

JobListing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions