Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Passing SQLite comments to the generated struct #3766

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

oxisto
Copy link

@oxisto oxisto commented Dec 27, 2024

This is a partial solution for #3430 for sqlite, which may or may not be adaptable for other engines. It basically looks for single-line comments before the CREATE command and in-between column definitions.

This is a partial solution for sqlc-dev#3430 for sqlite, which may or may not be adaptable for other engines. It basically looks for single-line comments before the CREATE command and in-between column definitions.
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 27, 2024
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Dec 27, 2024
@oxisto
Copy link
Author

oxisto commented Dec 27, 2024

The test fails are „intentional“. The generated structs are now different because they contain comments. I can either adjust the tests or provide a configuration flag to enable/disable this feature.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant