修改密码

请输入密码
请输入密码 请输入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

搜索
    中文

      插入

      介绍

      插入是指向当前图集中插入新的点、边数据;数据中携带的属性将直接赋值,未携带的属性将根据数据类型赋值为空字符串、null、0 等。

      插入操作可以向当前图集中单一或批量地插入点、边数据。

      • 插入点:可以指定 UUID 和/或 ID,也可以不指定,由系统自动生成。如果指定的 UUID、ID 在图集中已存在,插入会失败。
      • 插入边:可以指定 UUID,也可以不指定,由系统自动生成。如果指定的 UUID 在图集中已存在,插入会失败;如果数据中未携带起点/终点,或起点/终点在图集中不存在,插入也会失败。

      语法:

      • 命令:insert().into(@<schema>)
      • 参数:nodes()edges(),不支持自定义别名
      • 语句别名:支持自定义别名,结构类型为 NODE 或 EDGE

      不建议在算法流式返回之后进行插入操作,详见《Ultipa 图分析与图算法》-《算法的使用》-《执行方式》-流式返回 stream() 的相关说明。

      // 向当前图集的某个 schema 中插入点数据
      insert().into(@<schema>)
        .nodes([				//只插入一个点时可省略中括号
          {<property1>:<value1>, <property2>:<value2>, ...},
          {<property1>:<value1>, <property2>:<value2>, ...},
          ...
        ])
        
      // 向当前图集的某个 schema 中插入边数据,必须携带 _from 和 _to,或必须携带 _from_uuid 和 _to_uuid
      insert().into(@<schema>)
        .edges([				//只插入一个边时可省略中括号
          {<property1>:<value1>, <property2>:<value2>, ...},
          {<property1>:<value1>, <property2>:<value2>, ...},
          ...
        ])
      

      示例:插入两个账户,用账户号作为唯一标识符;一个名称为 graph,账户号为 U001,另一个名称为 database,账户号为 U002;查看系统生成的 UUID

      insert().into(@account)
        .nodes([{_id: "U001", name: "graph"}, {_id: "U002", name: "database"}]) as nodes
      return nodes._uuid
      

      分析:本例为点的插入操作,由于唯一标识符是字符串,可以使用 ID 进行存放。

      示例:插入一个交易,用交易号作为唯一标识符;交易号为 TRX001,起始于 C001,结束于 C002,金额 100,交易时间为 2021-01-01 09:00:00;查看系统生成的 UUID

      insert().into(@transaction)
        .edges({no: "TRX001", 
                _from: "C001", 
                _to: "C002", 
                amount: 100, 
                time: "2021-01-01 09:00:00"
        }) as edges
      return edges._uuid
      

      分析:本例为边的插入操作,由于唯一标识符是字符串,且边不支持 ID,故用字符串型属性 no 进行存放,后期查询时可通过对 no 设置索引、LTE 来加速。

      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写