|| apoc.hashing.fingerprint - APOC 核心文档 - Neo4j 文档

apoc.hashing.fingerprint

详情

语法

apoc.hashing.fingerprint(object [, excludedPropertyKeys ])

描述

计算 NODERELATIONSHIP 的 MD5 校验和(相同实体共享相同的校验和)。不适用于加密用例。

参数

名称

类型

描述

object

ANY

要进行哈希处理的节点或关系。

excludedPropertyKeys

LIST<STRING>

要从哈希中排除的属性键。默认值为:[]

返回

STRING

使用示例

本节中的示例基于以下示例图

MERGE (joe:Person {name: "Joe"})
MERGE (ryan:Person {name: "Ryan"})
MERGE (ryan)-[:FOLLOWS {since: datetime("2020-11-04")}]->(joe);
MATCH (person:Person {name: "Ryan"})
RETURN apoc.hashing.fingerprint(person) AS output;
结果
输出

"81C99DD6C9382C4E01A1873F9E818CE0"

MATCH ()-[rel:FOLLOWS]->()
RETURN apoc.hashing.fingerprint(rel) AS output;
结果
输出

"C5A4B9FA273CC723D96BF93FFDD42858"

RETURN apoc.hashing.fingerprint({name: "Michael"}) AS output;
结果
输出

"F582CEF35FA83F3691BB756313191948"

如果我们想对指纹生成进行更多控制,请参阅 apoc.hashing.fingerprinting

© . This site is unofficial and not affiliated with Neo4j, Inc.