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

Method GetNext

pkg/database/iterators.go:30–37  ·  view source on GitHub ↗

GetNext - Get next tuple

()

Source from the content-addressed store, hash-verified

28
29// GetNext - Get next tuple
30func (i *TupleIterator) GetNext() *base.Tuple {
31 if i.HasNext() {
32 tup := i.tuples[i.index]
33 i.index++
34 return tup
35 }
36 return nil
37}
38
39// UniqueTupleIterator combines two TupleIterators and ensures that only unique Tuples are returned.
40// Uniqueness is based on the Tuple's pointer address.

Callers 15

TestGetNextReturnsNilFunction · 0.95
TestTupleIteratorFunction · 0.45
TestSubjectIteratorFunction · 0.45
TestAttributeIteratorFunction · 0.45
TestEntityIteratorFunction · 0.45
GetNextMethod · 0.45
GetNextMethod · 0.45
batchInsertAttributesMethod · 0.45

Calls 1

HasNextMethod · 0.95

Tested by 15

TestGetNextReturnsNilFunction · 0.76
TestTupleIteratorFunction · 0.36
TestSubjectIteratorFunction · 0.36
TestAttributeIteratorFunction · 0.36
TestEntityIteratorFunction · 0.36
TestQueryAttributes1Function · 0.36
TestQueryAttributes2Function · 0.36
TestQueryAttributes4Function · 0.36
TestQueryRelationships1Function · 0.36
TestQueryRelationships2Function · 0.36
TestQueryRelationships3Function · 0.36
TestQueryRelationships4Function · 0.36