Skip to content
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

feat(sqlc): support emit_pointers_for_null_types for enums #3093

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

godwhoa
Copy link

@godwhoa godwhoa commented Jan 2, 2024

No description provided.

@godwhoa godwhoa marked this pull request as ready for review January 3, 2024 04:26
@andrewmbenton
Copy link
Collaborator

I think this might not be enough. Do we not also need to modify the scanning code for the non-nullable enum types so that they properly return a nil pointer when they scan a NULL? Or does this somehow "just work"?

Have you tried manually modifying the sqlc output to use pointers for nullable enums and confirmed that this proposed change alone does actually work as expected?

@godwhoa
Copy link
Author

godwhoa commented Jan 10, 2024

@andrewmbenton I did try with a basic INSERT RETURNING locally which worked, but didn't try any more elaborate cases that you mention.
Will try to pick it up over the week. Also, looks like CI isn't working on my PR any clue why?

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.

None yet

2 participants