apoc.schema.node.indexExists函数
|
语法 |
|
||
描述 |
返回一个 |
||
参数 |
名称 |
类型 |
描述 |
|
|
要检查索引的节点标签。 |
|
|
|
要检查索引的属性名称。 |
|
返回 |
|
||
使用示例
本节中的示例基于一个已应用以下约束的数据库
CREATE CONSTRAINT personName FOR (person:Person)
REQUIRE person.name IS UNIQUE;
CREATE CONSTRAINT userId FOR (user:User)
REQUIRE user.id IS UNIQUE;
CREATE INDEX personCity FOR (person:Person)
ON (person.city);
RETURN apoc.schema.node.indexExists("Person", ["name"]) AS output;
| 输出 |
|---|
TRUE |
RETURN apoc.schema.node.indexExists("Person", ["city"]) AS output;
| 输出 |
|---|
TRUE |