Author Archives: Raghavendar T S

Update Vertex If Exist – Gremlin Query – Titan

Update Vertex If Exist - Gremlin Query - Titan

Update Vertex If Exist – Gremlin Query – Titan

Update Vertex If Exist – Gremlin Query – Titan

g.V().hasLabel('TEST_LABEL').has('property1','value1').tryNext().ifPresent{
    g.V().hasLabel('TEST_LABEL').has('property2','value2').property('property3','value3').iterate();
};

Related Links:

  1. Gremlin Query Language - Create Vertex/Node and Edge/Relationship
  2. Check If Vertex/Edge Exist - Gremlin Query - Titan
  3. Update Properties of Multiple Edges - Gremlin Query - Titan
  4. Update Properties of Multiple Vertices - Gremlin Query - Titan
  5. Create Vertex If Does Not Exist - Gremlin Query - Titan
  6. Query/Access Root Level Properties and Nested Properties of Vertex in Single Query - Gremlin Query - Titan
  7. Update Vertex If Exist - Gremlin Query - Titan
  8. Update Multiple Properties of Vertex - Gremlin Query - Titan
Read More...

Gremlin Query Basic Tutorials

Gremlin Query Basic Tutorials

Gremlin Query Basic Tutorials

  1. Gremlin Query Language – Create Vertex/Node and Edge/Relationship
  2. Check If Vertex/Edge Exist – Gremlin Query – Titan
  3. Update Properties of Multiple Edges – Gremlin Query – Titan
  4. Update Properties of Multiple Vertices – Gremlin Query – Titan
  5. Create Vertex If Does Not Exist – Gremlin Query – Titan
  6. Query/Access Root Level Properties and Nested Properties of Vertex in Single Query – Gremlin Query – Titan
  7. Update Vertex If Exist – Gremlin Query – Titan
  8. Update Multiple Properties of Vertex – Gremlin Query – Titan

Check If Vertex/Edge Exist – Gremlin Query – Titan

Check If Vertex/Edge Exist - Gremlin Query - Titan

Check If Vertex/Edge Exist – Gremlin Query – Titan

Check If Vertex/Edge Exist – Gremlin Query

Example 1:

// Returns boolean value
exist = g.V().hasLabel('TEST_LABEL').has('property1','value1').hasNext();

Example 2:

// Returns boolean value
exist = g.V().hasLabel('TEST_LABEL').has('property1','value1').bothE().hasNext();

Related Links:

  1. Gremlin Query Language - Create Vertex/Node and Edge/Relationship
  2. Check If Vertex/Edge Exist - Gremlin Query - Titan
  3. Update Properties of Multiple Edges - Gremlin Query - Titan
  4. Update Properties of Multiple Vertices - Gremlin Query - Titan
  5. Create Vertex If Does Not Exist - Gremlin Query - Titan
  6. Query/Access Root Level Properties and Nested Properties of Vertex in Single Query - Gremlin Query - Titan
  7. Update Vertex If Exist - Gremlin Query - Titan
  8. Update Multiple Properties of Vertex - Gremlin Query - Titan
Read More...

Update Properties of Multiple Edges – Gremlin Query – Titan

Update Properties of Multiple Edges - Gremlin Query - Titan

Update Properties of Multiple Edges – Gremlin Query – Titan

Update Properties of Multiple Edges

e = g.V().hasLabel('TEST_LABEL').has('property1','value1').bothE();
e.property('property3','value3').property('property4','value4');

Related Links:

  1. Gremlin Query Language - Create Vertex/Node and Edge/Relationship
  2. Check If Vertex/Edge Exist - Gremlin Query - Titan
  3. Update Properties of Multiple Edges - Gremlin Query - Titan
  4. Update Properties of Multiple Vertices - Gremlin Query - Titan
  5. Create Vertex If Does Not Exist - Gremlin Query - Titan
  6. Query/Access Root Level Properties and Nested Properties of Vertex in Single Query - Gremlin Query - Titan
  7. Update Vertex If Exist - Gremlin Query - Titan
  8. Update Multiple Properties of Vertex - Gremlin Query - Titan
Read More...

Update Properties of Multiple Vertices – Gremlin Query – Titan

Update Properties of Multiple Vertices - Gremlin Query - Titan

Update Properties of Multiple Vertices – Gremlin Query – Titan

Update Properties of Multiple Vertices

v = g.V().hasLabel('TEST_LABEL').has('property1','value1').has('property2','value2');
v.property('property3','value3').property('property4','value4');

Related Links:

  1. Gremlin Query Language - Create Vertex/Node and Edge/Relationship
  2. Check If Vertex/Edge Exist - Gremlin Query - Titan
  3. Update Properties of Multiple Edges - Gremlin Query - Titan
  4. Update Properties of Multiple Vertices - Gremlin Query - Titan
  5. Create Vertex If Does Not Exist - Gremlin Query - Titan
  6. Query/Access Root Level Properties and Nested Properties of Vertex in Single Query - Gremlin Query - Titan
  7. Update Vertex If Exist - Gremlin Query - Titan
  8. Update Multiple Properties of Vertex - Gremlin Query - Titan
Read More...