computed properties

51 views
Skip to first unread message

jaybr...@gmail.com

unread,
Jan 18, 2018, 6:29:20 PM1/18/18
to Neo4j
Is there a capability in any graph database system or query language to implement a computed property, i.e., a function/method that computes the value of a property based on other properties of the node or edge, or other nodes/edges in the datbase?

This would be much like a function method in object-oriented languages.  Rather than storing a value, the database would store the logic required to compute the value at any time.

Thank you,
Jay

Clark Richey

unread,
Jan 18, 2018, 7:51:10 PM1/18/18
to ne...@googlegroups.com
TigerGraph is designed to do exactly that

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Hunger

unread,
Jan 19, 2018, 7:01:27 AM1/19/18
to ne...@googlegroups.com
You can do it in Neo4j with a user-defined function which you can then call to get the computed value.

Actually, I wanted to add something like that to apoc anyway that allows you to store cypher statements under a name, and then just pass that name and some context to a function to get a computed value. 

What is your use case? If this functionality is useful in general, we could prioritize that implementation.

In neo4j-graphql you can add computed fields with an @cypher annotation on any field.

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.

Max De Marzi Jr.

unread,
Jan 19, 2018, 8:54:46 AM1/19/18
to Neo4j
You should take a look at my Dynamic Rule Based Decision Tree blog post:  https://maxdemarzi.com/2018/01/14/dynamic-rule-based-decision-trees-in-neo4j/

I use Janino to process and calculate a value at traversal time. You can use the same idea to calculate a function.
Reply all
Reply to author
Forward
0 new messages