MCPcopy Create free account
hub / github.com/BaseXdb/basex / valueIter

Method valueIter

basex-core/src/main/java/org/basex/query/expr/Lookup.java:138–149  ·  view source on GitHub ↗
(final Item item)

Source from the content-addressed store, hash-verified

136 }
137
138 private Iter valueIter(final Item item) throws QueryException {
139 final ValueBuilder vb = new ValueBuilder(qc);
140 final Iter keyIter = exprs[1].atomIter(qc, info);
141 for(Item key; (key = keyIter.next()) != null;) {
142 final Value items = item instanceof final JNode jnode ? jnode.value.item(qc, info) : item;
143 for(final Item it : items) {
144 if(!(it instanceof final XQStruct struct)) throw LOOKUP_X.get(info, it);
145 vb.add(key == WILDCARD ? struct.items(qc) : struct.invoke(qc, info, key));
146 }
147 }
148 return vb.value().iter();
149 }
150 };
151 }
152

Callers 1

nextMethod · 0.95

Calls 9

nextMethod · 0.95
addMethod · 0.95
valueMethod · 0.95
getMethod · 0.65
invokeMethod · 0.65
iterMethod · 0.65
atomIterMethod · 0.45
itemMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected