Neo4j的数据库级验证 [英] Database-level validation of Neo4j
本文介绍了Neo4j的数据库级验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Neo4j作为我的图形数据库.假设我想将用户名"字段的长度限制为小于10,是否有任何方法可以在数据库级别提高这种限制?
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?
推荐答案
现在,您必须在应用程序级别执行此操作,或者通过注册一个检查特定属性的属性字段的事务提交钩子来执行此操作.
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.
请参阅:
- http://docs.neo4j.org/chunked/stable/transactions- events.html
- http://api.neo4j.org/2.0.3/org/neo4j/graphdb/event/TransactionEventHandler.html
- http://docs.neo4j.org/chunked/stable/transactions-events.html
- http://api.neo4j.org/2.0.3/org/neo4j/graphdb/event/TransactionEventHandler.html
这篇关于Neo4j的数据库级验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文