Skip to content

Conversation

@nozaq
Copy link
Contributor

@nozaq nozaq commented Apr 28, 2023

Fixes #2237

This PR contains the following changes.

  • Parse ELSE clause value as a constant instead of a type name when a node is ast.A_Const.
  • Add a test case for testing CASE expression with TEXT values.
  • Fix an error message when fails to parse the type name.
@nozaq nozaq changed the title Fix case else Apr 28, 2023
@kyleconroy kyleconroy merged commit 5555393 into sqlc-dev:main Apr 28, 2023
@nozaq nozaq deleted the fix-case-else branch April 28, 2023 21:44
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
…sqlc-dev#2238)

* fix: CASE-ELSE clause is not properly parsed when a value is constant

* fix: error message when failed to parse a type name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants