修改密码

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

      删除

      概述

      使用语句delete()可以删除符合过滤条件的点或边。

      // 删除孤立点
      delete().nodes(<filter?>).nodetach()
                     
      // 删除点和与其相连的边
      delete().nodes(<filter?>).detach()
                  
      // 删除边
      delete().edges(<filter?>)
      
      方法
      参数
      描述
      可选
      nodes()edges() <filter?> 将过滤条件包裹在{}中,或使用别名指定待删除的点或边。留空时会作用在所有点或边上
      nodetach() / 避免删除与边相连的点,默认使用该方法
      detach() / 强制删除点和与点相连的边

      当任一端点从图中删除时,边将无法存在。默认情况下,UQL不允许删除与边相连的点。

      然而, 您可使用detach()nodetach().force()方法删除点和与点相连的边。例如,删除点B后,边124也将被删除。

      示例图集

      在一个空图集中,逐行运行以下UQL语句,创建示例图集:

      create().node_schema("user").edge_schema("follow")
      create().node_property(@user, "name").node_property(@user, "age", int32).edge_property(@follow, "time", datetime)
      insert().into(@user).nodes([{_id:"U001", name:"Jason", age:30}, {_id:"U002", name:"Tim"}, {_id:"U003", name:"Grace", age:25}, {_id:"U004", name:"Ted", age:26}, {_id:"U005", name:"Kyle", age:21}])
      insert().into(@follow).edges([{_from:"U004", _to:"U001", time:"2021-9-10"}, {_from:"U003", _to:"U001", time:"2020-3-12"}, {_from:"U004", _to:"U002", time:"2023-7-30"}])
      

      删除孤立点

      删除name为Kyle的孤立点:

      delete().nodes({name == "Kyle"})
      

      查询语句delete().nodes()删除孤立点,若待删除的点与边相连,则会引发报错,且不会删除任何点。

      删除任意点

      删除name为Grace的点及其相连的边:

      delete().nodes({name == "Grace"}).detach()
      

      删除所有点,同时删除所有边:

      delete().nodes().detach()
      

      删除边

      删除边@follow

      delete().edges({@follow})
      

      限制删除数量

      要限制待删除的点/边数量,首先需使用find()语句从数据库中获取数据,接着应用LIMIT语句,仅保留前N条记录至别名中,随后传递给delete()语句。

      删除任意两条边:

      find().edges() as e limit 2
      delete().edges(e)
      return e{*}
      

      结果:e

      _uuid
      _from
      _to
      _from_uuid
      _to_uuid
      schema
      values
      Sys-gen U004 U001 UUID of U004 UUID of U001 follow {time: "2021-09-11 00:00:00"}
      Sys-gen U004 U002 UUID of U004 UUID of U002 follow {time: "2023-07-31 00:00:00"}
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写