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

fix: MySQL slice shadowing database/sql import #2332

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

LudovicDebost
Copy link
Contributor

@LudovicDebost LudovicDebost commented Jun 16, 2023

The generated code use a var named sql but when the query return a database/sql type like sql.NullString then the var is shadowing the import.

Fixes #1816

@kyleconroy
Copy link
Collaborator

We'll have the same issue is someone uses a type in a query package, but that's not going to happen nearly as much as sql.

@kyleconroy kyleconroy merged commit 3b21fdf into sqlc-dev:main Jun 20, 2023
@LudovicDebost LudovicDebost deleted the fix-mysql-slice branch June 21, 2023 06:24
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.

2 participants