[英]Fix random seed in Neo4j
I wonder how you would fix the seed of a random number generator in Neo4j in order to make reproducible tries for development purposes.我想知道您将如何修复 Neo4j 中的随机数生成器的种子,以便为开发目的进行可重复的尝试。 For instance, how would you fix the seed in the following example so that it always yields the same output?
例如,您将如何修复以下示例中的种子,使其始终产生相同的 output?
MATCH (p:Person)-[:KNOWS]->()
WHERE rand() < 0.25
RETURN p LIMIT 100
I checked and I can confirm this is not supported at the moment.我检查了,我可以确认目前不支持此功能。 Implementation-wise , the function relies on
ThreadLocalRandom
which does even support custom seeds.在实现方面,function 依赖于
ThreadLocalRandom
,它甚至支持自定义种子。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.