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

Method opt

basex-core/src/main/java/org/basex/query/func/db/DbNodeId.java:83–93  ·  view source on GitHub ↗
(final CompileContext cc)

Source from the content-addressed store, hash-verified

81 }
82
83 @Override
84 protected final Expr opt(final CompileContext cc) throws QueryException {
85 final Expr nodes = arg(0);
86 final Data data = nodes.data();
87 if(data != null && !data.meta.updindex && !(this instanceof DbNodePre)) {
88 // no ID-PRE mapping: work with PRE values
89 return cc.function(_DB_NODE_PRE, info, nodes);
90 }
91 exprType.assign(seqType(), nodes.seqType().occ, nodes.size());
92 return this;
93 }
94
95 @Override
96 public final Expr simplifyFor(final Simplify mode, final CompileContext cc)

Callers

nothing calls this directly

Calls 7

dataMethod · 0.95
seqTypeMethod · 0.95
sizeMethod · 0.95
seqTypeMethod · 0.65
argMethod · 0.45
functionMethod · 0.45
assignMethod · 0.45

Tested by

no test coverage detected