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

Method Item

lex/lexer.go:83–91  ·  view source on GitHub ↗

Item returns the current item.

()

Source from the content-addressed store, hash-verified

81
82// Item returns the current item.
83func (p *ItemIterator) Item() Item {
84 if p.idx < 0 || p.idx >= len(p.l.items) {
85 return Item{
86 line: -1, // using negative numbers to indicate out-of-range item
87 column: -1,
88 }
89 }
90 return (p.l.items)[p.idx]
91}
92
93// Prev moves the index back by one.
94func (p *ItemIterator) Prev() bool {

Callers 15

ParseMutationFunction · 0.80
parseUpsertBlockFunction · 0.80
parseMutationBlockFunction · 0.80
parseMutationOpFunction · 0.80
ParseDQLFunction · 0.80
ParseWithNeedVarsFunction · 0.80
getVariablesAndQueryFunction · 0.80
parseRecurseArgsFunction · 0.80
getQueryFunction · 0.80
getFragmentFunction · 0.80
parseListItemNamesFunction · 0.80
parseSchemaPredsOrTypesFunction · 0.80

Calls

no outgoing calls

Tested by 15

TestQueryLexingFunction · 0.64
TestMutationLexingFunction · 0.64
TestNewSchemaQueryFunction · 0.64
TestAbruptSchemaQueryFunction · 0.64
TestAbruptMutationFunction · 0.64
TestVariables1Function · 0.64
TestVariables2Function · 0.64
TestVariablesDefaultFunction · 0.64
TestIRIRefFunction · 0.64
TestLangSupportFunction · 0.64
TestMultiLangSupportFunction · 0.64