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

Add support for native nulls #27

Closed
ethanpailes opened this issue Mar 3, 2020 · 0 comments · Fixed by #31
Closed

Add support for native nulls #27

ethanpailes opened this issue Mar 3, 2020 · 0 comments · Fixed by #31
Assignees
Labels
breaking enhancement New feature or request

Comments

@ethanpailes
Copy link
Contributor

All the sql.Null<Type>s are required for correctness and probably faster due to less boxing, but they are pretty clunky. We should support a mode where the generated Scan methods scan into the null wrappers but then convert to native nulls.

I'm somewhat inclined to say that this should be the default, though there should be a toml setting to toggle between the two modes.

@ethanpailes ethanpailes added enhancement New feature or request breaking labels Mar 5, 2020
ethanpailes pushed a commit that referenced this issue Mar 7, 2020
This patch switches the public interface of pggen's
generated code to use native go pointers rather than
`sql.Null*` types. This might have a small performance
impact, but it should make for more ergonomic code.

Closes #27
@ethanpailes ethanpailes self-assigned this Mar 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant