Database-level validation of Neo4j

爷,独闯天下 提交于 2019-12-10 09:22:15

问题


I am using Neo4j as my graph database. Suppose I want to limit the length of User's name field to be less then 10, is there any way to impost such constraint on the database level?


回答1:


Right now you'd have to do that either on application level, or by registering a transaction-commit hook that checks that property-field for a certain criterium.

See:

  • http://docs.neo4j.org/chunked/stable/transactions-events.html
  • http://api.neo4j.org/2.0.3/org/neo4j/graphdb/event/TransactionEventHandler.html


来源:https://stackoverflow.com/questions/23822409/database-level-validation-of-neo4j

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