Change Password

Please enter the password.
Please enter the password. Between 8-64 characters. Not identical to your email address. Contain at least 3 of: uppercase, lowercase, numbers, and special characters.
Please enter the password.
Submit

Change Nickname

Current Nickname:
Submit

Apply New License

License Detail

Please complete this required field.

  • Ultipa Graph V4

Standalone

Please complete this required field.

Please complete this required field.

The MAC address of the server you want to deploy.

Please complete this required field.

Please complete this required field.

Cancel
Apply
ID
Product
Status
Cores
Applied Validity Period(days)
Effective Date
Excpired Date
Mac Address
Apply Comment
Review Comment
Close
Profile
  • Full Name:
  • Phone:
  • Company:
  • Company Email:
  • Country:
  • Language:
Change Password
Apply

You have no license application record.

Apply
Certificate Issued at Valid until Serial No. File
Serial No. Valid until File

Not having one? Apply now! >>>

Product Created On ID Amount (USD) Invoice
Product Created On ID Amount (USD) Invoice

No Invoice

v5.0
Search
    English
    v5.0

      CASE

      The CASE expression is a conditional expression that allows you to evaluate one or more conditions and return different results based on those conditions.

      <case expression> ::= <simple case> | <searched case>
      

      GQL supports two forms of the CASE expression:

      Example Graph

      The following examples run against this graph:

      To create this graph, run the following query against an empty graph:

      INSERT (p1:Paper {_id:'P1', title:'Efficient Graph Search', score:6, author:'Alex', publisher:'PulsePress'}),
             (p2:Paper {_id:'P2', title:'Optimizing Queries', score:9, author:'Alex'}),
             (p3:Paper {_id:'P3', title:'Path Patterns', score:7, author:'Zack', publisher:'BrightLeaf'}),
             (p1)-[:Cites {weight:2}]->(p2),
             (p2)-[:Cites {weight:1}]->(p3)
      

      Simple CASE

      The simple CASE expression evaluates a single value against multiple possible values, returning the result associated with the first matching value.

      <simple case> ::=
        "CASE" <case operand> 
          "WHEN" <when operand list> "THEN" <result>
          [ { "WHEN" <when operand list> "THEN" <result> }... ]
          [ "ELSE" <result> ]
        "END"
           
      <when operand list> ::= <when operand> [ { "," <when operand> }... ]
      

      Details

      • <case operand> is a non-parenthesized value expression such as a variable reference, an aggregate function, etc.
      • The <when operand> can explicitly include the following operators:
        • Comparison Operators: =, <>, >, <, >=, <= (= is implicitly used when no operator is specified)
        • NULL predicates: IS NULL, IS NOT NULL
        • Value type predicates: IS TYPED, IS NOT TYPED
        • Normalized predicates: IS NORMALIZED, IS NOT NORMALIZED
        • Directed predicates: IS DIRECTED, IS NOT DIRECTED
        • Labeled predicates: IS LABELED, IS NOT LABELED
        • Source/Destination predicates: IS SOURCE OF, IS NOT SOURCE OF, IS DESTINATION OF, IS NOT DESTINATION OF
      • When the <when operand list> contains multiple <when operand>s, if any <when operand> evaluates to true, the <when operand list> is considered true.
      • When all <when operand list>s evalute to false, the <result> specified by ELSE is returned. If ELSE is omitted, a null value is returned instead.

      MATCH (n:Paper WHERE n.score > 6)
      RETURN CASE count(n) WHEN 3 THEN "Y" ELSE "N" END AS result
      

      Result:

      result
      N

      MATCH (n:Paper)
      RETURN n.title, n.score,
      CASE n.score 
        WHEN <7 THEN "Low"
        WHEN 7,8 THEN "Medium"
      ELSE "High" END AS scoreLevel
      

      Result:

      n.title n.socre scoreLevel
      Efficient Graph Search 6 Low
      Optimizing Queries 9 High
      Path Patterns 7 Medium

      MATCH (n:Paper)
      RETURN n.title,
      CASE n.publisher 
        WHEN IS NULL THEN "Unknown"
      ELSE n.publisher END AS Publisher
      

      Result:

      n.title Publisher
      Efficient Graph Search PulsePress
      Optimizing Queries Unknown
      Path Patterns BrightLeaf

      Searched CASE

      The searched CASE expression evaluates multiple conditions, returning the result associated with the first condition that evaluates to true.

      <searched case> ::=
        "CASE"
          "WHEN" <condition> "THEN" <result>
          [ { "WHEN" <condition> "THEN" <result> }... ]
          [ "ELSE" <result> ]
        "END"
      

      Details

      • <condition> is a boolean value expression.
      • When all <condition>s evalute to false, the <result> specified by ELSE is returned. If ELSE is omitted, a null value is returned instead.

      MATCH (n:Paper)
      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
      

      Result:

      n.title note
      Optimizing Queries Publisher N/A
      Efficient Graph Search -1
      Path Patterns Zack
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写