Example #1
0
 @Override
 public FTExpr compile(final CompileContext cc) throws QueryException {
   super.compile(cc);
   boolean not = true;
   for (final FTExpr expr : exprs) not &= expr instanceof FTNot;
   if (not) {
     // convert (!A and !B and ...) to !(A or B or ...)
     final int es = exprs.length;
     for (int e = 0; e < es; ++e) exprs[e] = exprs[e].exprs[0];
     return new FTNot(info, new FTOr(info, exprs));
   }
   return this;
 }