Value type constraints

vladimir_g_bore
Node Link

Is there a way to constrain the the types of values associated to each node (or edge) attribute?
For example enforcing the fact that attribute 1 must be a string and attribute 2 must be an array, etc.:

(n: Vertex {foo: String!, bar: Array!})

3 REPLIES 3

dana_canzano
Neo4j
Neo4j

At this time the out of the box constraint criteria do not allow you to specify that the property be a int/date/string etc.

That's unfortunate. Thank you for your fast reply!

clem
Graph Steward

I wonder if you can use Triggers to catch a value that has the wrong type during creation? (Or maybe force the type to the desired restriction.)

I'm a newbie, so I haven't explored Triggers that much yet.