Neo4j CQL - Caption



In Neo4j Data, when we execute MATCH + RETURN command in Neo4j DATA browser to view data in UI view, then it shows Nodes and/or Relationships results by using their Id property. It is known as "CAPTION" by id property.

We can change this CAPTION of a Node or a Relationship by using it's other property values.

Example

This example will prove that when we execute MATCH + RETURN command in Neo4j DATA browser to view data in UI view, then it shows Nodes and/or Relationships results as "CAPTION" by id property.

Step 1 - Open Neo4j Data Browser

Neo4j CQL Tutorial

It is Neo4j Data Browser Homepage

Step 2 - Type the below command on Data Browser

MATCH (tweet:Tweet{message:"Hello"})
RETURN tweet
Neo4j CQL Tutorial

Step 3 - Click on "Execute" button to observe the results.

Neo4j CQL Tutorial

Step 4 - Click on circle to view Tweet Node properties

Neo4j CQL Tutorial

If we observe this, we can find this node is displayed by using it's id = 0 property value.

It also contains one more property message="Hello".

Example

This example demonstrates how to change the "CAPTION" of Node or a Relationship in Neo4j DATA Browser UI View.

Step 1 - Open Neo4j Data Browser

Neo4j CQL Tutorial

Step 2 - Type the below command on Data Browser

MATCH (tweet:Tweet{message:"Hello"})
RETURN tweet
Neo4j CQL Tutorial

Step 3 - Click on "Execute" button to observe the results.

Neo4j CQL Tutorial

Step 4 - Click on circle to view Tweet Node properties

Neo4j CQL Tutorial

If we observe this, we can find this node is displayed by using it's id = 0 property value.

It also contains one more property message="Hello".

Step 5 - Click on "Style" tab highlighted by using yellow Color circle.

Neo4j CQL Tutorial

It shows that CAPTION is done by using Id property

Step 6 - Click on "Caption" dropdown box and select it's another property "message" as shown below.

Neo4j CQL Tutorial

Step 7 - Close it's property widow and observe the Tweet node

Neo4j CQL Tutorial

This time, Tweet node is displayed by using "CAPTION by message" property.

Advertisements