Skip to content

Commit

Permalink
Merge pull request #313 from ikeyan/add-has-label-with-predicate
Browse files Browse the repository at this point in the history
add hasLabel(P[Label])
  • Loading branch information
mpollmeier committed Sep 21, 2022
2 parents 21a73e6 + 5b5174b commit 479e0ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gremlin-scala/src/main/scala/gremlin/scala/GremlinScala.scala
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,9 @@ class GremlinScala[End](val traversal: GraphTraversal[_, End]) {
def hasLabel(label: String, labels: String*)(implicit ev: End <:< Element) =
GremlinScala[End, Labels](traversal.hasLabel(label, labels: _*))

def hasLabel(predicate: P[Label])(implicit ev: End <:< Element) =
GremlinScala[End, Labels](traversal.hasLabel(predicate))

def hasLabel[CC <: Product: ru.WeakTypeTag]()(
implicit ev: End <:< Element): GremlinScala.Aux[End, Labels] = {
val tpe = implicitly[ru.WeakTypeTag[CC]].tpe
Expand Down

0 comments on commit 479e0ea

Please sign in to comment.