You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
With the introduction of the flatten attribute, it's now possible to have many atomic structs composed together rather than defining the whole table into one struct. While there're cases where those atomic structs have different column names in different tables.
For example, giving the following User
structUser{pubid:i64,pubname:String,}
The id might be named as user_id in user table, and owner_id in resource table.
Describe the solution you'd like
So instead of only allowing one rename, we might have an attribute that is possible to be called multiple times.
I've encountered this issue as well, but am curious whether it could be instead done in a less macro-heavy way, instead relying on the sql query result. E.g.
Is your feature request related to a problem? Please describe.
With the introduction of the
flatten
attribute, it's now possible to have many atomic structs composed together rather than defining the whole table into one struct. While there're cases where those atomic structs have different column names in different tables.For example, giving the following
User
The
id
might be named asuser_id
inuser
table, andowner_id
inresource
table.Describe the solution you'd like
So instead of only allowing one
rename
, we might have an attribute that is possible to be called multiple times.Describe alternatives you've considered
The current solution will be either define the struct manually multiple times or utilize a macro to do so.
Additional context
The text was updated successfully, but these errors were encountered: