Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit 5e8f8f7

Browse files
authored
Merge pull request #10 from vdebergue/improve-graph-ops
Improve graph ops
2 parents 634608a + a89f234 commit 5e8f8f7

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

core/src/main/scala/org/thp/scalligraph/query/Filter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ case class NotFilter(inputFilter: InputQuery[Traversal.Unk, Traversal.Unk]) exte
7777
traversal: Traversal.Unk,
7878
authContext: AuthContext
7979
): Traversal.Unk =
80-
traversal.filter(_.not(t => inputFilter(publicProperties, traversalType, t, authContext)))
80+
traversal.not(t => inputFilter(publicProperties, traversalType, t, authContext))
8181
}
8282

8383
object YesFilter extends InputQuery[Traversal.Unk, Traversal.Unk] {

core/src/main/scala/org/thp/scalligraph/traversal/TraversalOps.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,15 @@ trait TraversalOps extends TraversalPrinter {
111111
}
112112

113113
def getCount: Long = {
114-
debug("count")
115-
count._toIterator.next()
114+
val newTraversal = count
115+
newTraversal.debug("count")
116+
newTraversal._toIterator.next()
116117
}
117118

118119
def getLimitedCount(threshold: Long): Long = {
119-
debug(s"limitedCount($threshold)")
120-
limitedCount(threshold)._toIterator.next()
120+
val newTraversal = limitedCount(threshold)
121+
newTraversal.debug(s"limitedCount($threshold)")
122+
newTraversal._toIterator.next()
121123
}
122124

123125
def head: D = {

0 commit comments

Comments
 (0)