修改密码

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

搜索
    中文

      找点

      概述

      find().nodes()子句可以查询满足一定条件的点或全部点,与传统数据库中的表查询操作类似。

      语法

      • 子句别名:支持,数据类型为NODE,默认为nodes
      • 支持前缀OPTIONAL:若无查询结果,子句返回null
      • 命令:find()
      • 参数:
      参数 类型 规范 必须携带
      描述
      参数别名
      nodes() filter / 点的过滤条件 不支持
      limit() int ≥-1 子句每次执行时返回的结果数量,-1表示返回所有 不支持

      没有自行定义find().nodes()子句别名时,系统使用默认的nodes作为子句别名。此时后续子句不能使用nodes来定义别名,否则会引发重名报错。

      示例

      示例图集

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

      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"}])
      

      无过滤条件

      本例过滤条件为空,因此查询全部点,返回它们的全部信息:

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

      |--------------- @professor --------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | P001  |   1   |  53   | test@yahoo.cn   |
      | P002  |   2   |  27   | test@ultipa.com |
      
      |---------------- @student ---------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | S001  |   3   |  27   | test@yeah.net   |
      | S002  |   4   |  20   | test@w3.org     |
      | S003  |   5   |  25   | test@gmail.com  |
      

      过滤UID

      本例查询_id为S001的节点,返回它的全部信息:

      find().nodes({_id == "S001"}) as n
      return n{*}
      

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

      本例查询_uuid为1和3的节点,返回它们的全部信息:

      find().nodes([1,3]) as n
      return n{*}
      

      |--------------- @professor --------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | P001  |   1   |  53   | test@yahoo.cn   |
      
      |---------------- @student ---------------|
      |  _id  | _uuid |  age  |       email     |
      |-------|-------|-------|-----------------|
      | S001  |   3   |  27   | test@yeah.net   |
      

      过滤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  |
      

      过滤属性值

      本例查询age属性值大于25的点,返回它们的全部信息:

      find().nodes({age > 25}) as n
      return n{*}
      

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

      过滤Schema和属性值

      本例查询age属性值大于25的@student点,返回它们的全部信息:

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

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

      限制查询数量

      本例查询3个点,返回它们的全部信息:

      find().nodes().limit(3) as n
      return n{*}
      

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

      使用默认子句别名

      本例查询3个点,使用默认子句别名,返回它们的全部信息:

      find().nodes().limit(3)
      return nodes{*}
      

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

      使用前缀OPTIONAL

      本例查询age属性值大于55的点,返回它们的全部信息,由于无结果,因此返回null:

      optional find().nodes({age > 55}) as n
      return n{*}
      

      null
      

      如果没有使用前缀OPTIONAL,查询无结果时无返回值。

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