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

      INSERT

      Overview

      The INSERT statement allows you to add new nodes and edges into the graph using path patterns. Before inserting data, ensure that the required node and edge schemas (labels) and properties are already defined.

      Example Graph

      The following examples rely on a graph of the above structure. To create a graph with this structure:

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

      Inserting Nodes

      Nodes can be inserted using node patterns:

      • Each node must be assigned a label and may optionally include property specification. Missing property values default to null.
      • Node _id values will be generated by the system if not provided, though custom unique values can be assigned if desired.
      • Node _uuid values are always generated by the system and cannot be manually assigned.

      To insert three nodes, one User node with _id and name specified, one Club node with only _id specified, and one Club node with no property specified:

      INSERT (:User {_id: "U01", name: 'Quasar92'}), (:Club {_id: "C01"}), (:Club)
      

      To insert and return one node:

      INSERT (mochaeach:User {_id: "U02", name: 'mochaeach', gender: 'female'})
      RETURN mochaeach
      

      Result: mochaeach

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

      Inserting Edges

      Edges can be inserted using path patterns where the edge pattern has node patterns on both sides and must include a direction to indicate its source and destination nodes:

      • Each edge must be assigned a label and may optionally include property specification. Missing property values default to null.
      • Edge _uuid values are always generated by the system and cannot be manually assigned.
      • Edge _from, _to, _from_uuid, and _to_uuid values are automatically derived from the specified source and destination nodes. They cannot be manually assigned.

      When inserting edges, you must either connect them to existing nodes in the graph or insert the source and destination nodes along with the edges.

      Inserting Nodes Along with Edges

      To insert three User nodes and two Follows edges between them:

      INSERT (:User {name: 'rowlock'})-[:Follows {createdOn: '2024-1-5'}]->(:User {name: 'Brainy', gender: 'male'})<-[:Follows {createdOn: '2024-2-1'}]-(:User {name: 'purplechalk', gender: 'female'})
      

      Connecting to Existing Nodes

      To insert and return a Joins edge, with its source and destination nodes being found by the preceding MATCH statement and bound to variables n1 and n2:

      MATCH (n1:User {_id: 'U04'}), (n2:Club {_id: 'C01'})
      INSERT (n1)-[e:Joins {memberNo: 1}]->(n2)
      RETURN e
      

      Result: e

      _uuid
      _from
      _to
      _from_uuid
      _to_uuid
      schema
      values
      Sys-gen U04 C01 UUID of U04 UUID of C01 Joins {memberNo: 1}

      Inserting Connected Paths

      To insert two paths that intersect at a node by reusing the variable c02:

      INSERT (:User {_id: 'U06', name: 'waveBliss'})-[:Joins {memberNo: 1}]->(c02:Club {_id: 'C02'})<-[:Joins {memberNo: 2}]-(:User {_id: 'U07', name: 'bella', gender: 'female'}), 
             (:User {_id: 'U08', name: 'Roose'})-[:Joins {memberNo: 3}]->(c02)
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写