Skip to content

CASE expressions aren't being parsed/read #92

Closed
@eullerpereira94

Description

@eullerpereira94

Queries using conditional expressions like NULLIF and COALESCE generate proper Go code. Meanwhile, the CASE conditional expression does not. The generated go code doesn't generate an additional field in the result struct, making the Scan fail each time is called. I will try to investigate this issue later on the week and try to provide a fix. The following query can be used to reproduce the observed behavior:

SELECT
  id,
  CASE 
    WHEN id = $1 THEN true
    ELSE false
  END is_one
FROM
  author;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions