Skip to content

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
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
* fix: MySQL slice with database/sql type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants