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

Method compile

basex-core/src/main/java/org/basex/query/expr/Mapping.java:44–56  ·  view source on GitHub ↗
(final CompileContext cc)

Source from the content-addressed store, hash-verified

42 }
43
44 @Override
45 public final Expr compile(final CompileContext cc) throws QueryException {
46 final int el = exprs.length;
47 final boolean items = items();
48 for(int e = 0; e < el; e++) {
49 final Expr expr = cc.compileOrError(exprs[e], e == 0);
50 if(e == 0) cc.pushFocus(expr, items);
51 else cc.updateFocus(expr, items);
52 exprs[e] = expr;
53 }
54 cc.removeFocus();
55 return optimize(cc);
56 }
57
58 /**
59 * Indicates if the expression maps items or values.

Callers

nothing calls this directly

Calls 6

itemsMethod · 0.95
compileOrErrorMethod · 0.80
updateFocusMethod · 0.80
removeFocusMethod · 0.80
pushFocusMethod · 0.45
optimizeMethod · 0.45

Tested by

no test coverage detected