修改密码

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

搜索
    中文

      使用Schema和属性

      概述

      嬴图GQL使用@符号引用图集中定义的点、边schema,格式为@<schema>,例如@user。

      引用图集中定义的点、边属性时:

      • @<schema>.<property>的格式引用指定schema的指定属性,例如@user.age,一般在点或边的过滤器中使用。
      • <alias>.<property>的格式引用指定别名的指定属性,例如n.age。由于只有点和边具有属性,因此<alias>的数据类型只能为NODE或EDGE。
      • <property>的格式不限schema引用属性,例如age,一般在点或边的过滤器中使用。

      @<schema>.<property>的格式不适用于唯一标识符属性_id_uuid,因为这两个属性不隶属于任何schema。

      例如,要查询_uuid为123的@transfer边,过滤器应写为{_uuid == 123},写成{@transfers._uuid==123}会报错。

      示例

      示例图集

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

      create().node_schema("professor").node_schema("student")
      create().node_property(@*, "age", int32).node_property(@*, "email", string)
      insert().into(@professor).nodes([{_id:"P001",_uuid:1,age:53,email:"test@yahoo.cn"},{_id:"P002",_uuid:2,age:27,email:"test@ultipa.com"}])
      insert().into(@student).nodes([{_id:"S001",_uuid:3,age:27,email:"test@yeah.net"},{_id:"S002",_uuid:4,age:20,email:"test@w3.org"},{_id:"S003",_uuid:5,age:25,email:"test@gmail.com"}])
      

      过滤Schema

      本例查询@student点:

      find().nodes({@student}) as n
      return n{*} 
      

      |---------------- @student ---------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | S001  |   3   |  27   | test@yeah.net   |
      | S002  |   4   |  20   | test@w3.org     |
      | S003  |   5   |  25   | test@gmail.com  |
      

      过滤器{@student}等效于{this.@ == "student"}

      过滤Schema与属性值

      本例查询age属性值为27的@student点:

      find().nodes({@student.age == 27}) as n
      return n{*} 
      

      |---------------- @student ---------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | S001  |   3   |  27   | test@yeah.net   |
      

      过滤器{@student.age == 27}等效于{@student && age == 27}

      过滤属性值

      本例查询所有拥有age属性且值为27的点:

      find().nodes({age == 27}) as n
      return n{*} 
      

      |---------------- @student ---------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | S001  |   3   |  27   | test@yeah.net   |
      
      |--------------- @professor --------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | P002  |   2   |  27   | test@ultipa.com |
      

      使用别名调用Schema和属性

      本例查询所有点,将它们的schema和age属性值组装成表格后返回:

      find().nodes() as n
      return table(n.@, n.age)
      

      | n.@ | n.age |
      |--------|--------|
      | professor | 53 |
      | professor | 27 |
      | student | 27 |
      | student | 20 |
      | student | 25 |
      
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写