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

Method emptyExpr

basex-core/src/main/java/org/basex/query/expr/Arr.java:167–173  ·  view source on GitHub ↗

Returns the first expression that yields an empty sequence. If all expressions return non-empty results, the original expression is returned. @return empty or original expression

()

Source from the content-addressed store, hash-verified

165 * @return empty or original expression
166 */
167 final Expr emptyExpr() {
168 // pre-evaluate if one value is empty (e.g.: () = local:expensive() )
169 for(final Expr expr : exprs) {
170 if(expr.seqType().zero()) return expr;
171 }
172 return this;
173 }
174
175 /**
176 * Tries to merge consecutive EBV tests.

Callers 5

optimizeMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80

Calls 2

zeroMethod · 0.80
seqTypeMethod · 0.65

Tested by

no test coverage detected