Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: generate pointer types for nullable enum columns with emit_pointers_for_null_types #4053

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

Open
stampflit wants to merge 1 commit into sqlc-dev:main
base: main
Choose a base branch
Loading
from stampflit:nullable-enums

Conversation

Copy link

@stampflit stampflit commented Aug 10, 2025
edited
Loading

fixes #4052

The generated QueryParams struct for the example from the issue is indeed:

type SearchFoodParams struct {
 Food string
 FoodType *FoodType
}

I wrote a minimal example to verify that this works as intended with sqlc.

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🔧 golang labels Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
size:XS This PR changes 0-9 lines, ignoring generated files. 🔧 golang
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Nullable ENUM Columns use NullEnumType instead of pointer

AltStyle によって変換されたページ (->オリジナル) /