Skip to content

Conversation

@sz3lbi
Copy link
Contributor

@sz3lbi sz3lbi commented Oct 2, 2025

This PR introduces type-safe JSON configuration generation for sqlc based on Gleam types instead of the YAML configuration based on string concatenation.

JSON Schema: https://www.schemastore.org/sqlc-2.0.json (source: sqlc-dev/sqlc#4102)

@sz3lbi sz3lbi marked this pull request as draft October 3, 2025 07:54
@sz3lbi
Copy link
Contributor Author

sz3lbi commented Oct 3, 2025

Honestly, I'm not sure if differentiating between config versions is necessary in this case. This is especially true since it's an internal implementation, and you, as the package owner, decide which version will be used (exclusively or not).
Please make a decision on this.

@sz3lbi sz3lbi marked this pull request as ready for review October 3, 2025 09:07
@daniellionel01
Copy link
Owner

Honestly, I'm not sure if differentiating between config versions is necessary in this case. This is especially true since it's an internal implementation, and you, as the package owner, decide which version will be used (exclusively or not). Please make a decision on this.

hi! thanks for this improvement. I've got time to work on this now.
yeah we don't have to differentiate between the config versions, since we always pin the exact version.

@sz3lbi sz3lbi marked this pull request as draft October 9, 2025 07:28
@daniellionel01
Copy link
Owner

@sz3lbi i can finish the PR this week, or would you like to do it?

@sz3lbi
Copy link
Contributor Author

sz3lbi commented Oct 9, 2025

@sz3lbi i can finish the PR this week, or would you like to do it?

I will do what we agreed upon today, and then you can make adjustments if necessary :)

@sz3lbi sz3lbi marked this pull request as ready for review October 9, 2025 15:56
@sz3lbi
Copy link
Contributor Author

sz3lbi commented Oct 9, 2025

Please squash the commits for readability.

@daniellionel01
Copy link
Owner

For documentation sake: I explicitly linked the sqlc.json config file when sqlc generate is called since in existing projects there could be both the yaml and json file in the same directory.

@daniellionel01 daniellionel01 merged commit 28ce0a4 into daniellionel01:main Oct 10, 2025
1 check passed
@sz3lbi sz3lbi deleted the sqlc-json branch October 10, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants