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

Search
    English

      Trigger

      Triggers of pre-defined UQL operations can be executed at different occasions such as before or after a modification of metadata of a specifed schema, hereby achieving automatic execution of business logic bound to DML operations.

      Naming Conventions

      Trigger is named by developers. A same name can be shared between a node trigger and an edge trigger, but not between node triggers, or edge triggers.

      • 2 ~ 64 characters
      • Must start with letters
      • Allow to use letters, underscore and numbers ( _ , A-Z, a-z, 0-9)

      Show Trigger

      Returned table name: _nodeTrigger_edgeTrigger
      Returned table header: id|name|schema|description|when|operation|uqls(The ID, name, schema, description, timming [before|after], modification type [insert|upsert|update|delete] and UQL content of the trigger)

      Syntax:

      // To show all triggers in the current graphset (node triggers and edge triggers in separate tables)
      show().trigger() 
      
      // To show all node triggers in the current graphset
      show().node_trigger()
      
      // To show all edge triggers in the current graphset
      show().edge_trigger()
      

      Create Trigger

      Syntax:

      // To create trigger for a certain node schema in the current graphset
      create().node_trigger("<name>", @<schema>, "<desc?>")
        .<before|after>("<insert|update|upsert|delete>")
        .on("with node <subUQLs>") 
      
      // To create trigger for a certain edge schema in the current graphset
      create().edge_trigger("<name>", @<schema>, "<desc?>")
        .<before|after>("<insert|update|upsert|delete>")
        .on("with edge <subUQLs>") 
      

      Example: Create trigger for nodes of @student, converting value of property name to uppercase before insert operation

      create().node_trigger("AutoUpperCase", @student).before("insert").on(
        "
        with node
        let node.name = upper(node.name) 
        "
      )
      

      Drop Trigger

      Deleting a schema will also delete its trigger.

      Syntax:

      // To delete a certain node trigger
      drop().node_trigger("<name>")
      
      
      // To delete a certain edge trigger
      drop().edge_trigger("<name>")
      

      Example: Delete node trigger 'AutoUpperCase'

      drop().node_trigger("AutoUpperCase")
      

      Example: Delete edge trigger 'AutoFloor'

      drop().edge_trigger("AutoFloor")
      

      Use of Trigger

      After creating a trigger, compose and execute UQL based on the specified schema and operation type.

      Example: Use trigger to automatically abstract the year from a datetime edge property and insert as another edge proeprty

      // Create edge trigger 'AbstractYear'
      create().edge_trigger("AbstractYear", @studyAt).before("insert").on(
        "
        with edge
        let edge.graduateYear = year(edge.graduateDate) 
        "
      )
      
      // Insert an edge of @studyAt and return this edge
      insert().into(@studyAt).edges([{GPA: 4.3, graduateDate: "2022-06-03", _from: "STU001", _to: "UNV003"}]) as n
      return n{*}
      

      |------------------------------ @studyAt ----------------------------|
      | _uuid | _from  |  _to   | GPA |     graduateDate    | graduateYear |
      |-------|--------|--------|-----|---------------------|--------------|
      |   34  | STU001 | UNV003 | 4.3 | 2022-06-03 00:00:00 |     2022     |
      
      Please complete the following information to download this book
      *
      公司名称不能为空
      *
      公司邮箱必须填写
      *
      你的名字必须填写
      *
      你的电话必须填写