Should the timestamp() function in Cypher remain constant throughout a transaction?

StackOverflow https://stackoverflow.com/questions/23313302

  •  10-07-2023
  •  | 
  •  

Frage

The Neo4j documentation indicates that the timestamp() function

will return the same value during the whole one query, even if the query is a long running one.

In my case, it would be helpful to have the value remain constant throughout a transaction, (so that various node and relationship timestamp properties I'm setting align with one another), but this does not appear to be the current behaviour.

My question is if the timestamp function should return the same value for an entire transaction, or if it is necessary for it to work the way it does now?

War es hilfreich?

Lösung

The Neo4j team considered this question and has indicated that the current behaviour (i.e. timestamp() should return a constant value within a query, but not over an entire transaction) is appropriate.

See here for more details: https://github.com/neo4j/neo4j/issues/2379.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top