-
Notifications
You must be signed in to change notification settings - Fork 275
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
server: use DataValue instead of Variant for node attributes #766
Conversation
This should make more sense anyway since now you can for example update the timestamp when the value changes instead of when it is read only.
13fb32d
to
3652fd6
Compare
Is this a breaking change? If this is a breaking change then we should tag this as v0.7 or something similar. |
I think the only thing that breaks is custom Node definitions - the attribute map went from |
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.
Shouldn't there be some tests that need adapting?
All the tests use the helper functions so they're largely one step removed from the change. A couple lines in the test server did have to change since There's certainly an argument to be made that more tests are needed, but of the tests that exist there wasn't much to change. |
Right. Was looking for |
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.
This only affects the server so lets do it. I've moved some milestones around.
LGTM
By keeping the attribute values as DataValues instead of Variants it allows a user to set the timestamp, quality, or any other parameter of each attribute specifically instead of always returning a default.
The
SetAttribute
function already took a datavalue, so I don't expect there to be any real changes to user code - but now it will keep the value and not throw it away. The big difference is users will have to be careful to set the correct flags on the datavalue where before it ignored these and set the values at the end.