- Notifications
You must be signed in to change notification settings - Fork927
chore: Support anonymously embedded fields for audit diffs#5746
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
- Unit tests for anonymously embedded structs- Add docs and refactor code around
@coadler What do you think about expanding anonymous fields like this? I intentionally am avoiding using named nested structs, since that adds hierarchy complexity. Anonymous fields being expanded like this adds some convenience for the other PR linked in the description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I like the addition!
Uh oh!
There was an error while loading.Please reload this page.
PR adds support for anonymously embedded structs in audit diffs. Named nested structs are still not supported.
Anonymous structs can reasonably be recursively flattened to the top level struct. This is to support#5730.
The example type in question. It is easiest to anonymously embed the Group type that is auto generated with Sqlc. The
Group
type's fields should be treated as top level fields.