-
Notifications
You must be signed in to change notification settings - Fork 504
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
Support range query for rest api like P.gt(18)/P.lt(3.14) #782
Conversation
Codecov Report
@@ Coverage Diff @@
## master #782 +/- ##
============================================
+ Coverage 71.89% 71.92% +0.03%
- Complexity 4596 4619 +23
============================================
Files 295 295
Lines 21943 22014 +71
Branches 3097 3117 +20
============================================
+ Hits 15775 15833 +58
- Misses 4619 4629 +10
- Partials 1549 1552 +3 Continue to review full report at Codecov.
|
// Convert relational operator like P.gt()/P.lt() | ||
for (Map.Entry<String, Object> prop : props.entrySet()) { | ||
Object value = prop.getValue(); | ||
if (value instanceof String && ((String) value).startsWith("P.")) { |
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.
add a arg 'literal' to determine whether match literally, default is false
@@ -624,4 +645,76 @@ public static QueryHolder firstPageStep(GraphTraversal<?, ?> traversal) { | |||
} | |||
return null; | |||
} | |||
|
|||
public static P<?> parsePredicate(String predicate) { | |||
// extract P from json string like {"properties": {"age": "P.gt(18)"}} |
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.
Extract
e.getMessage()); | ||
}); | ||
|
||
Assert.assertThrows(HugeException.class, () -> { |
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.
add more tests like "P.inside(5)" for "Invalid numbers size...."
ea79ad7
to
c87dd31
Compare
implement: #781 Change-Id: I4a4b8a78708dff1a27d0168b27b77958ee9fcfde
Change-Id: I98ba02e0e6d551cd937c59b4d05495f8ed99198b
Change-Id: Iafbd2c6c78464dca699910faf4f2424f15300a3e
c87dd31
to
ed7631f
Compare
implement: #781
Change-Id: I4a4b8a78708dff1a27d0168b27b77958ee9fcfde