修改密码

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

搜索
    中文

      WHERE

      WHERE 可以将别名中满足条件的数据行保留,不满足条件的数据行舍弃。

      语法 1:WHERE <condition>
      语法 2:WHERE <query>(开发中)
      参数:

      • <condition>:判断条件表达式,为真的行被保留
      • <query>:查询语句,有查询结果的行被保留

      WHERE 子句后所接的语句须对流入 WHERE 语句的别名、或该别名的同源别名进行操作,否则该语句无效。

      例如,将两个不同源的点 n1n2 进行比较,如果颜色相同则返回:

      find().nodes({shape == "square"}) as n1
      find().nodes({shape == "round"}) as n2
      where n1.color == n2.color
      return n1, n2
      

      用条件表达式进行判断

      示例图集:(以下示例将在本图基础上运行)

      在空图集中依次运行以下各行代码以创建该图数据:

      create().node_schema("student").node_schema("course")
      create().node_property(@*, "name").node_property(@student, "age", int32).node_property(@course, "credit", int32)
      insert().into(@student).nodes([{_id:"S001", _uuid:1, name:"Jason", age:25}, {_id:"S002", _uuid:2, name:"Lina", age:23}, {_id:"S003", _uuid:3, name:"Eric", age:24}, {_id:"S004", _uuid:4, name:"Emma", age:26}, {_id:"S005", _uuid:5, name:"Pepe", age:24}])
      insert().into(@course).nodes([{_id:"C001", _uuid:6, name:"French", credit:4}, {_id:"C002", _uuid:7, name:"Math", credit:5}])
      insert().into(@default).edges([{_uuid:1, _from_uuid:1, _to_uuid:6}, {_uuid:2, _from_uuid:2, _to_uuid:6}, {_uuid:3, _from_uuid:3, _to_uuid:6}, {_uuid:4, _from_uuid:2, _to_uuid:7}, {_uuid:5, _from_uuid:3, _to_uuid:7}, {_uuid:6, _from_uuid:4, _to_uuid:7}, {_uuid:7, _from_uuid:5, _to_uuid:7}])
      

      示例:查询 1 步路径 课程-学生,如果课程的 credit 为 4,或者学生的 age 为 24时,则返回该路径,携带全部属性

      n({@course} as a).e().n({@student} as b) as p
      where a.credit == 4 || b.age == 24
      return p{*}
      

      French <---- Jason
      French <---- Lina
      French <---- Eric
      Math <---- Pepe
      Math <---- Eric
      

      用查询语句进行判断 (开发中)

      示例:查找满足下图所示条件的中介银行卡 agent,即 CA002 经由 agent 向 CA001 转账,并且 agent 是 CA003 的 2Hop 以内的邻居:

      n({_id == "CA002"}).re().n({@card} as agent).re().n({_id == "CA001"})
      where n(agent).e()[*:2].n({_id == "CA003"})
      return agent{*}
      

      分析:WHERE 子句对模板查询语句输出的别名 agent 做进一步过滤,对每一个 agent 查找其到 CA003 的 2 步以内的最短路径是否存在,如果存在,则将该 agent 传给后面的 RETURN。

      上面的例子可以用子图模板改写为:

      graph([
        n({_id == "CA002"}).re().n({@card} as agent).re().n({_id == "CA001"}),
        n(agent).e()[*:2].n({_id == "CA003"})
      ])
      return agent{*}
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写