修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

服务器的MAC地址

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
申请天数
审批时间
过期时间
MAC地址
申请理由
审核信息
关闭
基础信息
  • 用户昵称:
  • 手机号:
  • 公司名称:
  • 公司邮箱:
  • 地区:
  • 语言:
修改密码
申请证书

当前未申请证书.

申请证书
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

ProductName CreateTime ID Price File
ProductName CreateTime ID Price File

No Invoice

v5.0
搜索
    v5.0

      列表函数

      示例图集

      以下示例根据该图集运行:

      append()

      向列表末尾添加元素并返回新列表。

      语法 append(<list>, <elem>)
      参数 名称 类型 描述
      <list> LIST 目标列表
      <elem> 任意 待添加的元素
      返回类型 LIST

      LET myList = ["a", 1, 2]
      RETURN append(myList, "b")
      

      结果:

      append(myList, "b")
      ["a",1,2,"b"]

      difference()

      返回两个列表之间的差异,生成一个新列表,其中包括出现在第一个列表但不在第二个列表的元素。重复项也包括在内。

      语法 difference(<list_1>, <list_2>)
      参数 名称 类型 描述
      <list_1> LIST 第一个列表
      <list_2> LIST 第二个列表
      返回类型 LIST

      LET l1 = [1,2,2,3], l2 = [3,4,5]
      RETURN difference(l1, l2)
      

      结果:

      difference(l1, l2)
      [1,2,2]

      elements()

      以列表形式返回组成路径的点和边。

      语法 elements(<path>)
      参数 名称 类型 描述
      <path> PATH 目标路径
      返回类型 LIST

      MATCH p = ()->()
      LET items = elements(p)
      FOR item IN items WITH ORDINALITY index
      FILTER index %2 = 1
      RETURN item
      

      结果: item

      _id
      _uuid schema
      values
      P2 Sys-gen Course {title: "Optimizing Queries", author: "Alex", score: 9}
      P3 Sys-gen Course {title: "Path Patterns", author: "Zack", score: 7}
      P1 Sys-gen Course {title: "Efficient Graph Search", author: "Alex", score: 6}
      P2 Sys-gen Course {title: "Optimizing Queries", author: "Alex", score: 9}

      head()

      返回列表中的第一个元素。

      语法 head(<list>)
      参数 名称 类型 描述
      <list> LIST 目标列表
      返回类型 STRING

      LET myList = ["a", 1, 2]
      RETURN head(myList)
      

      结果:

      head(myList)
      a

      intersection()

      返回两个列表的共有元素,生成新列表。重复项也包含在内。

      语法 intersection(<list_1>, <list_2>)
      参数 名称 类型 描述
      <list_1> LIST 第一个列表
      <list_2> LIST 第二个列表
      返回类型 LIST

      LET l1 = [1,2,3,3], l2 = [3,3,4,5]
      RETURN intersection(l1, l2)
      

      结果:

      intersection(l1, l2)
      [3,3]

      listContains()

      判断列表中是否包含指定元素,返回结果1为真,0为假。

      语法 listContains(<list>, <elem>)
      参数 名称 类型 描述
      <list> LIST 待判断的列表
      <elem> 任意 <list>中待查询的元素
      返回值 1 or 0

      LET myList = ["a", 1, 2]
      RETURN listContains(myList, "b")
      

      结果:

      listContains(myList, "b")
      0

      listUnion()

      返回两个列表的并集,生成新列表。不包含重复项。

      语法 listUnion(<list_1>, <list_2>)
      参数 名称 类型 描述
      <list_1> LIST 第一个列表
      <list_2> LIST 第二个列表
      返回类型 LIST

      LET l1 = [1,2,2,3], l2 = [3,4,5]
      RETURN listUnion(l1, l2)
      

      结果:

      listUnion(l1, l2)
      [1,2,3,4,5]

      reduce()

      对列表中的每个元素执行迭代计算。指定初始值后,定义的计算过程会将列表中的第一个元素当作输入值开始计算。

      语法 reduce(<resAlias> = <initVal>, <elemAlias> in <list> | <calcExp>)
      参数 名称 类型 描述
      <resAlias> / 代表初始、中间和最终计算结果的别名
      <initVal> / 分配给<resAlias>的初始值
      <elemAlias> / 代表列表中各元素的别名
      <list> LIST 目标列表
      <calcExp> / 计算表达式
      返回类型 STRING

      LET myList = [1,3,5]
      RETURN reduce(_sum = 0, item in myList | _sum + item) AS listSum
      

      结果:

      listSum
      9

      MATCH p = ({_id: "P1"})-[edges]->{2}()
      RETURN reduce(total = 0, edge in edges | total + edge.weight) as totalWeights
      

      结果:

      totalWeights
      3

      size()

      返回列表中的元素总数。

      语法 size(<list>)
      参数 名称 类型 描述
      <list> LIST 目标列表
      返回类型 UINT

      LET myList = [1, 2, null, 3]
      RETURN size(myList)
      

      结果:

      size(myList)
      4

      trim()

      从给定列表的结尾移除指定个数的元素。

      语法 trim(<list>, <num>)
      参数 名称 类型 描述
      <list> LIST 待裁剪的列表
      <num> UINT 指定从列表移除的元素个数,为整数
      返回类型 LIST

      LET myList = [1, 2, null, 3]
      RETURN trim(myList, 2)
      

      结果:

      TRIM(myList, 2)
      [1,2]
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写