-
Notifications
You must be signed in to change notification settings - Fork 63
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nullable accessors and fixed convertTo #175
Conversation
…roperties will be considered nullable instead of the object itself.
…s for nullable accessors
let's use rebase instead of merge to pull changes from dev branch in the future. i think that would make 1 less commit in the history |
override val fieldType: FieldType = [email protected]() | ||
} | ||
|
||
public fun BaseField.toNotNullable(): BaseField = |
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.
Do we need it?
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.
Maybe, I'm not sure. I needed toNullable, but for completeness if we need it in the future I thought it best to also create a reverse option. Might save time to figure out how it works again
Let's say you have a Dataframe of
Location
:In the current implementation working with
gps
is very difficult. Since it is generated asDataRow<Gps?>
, the extension accessors likelatitude
andlongitude
don't work. Plus, in the dataframe, thegps
property is shown asgps: {latitude:Double?, longitude:Double?}
, which further shows that the accessor would be helpful.The generated accessors do not clash with the non-nullable variants.
Now possible:
Also fixing #176. might need some more convertTo tests, but the example from the issue now works.