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

Method indexAccessible

basex-core/src/main/java/org/basex/query/expr/CmpG.java:390–403  ·  view source on GitHub ↗
(final IndexInfo ii)

Source from the content-addressed store, hash-verified

388 }
389
390 @Override
391 public final boolean indexAccessible(final IndexInfo ii) throws QueryException {
392 // only equality expressions on default collation can be rewritten
393 if(op != CmpOp.EQ || sc().collation != null) return false;
394
395 Expr expr1 = exprs[0];
396 IndexType type = null;
397 if(TOKENIZE.is(expr1)) {
398 if(!(expr1.arg(0).seqType().zeroOrOne() && ((FnTokenize) expr1).whitespace())) return false;
399 expr1 = expr1.arg(0);
400 type = IndexType.TOKEN;
401 }
402 return ii.create(exprs[1], ii.type(expr1, type), info);
403 }
404
405 @Override
406 public CmpG copy(final CompileContext cc, final IntObjectMap<Var> vm) {

Callers

nothing calls this directly

Calls 8

argMethod · 0.95
zeroOrOneMethod · 0.80
whitespaceMethod · 0.80
isMethod · 0.65
seqTypeMethod · 0.65
typeMethod · 0.65
scMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected