Remove/Delete/Drop a Property Value from a List/Array – Gremlin Query

Remove/Delete/Drop a Property Value from a List/Array – Gremlin Query

Remove/Delete/Drop a Property Value from a List/Array – Gremlin Query

//Create Vertex
graph.addVertex(label, 'TEST_LABEL', 'id', '12345');

//Add value1, value2, value3 in the property 'test_property'
g.V().hasLabel('TEST_LABEL').has('id','12345').property('test_property', 'value1');
g.V().hasLabel('TEST_LABEL').has('id','12345').property('test_property', 'value2');
g.V().hasLabel('TEST_LABEL').has('id','12345').property('test_property', 'value3');

//Drop the value 'value2' alone from the property 'test_field'
 g.V().hasLabel('TEST_LABEL').has('id','12345')
.properties('test_property').hasValue('value2').drop();

Note that the property test_property is a multiple cardinality string data type.

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
  9. Remove/Delete/Drop a Property Value from a List/Array – Gremlin Query
Read More...

[ YOU MAY ALSO LIKE ]

Leave a Reply