Skip to content

interface{} generated but I think sqlc should generate NullString #1095

@kevinburke1

Description

@kevinburke1

I have this query:

-- name: GetControllerWithCompanySlug :one 
SELECT *, (
    SELECT textfield
    FROM companies
    WHERE controllers.company_sid = companies.sid
) AS "company_slug"
FROM controllers WHERE controllers.name = $1;

Controller has a nullable foreign key to companies. I would expect that this would return a sql.NullString but instead the type of "textfield" is interface{}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions