Skip to content

Conversation

@andrewmbenton
Copy link
Collaborator

While investigating a fix for #2316 I discovered some generally unexpected behavior when attempting to get sqlc to generate slices of types in overrides for Go code gen. So I added a boolean "slice" property to the "go_type" property of the overrides object array, which behaves similarly to the "pointer" property.

This doesn't "fix" the above-referenced issue per se, but it does provide a more explicit way to tell sqlc how to achieve the desired result.

The docs I wrote may be wrong, so feel free to advise on any changes and I'll incorporate them.

… the "go_type" override property, and update docs
@andrewmbenton andrewmbenton force-pushed the allow-golang-slice-overrides branch from 1aa6d83 to 2647552 Compare June 20, 2023 19:23
@kyleconroy kyleconroy merged commit 8d365df into sqlc-dev:main Jun 20, 2023
alfonsodev pushed a commit to ExponentiaTeam/sqlc that referenced this pull request Oct 13, 2025
* internal/config: support an additional boolean field named "slice" on the "go_type" override property, and update docs

* revert unrelated import string prefix change, and add pgx tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants