spmallette commented on code in PR #3483: URL: https://github.com/apache/tinkerpop/pull/3483#discussion_r3494370618
########## docs/src/reference/the-traversal.asciidoc: ########## @@ -1763,6 +1790,39 @@ g.V() * link:++https://tinkerpop.apache.org/javadocs/x.y.z/core/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.html#drop()++[`drop()`] +[[droplabel-step]] +=== DropLabel Step + +The `dropLabel()`-step (*sideEffect*) removes one or more specific labels from an element. The `dropLabels()`-step +removes all labels. The graph must be configured with a `LabelCardinality` that supports mutation. Dropping a label +that does not exist on the element is a no-op. + +[gremlin-groovy] +---- +conf = new BaseConfiguration() +conf.setProperty("gremlin.tinkergraph.vertexLabelCardinality", "ZERO_OR_MORE") +graph = TinkerGraph.open(conf) +g = traversal().with(graph) +v = g.addV('person').property('name','marko').addLabel('employee').addLabel('manager').next() +g.V(v).labels() +g.V(v).dropLabel('manager').labels() +g.V(v).dropLabels().labels() Review Comment: how about a `g.V().labels().count()` to confirm the drop of all at the end? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
