Skip to content

feat: Nullable enums #1582

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

feat: Nullable enums #1582

wants to merge 1 commit into from

Conversation

Jille
Copy link
Contributor

@Jille Jille commented May 2, 2022

For every enum X, generate a type NullX which is a struct with X and
Valid bool.

issue #1097

Remaining work:

  • Get agreement from @kyleconroy
  • Discuss whether to put in effort to skip generation of NullX when it's unused.
  • Discuss whether the backwards compatibility break (because some inputs/outputs will become NullX) is a problem
  • Test with pgx
  • Test with database/sql postgres
  • Test with database/sql mysql

For every enum X, generate a type NullX which is a struct with X and
Valid bool.

issue sqlc-dev#1097
@Jille
Copy link
Contributor Author

Jille commented May 2, 2022

Hmm, looks like this does the same thing as #1485. Let's see if that PR gets merged and we can drop this one at that point.

@SnoozeThis #1485 <= 1 month

@SnoozeThis
Copy link

(https://snoozeth.is/Yoys1jlx5c8) I will wait until #1485 is merged and then add a comment (until at most Thu, 02 Jun 2022 17:34:48 CEST).

@SnoozeThis
Copy link

The deadline passed while snoozing.

@kyleconroy
Copy link
Collaborator

Closing as we merged #1485

@kyleconroy kyleconroy closed this Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants