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

      SET

      Overview

      The SET statement allows you to update or remove properties on nodes and edges. These nodes or edges must first be retrieved using the MATCH statement.

      Note: The schema (label) of a node or edge cannot be modified. Similarly, the values of system properties (_id, _uuid, _from, _to, _from_uuid, and _to_uuid) are immutable.

      <set statement> ::=
        "SET" <set item> [ { "," <set item> }... ]
      
      <set item> ::= 
        <set single property> | <set all properties>
        
      <set single property> ::=
        <graph element variable reference> "." <property name> "=" <value expression>
      
      <set all properties> ::=
        <graph element variable reference> "=" <property specification>
      

      Details

      • You can either set a single property (e.g., SET n.age = 12, which updates age to 12 and keeps other property values unchanged), or overwrite all properties (e.g., SET n = {age: 12}, which updates age to 12 and removes all other proeprty values).

      Example Graph

      CREATE GRAPH myGraph { 
        NODE User ({name string, gender string}),
        NODE Club (),
        EDGE Follows ()-[{createdOn datetime, weight int32}]->(),
        EDGE Joins ()-[{memberNo uint32}]->()
      } PARTITION BY HASH(Crc32) SHARDS [1]
      

      INSERT (rowlock:User {_id: "U01", name: "rowlock"}),
             (brainy:User {_id: "U02", name: "Brainy", gender: "male"}),
             (purplechalk:User {_id: "U03", name: "purplechalk", gender: "female"}),
             (mochaeach:User {_id: "U04", name: "mochaeach", gender: "female"}),
             (c:Club {_id: "C01"}),
             (rowlock)-[:Follows {createdOn: "2024-1-5"}]->(brainy),
             (purplechalk)-[:Follows {createdOn: "2024-2-1"}]->(brainy),
             (mochaeach)-[:Follows {createdOn: "2024-2-10"}]->(brainy),
             (brainy)-[:Joins {memberNo: 1}]->(c)
      

      Updating Properties

      To update gender of the retrieved node n and createdOn of the retrieved edge e:

      MATCH (n:User {name: 'rowlock'})-[e:Follows]->(:User {name: 'Brainy'})
      SET n.gender = 'male', e.createdOn = '2024-1-7'
      RETURN n.gender, e.createdOn
      

      Result:

      n.gender e.createdOn
      male 2024-01-07 00:00:00

      Removing Properties

      To remove the value of gender of the retrieved node n:

      MATCH (n:User {name: 'mochaeach'})
      SET n.gender = null
      RETURN n
      

      Result: n

      _id _uuid schema
      values
      U04 Sys-gen User {name: "mochaeach", gender: null}

      Overwriting All Properties

      To overwrite all properties of the retrieved node n, updating the value of name and removing values of other properties:

      MATCH (n:User {name: 'purplechalk'})
      SET n = {name: 'MasterSwift'}
      RETURN n
      

      Result: n

      _id _uuid schema
      values
      U03 Sys-gen User {name: "MasterSwift", gender: null}

      Removing All Properties

      To remove all properties of the retrieved node n:

      MATCH (n:User {name: 'rowlock'})
      SET n = {}
      RETURN n
      

      Result: n

      _id _uuid schema
      values
      U03 Sys-gen User {name: null, gender: null}

      Updating Properties with CASE

      To assign values to weight of Follows edges based on their createdOn values:

      MATCH ()-[e:Follows]->()
      SET e.weight = CASE
        WHEN e.createdOn < '2024-1-31' THEN 10
        ELSE 8
      END
      RETURN e
      

      Result: e

      _uuid
      _from
      _to
      _from_uuid
      _to_uuid
      schema
      values
      Sys-gen U01 U02 UUID of U01 UUID of U02 Follows {createdOn: "2024-01-05 00:00:00", weight: 10}
      Sys-gen U04 U02 UUID of U04 UUID of U02 Follows {createdOn: "2024-02-10 00:00:00", weight: 8}
      Sys-gen U03 U02 UUID of U03 UUID of U02 Follows {createdOn: "2024-02-01 00:00:00", weight: 8}

      Mismatched Value Type

      If the provided value does not match the property's expected value type and cannot be converted, the property will be assigned its default value based on the property value type.

      To update memberNo (int32 type) of the retrieved edge with a string:

      MATCH ()-[e:Joins]->()
      SET e.memberNo = 'm2'
      RETURN e
      

      Result: e

      _uuid
      _from
      _to
      _from_uuid
      _to_uuid
      schema
      values
      Sys-gen C01 U02 UUID of C01 UUID of U02 Follows {memberNo: 0}
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写