Nested components
mnichols opened this issue · 1 comments
If I have structs like
type Book struct {
BookID string
Author Person // note the nested component here
}
type Person struct {
Name string
Email string
}
And my columns are in a table like
book_id,
author_name,
author_email
Is it possible to have dbr support that nested Person
component like sqlx
does with the syntax like select author_name as author.name, author_email as author.email from books
? That was handy in the sqlx realm and I didnt have to flatten all my golang database models...I was having a look at the loader.go
but it wasnt clear how I could pass in multiple columns to something like a sql.Scanner
implementor to achieve something like that.
Any suggestions on how nested structures might be supported?
Thanks in advance!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.