cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

From enum flag to neo4j nodes / relationships. How to map the data into neo4j?

MPasadu
Node Link

Hey,
I have a enum flag e.g.

[Flag]
public enum MyFlagEnum{
None = 0,
Flag1 = 1,
Flag2 = 2
Flag3 = 4
}

So you can do bitshift operations and combine flags.
How would you store/model such a construct in Neo4j? I want to be able to remove/add flags on thousands of nodes/data at once.

1 ACCEPTED SOLUTION

omerule
Graph Buddy

Maybe you can use the APOC library which has bitwise operators:
https://neo4j-contrib.github.io/neo4j-apoc-procedures/#bitwise-operations

Yours kindly
Omer

View solution in original post

2 REPLIES 2

If you have only a few options, I would use Labels.

Which you can add/remove at will.

omerule
Graph Buddy

Maybe you can use the APOC library which has bitwise operators:
https://neo4j-contrib.github.io/neo4j-apoc-procedures/#bitwise-operations

Yours kindly
Omer