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

Method toUnion

basex-core/src/main/java/org/basex/query/expr/List.java:261–264  ·  view source on GitHub ↗

If possible, rewrites the list to a union expression. @param cc compilation context @return union or original expression @throws QueryException query exception

(final CompileContext cc)

Source from the content-addressed store, hash-verified

259 * @throws QueryException query exception
260 */
261 public Expr toUnion(final CompileContext cc) throws QueryException {
262 return seqType().type instanceof NodeType ?
263 cc.replaceWith(this, new Union(info, exprs)).optimize(cc) : this;
264 }
265
266 /**
267 * If possible, rewrites the list to a range sequence.

Callers 2

simplifyForMethod · 0.95
optMethod · 0.45

Calls 3

replaceWithMethod · 0.80
seqTypeMethod · 0.65
optimizeMethod · 0.45

Tested by

no test coverage detected