How do I get the already existing constraints in Neo4j?

回眸只為那壹抹淺笑 提交于 2020-01-14 04:09:50

问题


When I've created some constraints on the graph, how is possible to see them and in case eliminate them? What is the syntax to treat them as elements of the graph?


回答1:


In the neo4j browser you can use the :schema command to list them. In shell it is schema

Then you can remove them with

`DROP INDEX ON :Label(prop)` 

or

`DROP CONSTRAINT ON (n:Label) ASSERT n.props IS UNIQUE`



回答2:


In Browser you can use CALL db.constraints to get all constraints on graph.

For more Info: https://neo4j.com/docs/developer-manual/current/cypher/schema/constraints/



来源:https://stackoverflow.com/questions/21658285/how-do-i-get-the-already-existing-constraints-in-neo4j

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