Integer sequence generator in Neo4J/APOC?


(Brant Boehmann) #1

Our current system uses an oracle sequence and grabs a value to populate into some of our Neo4J graph nodes. I'm at a point where I may be able to refactor some of the inner-workings of some of this code, but I still may have to retain the integer sequence value for backward compatibility. This call to Oracle has always bothered me. I'm wondering if there is now a mechanism for doing this internal to Neo4J. I remember chatting with @michael.hunger about this on the defunct Neo4J slack channel over a year ago and it was mentioned the counters existed internally in a cluster safe manner and possibly this could be exposed via APOC as a general purpose sequence generator. After browsing the APOC docs, I don't see that this has been added. Can anyone update me on the current state of this type of functionality? I'm hoping it already exists and I'm overlooking it. Does it really exist internally? Safe for HA or Causal cluster? exposed via APOC? or could be leveraged via a custom function?

Thanks