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

Method item

basex-core/src/main/java/org/basex/query/func/util/UtilGet.java:20–30  ·  view source on GitHub ↗
(final QueryContext qc, final InputInfo ii)

Source from the content-addressed store, hash-verified

18 */
19public final class UtilGet extends ContextFn {
20 @Override
21 public Bln item(final QueryContext qc, final InputInfo ii) throws QueryException {
22 final Iter keys = arg(0).iter(qc);
23 final GNode node = toGNode(context(qc).item(qc, info));
24
25 for(Item item; (item = qc.next(keys)) != null;) {
26 final Item key = node instanceof final JNode jnode ? jnode.key : node.qname();
27 if(key != null && item.atomicEqual(key)) return Bln.TRUE;
28 }
29 return Bln.FALSE;
30 }
31
32 @Override
33 public int contextIndex() {

Callers

nothing calls this directly

Calls 7

qnameMethod · 0.95
atomicEqualMethod · 0.95
toGNodeMethod · 0.80
iterMethod · 0.65
nextMethod · 0.65
argMethod · 0.45
contextMethod · 0.45

Tested by

no test coverage detected