|| apoc.coll.fill - APOC 核心文档 - Neo4j 文档

apoc.coll.fill

详情

语法

apoc.coll.fill(item, count)

描述

返回一个包含给定数量项目的 LIST<ANY>

参数

名称

类型

描述

item

STRING

要添加到返回列表中的项目。

count

INTEGER

给定项目在返回列表中出现的次数。

返回

LIST<ANY>

使用示例

以下示例使用 APOC 和 Cypher 返回包含两个“abc”字符串的列表

apoc.coll.fill
RETURN apoc.coll.fill('abc', 2) as output
Cypher 的列表推导式
RETURN [i IN range(1, 2) | 'abc'] as output
结果
输出

["abc", "abc"]

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