Support Compare Predicate?

56 views
Skip to first unread message

Sol Eun

unread,
Mar 17, 2016, 3:12:00 PM3/17/16
to cayley-users
First post here!
First of all, thanks for the great opensource project.

I would like to know if anyone is working on expanding gremlin-like api such as comparing numerical values.
Looking at Tinkerpop3 documentation(http://tinkerpop.apache.org/docs/3.1.1-incubating/reference/#a-note-on-predicates), we can borrow some structures from there.
eq, neq, lte, lt, gte, gt seems more interesting than the rest.

Any feedback or thought?


Sol

Robert Melton

unread,
Mar 17, 2016, 4:27:22 PM3/17/16
to cayley...@googlegroups.com
On Thu, Mar 17, 2016, at 15:12, Sol Eun wrote:
Looking at Tinkerpop3 documentation(http://tinkerpop.apache.org/docs/3.1.1-incubating/reference/#a-note-on-predicates), we can borrow some structures from there.
eq, neq, lte, lt, gte, gt seems more interesting than the rest.
 
Any feedback or thought?
 
No thoughts outside of "I want it".  We currently are doing loops for date stuff which is ugly but functional. 
 
--
  Robert Melton | rme...@fastmail.com
 
 

Denys Smirnov

unread,
Mar 18, 2016, 12:52:10 PM3/18/16
to cayley-users
Actually it will be implemented. There is a PR #378 that blocks this and as soon as it will be ready I will implement comparison also.

четверг, 17 марта 2016 г., 21:12:00 UTC+2 пользователь Sol Eun написал:

Denys Smirnov

unread,
Mar 19, 2016, 9:09:24 PM3/19/16
to cayley-users
Ok, now the comparison implementation is wired into Gremlin. You may try it in #378. The syntax is the following:

g.V().Filter( gt(10) ).All()

This will return all the int values that are greater than 10. The same syntax will work for Dates, floats and strings also.
Supported operators are: "gt", "gte", "lt", "lte". Other operators such as "eq", "neq", "in" and others can be expressed with "Is", "And", "Except" already. But now they recognize types as well.

четверг, 17 марта 2016 г., 21:12:00 UTC+2 пользователь Sol Eun написал:
First post here!

Sol Eun

unread,
Mar 20, 2016, 9:31:41 PM3/20/16
to cayley-users
Great news.
Thanks for the update!


Sol
Reply all
Reply to author
Forward
0 new messages