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

Force NULL for all columns? #49

Open
znd4 opened this issue Oct 19, 2022 · 3 comments
Open

Force NULL for all columns? #49

znd4 opened this issue Oct 19, 2022 · 3 comments

Comments

@znd4
Copy link

znd4 commented Oct 19, 2022

Hi, possibly a weird feature request, but would it be reasonable to add a -force-null flag to force all fields to appear NULLable?

It seems to be the norm where I work to use sql.Null* for everything, including for columns that are NOT NULL. There are some arguments I could give for and against this practice, but in general it seems like it'd be a roadblock (at least at my shop) to adoption of an otherwise perfect developer tool.

I'm guessing it'd be simple enough implementation-wise that I could write a PR for this, but I wanted to test the waters first

@fraenky8
Copy link
Owner

Hi! Indeed an odd "feature"!

But I'm ok with that! Do you want to give it a try? Should we respect the existing -null flag: whenever -force-null is given, use the style as optionally given by -null as well?

@znd4
Copy link
Author

znd4 commented Oct 24, 2022

Do you want to give it a try?

Yeah, I'd love to!

whenever -force-null is given, use the style as optionally given by -null as well?

Yeah, i think that'd be the intuitive behavior. I'll make sure to follow that behavior

@fraenky8
Copy link
Owner

Hi @zdog234 is this feature still wanted? Do you think you have time in the next couple of weeks to look into it? 🙇

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

No branches or pull requests

2 participants