修改密码

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

      WITH

      概述

      使用语句WITH可以对查询前期生成的数据进行操作,再将结果传递给后续查询。请注意,WITH语句会影响别名的作用域。若别名未出现在WITH语句中,则无法在后续查询中使用。

      示例图集

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

      create().node_schema("Student").node_schema("Course").edge_schema("Take")
      create().node_property(@Student,"name").node_property(@Student,"gender").node_property(@Course,"name").node_property(@Course,"credit",int32)
      insert().into(@Student).nodes([{_id:"s1", name:"Alex", gender:"male"}, {_id:"s2", name:"Susan", gender:"female"}])
      insert().into(@Course).nodes([{_id:"c1", name:"Art", credit:13}, {_id:"c2", name:"Literature", credit:15}, {_id:"c3", name:"Maths", credit:14}])
      insert().into(@Take).edges([{_from:"s1", _to:"c1"}, {_from:"s2", _to:"c1"}, {_from:"s2", _to:"c2"}, {_from:"s2", _to:"c3"}])
      

      函数运算

      查找Susan所上课程里,credit最高的一门:

      n({@Student.name == "Susan"} as s).re().n({@Course} as c1)
      with max(c1.credit) as maxCredit
      find().nodes({@Course.credit == maxCredit}) as c2
      return c2.name
      

      结果:

      c2.name
      Literature

      连接异源数据

      本条查询意在判断图中每对学生和课程之间是否存在路径。请注意,WITH语句对sc执行了笛卡尔积操作,因此有6条记录生成。n().e().n()语句随后执行6次,逐条处理每条记录。更多信息请参阅异源数据

      find().nodes({@Student}) as s
      find().nodes({@Course}) as c
      with s, c
      optional n(s).e().n({_id == c._id}) as p
      return p{*}
      

      结果:p

      构建数据

      查找credit大于target的课程:

      with 13 as target
      find().nodes({@Course.credit > target}) as c
      return c.name
      

      结果:

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