MCPcopy
hub / github.com/dgraph-io/dgraph / getFirst

Function getFirst

posting/list_test.go:217–223  ·  view source on GitHub ↗
(t *testing.T, l *List, readTs uint64)

Source from the content-addressed store, hash-verified

215}
216
217func getFirst(t *testing.T, l *List, readTs uint64) (res pb.Posting) {
218 require.NoError(t, l.Iterate(readTs, 0, func(p *pb.Posting) error {
219 res = *p
220 return ErrStopIteration
221 }))
222 return res
223}
224
225func checkValue(t *testing.T, ol *List, val string, readTs uint64) {
226 p := getFirst(t, ol, readTs)

Callers 2

TestAddMutationFunction · 0.85
checkValueFunction · 0.85

Calls 1

IterateMethod · 0.45

Tested by

no test coverage detected