MCPcopy Create free account
hub / github.com/Permify/permify / HasNext

Method HasNext

pkg/database/iterators.go:56–59  ·  view source on GitHub ↗

HasNext checks if there is a next Tuple in either of the two TupleIterators.

()

Source from the content-addressed store, hash-verified

54
55// HasNext checks if there is a next Tuple in either of the two TupleIterators.
56func (i *UniqueTupleIterator) HasNext() bool {
57 // If either iterator has a next Tuple, return true
58 return i.iterator1.HasNext() || i.iterator2.HasNext()
59}
60
61// GetNext returns the next unique Tuple from the two TupleIterators.
62func (i *UniqueTupleIterator) GetNext() (*base.Tuple, bool) {

Callers 12

TestUniqueTupleIteratorFunction · 0.95
expandDirectRelationMethod · 0.95
expandTupleToUserSetMethod · 0.95
relationEntranceMethod · 0.95
pathChainEntranceMethod · 0.95
checkDirectRelationMethod · 0.95
checkTupleToUserSetMethod · 0.95

Calls 1

HasNextMethod · 0.45

Tested by 2

TestUniqueTupleIteratorFunction · 0.76