-
Notifications
You must be signed in to change notification settings - Fork 527
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
Optimize update logic & add a new strategy #673
Conversation
imbajin
commented
Aug 30, 2019
- if original data is not null but new data is null, use original data instead of null
- add update strategy "OVERRIDE"
Codecov Report
@@ Coverage Diff @@
## master #673 +/- ##
============================================
- Coverage 74.3% 74.29% -0.01%
Complexity 4089 4089
============================================
Files 220 220
Lines 17917 17918 +1
Branches 2571 2571
============================================
- Hits 13314 13313 -1
- Misses 3247 3250 +3
+ Partials 1356 1355 -1
Continue to review full report at Codecov.
|
@@ -193,7 +193,8 @@ public static EdgeId parse(String id) throws NotFoundException { | |||
String[] idParts = SplicingIdGenerator.split(id); | |||
if (!(idParts.length == 4 || idParts.length == 5)) { | |||
throw new NotFoundException("Edge id must be formatted as 4~5 parts" | |||
+ ", but got '%s'", id); | |||
+ ", but got %s parts, '%s'", |
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.
prefer move "parts" to the next line
there are conflicting files, please rebase. |
90b4c2f
to
ce91f2f
Compare
1. if original data is not null but new data is null, use original data instead of null 2. add update strategy "OVERRIDE"
e325830
to
4ce0e20
Compare
@@ -139,6 +139,18 @@ Object updatePropertyValue(Object oldProperty, Object newProperty) { | |||
void checkPropertyType(Object oldProperty, Object newProperty) { | |||
this.checkCollectionType(oldProperty, newProperty); | |||
} | |||
}, | |||
|
|||
OVERRIDE { |
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.
upgrade api version
// NOTE: can't use JsonUtil due to it bind tinkerpop jackson | ||
ObjectMapper mapper = new ObjectMapper(); | ||
try { | ||
try (InputStream stream = |
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.
good improve!
keep 'UuidID' & those impl from Tinkerpop as they are
* and split range to rangeInt, rangeFloat, rangeLong and rangeDouble | ||
* [0.44] Issue-633: Support unique index | ||
* [0.45] Issue-673: Add a new update strategy |
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.
make it clear:
Add OVERRIDE update strategy