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

Method invert

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

Source from the content-addressed store, hash-verified

85 }
86
87 @Override
88 public Expr invert(final CompileContext cc) throws QueryException {
89 if(exact()) {
90 final Expr pos = cc.function(Function.POSITION, info);
91 return new CmpG(info, pos, Itr.get(min), CmpOp.NE).optimize(cc);
92 }
93 return min == 1 ? get(max + 1, MAX_VALUE, info) :
94 max == MAX_VALUE ? get(1, min - 1, info) : null;
95 }
96
97 @Override
98 public Expr mergeEbv(final Expr ex, final boolean or, final CompileContext cc) {

Callers

nothing calls this directly

Calls 5

exactMethod · 0.95
getMethod · 0.95
getMethod · 0.95
functionMethod · 0.45
optimizeMethod · 0.45

Tested by

no test coverage detected