OrientDB shortestPath () using a specific @class edge?

The function shortestPath()takes direction as the third argument. How to change a function so that it intersects only the edges of a certain class? I believe that I can simply add the class as the second argument on line 106:

https://github.com/orientechnologies/orientdb/blob/b21429d600f87193611eed3d33b90d5fb9c2f61e/graphdb/src/main/java/com/orientechnologies/orient/graph/sql/functions/OSQLFunctionShortestPath.ava

If I do this, do I need to rebuild from the source code? How can I create a custom function to use in my queries?

+4
source share
1 answer

OrientDB v.2.0.9 2.1. , , ( "2.0.x" "develop" )

:

shortestPath(<sourceVertex>, <destinationVertex>, [<direction>, [ <edgeTypeAsString> ]])

SELECT shortestPath(#12:0, #12:10, null, "MyEdgeClass")

+3

Source: https://habr.com/ru/post/1584134/


All Articles