修改密码

请输入密码
请输入密码 请输入8-64长度密码 和 email 地址不相同 至少包括数字、大写字母、小写字母、半角符号中的 3 个
请输入密码
提交

修改昵称

当前昵称:
提交

申请证书

证书详情

Please complete this required field.

  • Ultipa Blaze (v4)

Standalone

Please complete this required field.

Please complete this required field.

Please complete this required field.

Please complete this required field.

如果不需要 HDC 服务,则此项留空。

Please complete this required field.

如果不需要 HDC 服务,则此项留空。

Please complete this required field.

Please complete this required field.

所有服务器的MAC地址,由换行符或逗号分隔。

Please complete this required field.

Please complete this required field.

取消
申请
ID
产品
状态
核数
Shard 服务最大数量
Shard 服务最大总核数
HDC 服务最大数量
HDC 服务最大总核数
申请天数
审批日期
过期日期
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

      CASE

      条件表达式CASE可用来判断单个或多个条件,并根据这些条件返回不同的结果。

      UQL支持CASE表达式的两种形式:

      示例图集

      create().node_schema("Paper").edge_schema("Cites")
      create().node_property(@Paper, "title").node_property(@Paper, "score", int32).node_property(@Paper, "author").node_property(@Paper, "publisher").edge_property(@Cites, "weight", int32)
      insert().into(@Paper).nodes([{_id:'P1', title:'Efficient Graph Search', score:6, author:'Alex', publisher: "PulsePress"}, {_id:'P2', title:'Optimizing Queries', score:9, author:'Alex'}, {_id:'P3', title:'Path Patterns', score:7, author:'Zack', publisher: "BrightLeaf"}])
      insert().into(@Cites).edges([{_from:"P1", _to: "P2", weight: 2}, {_from:"P2", _to: "P3", weight: 1}])
      

      Simple CASE

      Simple CASE表达式用来判断单个值与多个条件是否匹配,并返回首个匹配的结果。

      case <expr> 
        when <value_1> then <result_1>
        when <value_2> then <result_2>
        ...
        else <result_default>
      end
      

      详情

      • <expr>是表达式,如别名引用、聚合函数等。
      • 执行流程:
        • <expr>依次与每个when语句指定的<value_N>进行比较。
        • <value_N><expr>匹配时,将返回对应的<result_N>
        • 若无匹配结果,则返回else语句指定的<result_default>。若省略else,则默认返回null
      find().nodes({@Paper.score > 6}) as n
      return case count(n) when 3 then "Y" else "N" end AS result
      

      结果:

      result
      N

      Searched CASE

      Searched CASE表达式用来判断多个条件,并返回首个条件判断为真的结果。

      case
        when <condition_1> then <result_1>
        when <condition_2> then <result_2>
        ...
        else <result_default>
      end
      

      详情

      • <condition_N>为布尔值表达式,计算结果为真或假。
      • 执行流程:
        • 以此判断各<condition_N>
        • <condition_N>为真,则立刻返回<result_N>
        • 若所有<condition_N>为假,则返回else语句指定的<result_default>。若省略else,则默认返回null
      find().nodes({@Paper}) as n
      return n.title,
      case
        when n.publisher is null then "Publisher N/A"
        when n.score < 7 then -1
        else n.author
      end as note
      

      结果:

      n.title note
      Optimizing Queries Publisher N/A
      Efficient Graph Search -1
      Path Patterns Zack
      请完成以下信息后可下载此书
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写
      *
      你的电话必须填写