Add schema file support for FieldSets
Opened this issue · 0 comments
mattinsler commented
Named field sets can be created by the generator rather than having to write them by hand.
data Person {
field-set Personal {
name,
age
}
field-set Images {
small_picture,
large_picture,
huge_picture
}
string name;
int32 age;
blob small_picture;
blob large_picture;
blob huge_picture;
}
This would just create
public abstract class Person {
public static final FieldSet Images = FieldSet.with(
Person.SmallPictureKey,
Person.LargePictureKey,
Person.HugePictureKey
);
...
}
I'll leave the exclusions and array slicing syntax to be fleshed out later.