is it possible to add new function to cypher?

大城市里の小女人 提交于 2019-12-11 02:35:01

问题


it would be appreciated to if anyone can answer that is there any way to add an LOOP function to cypher? i can find loops in graph by use of traversal. but i want to know is there anyway to pass obtained result to a customized user defined Cypher function?


回答1:


Not yet. They're talking about UDFs (User Defined Functions) in an upcoming release of Neo4j, though. You might consider refining your use case and asking for it as a feature of Cypher itself in github issues, as well.




回答2:


Until UDFs are possible with Cypher, you might consider using unmanaged extensions.




回答3:


It seems that you are asking two different questions.

About whether you can use loops in Cypher, yes you can, with FOREACH or UNWIND, depending on what you want to achieve. This is a good resource for when you don't quite know which is the right one for your case. It compares the two and tries them with different example queries.

As for whether you can write user defined function, as of Neo4j 3.0, you can. They are however written in Java. Look into this link for more details: https://neo4j.com/developer/procedures-functions/



来源:https://stackoverflow.com/questions/21659906/is-it-possible-to-add-new-function-to-cypher

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!