예제 #1
0
 @Override
 public Filter copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) {
   final Filter f =
       new CachedFilter(
           info, root == null ? null : root.copy(qc, scp, vs), Arr.copyAll(qc, scp, vs, preds));
   return copy(new IterFilter(f));
 }
예제 #2
0
  @Override
  public GroupBy copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) {
    // copy the pre-grouping expressions
    final Expr[] pEx = Arr.copyAll(qc, scp, vs, preExpr);

    // create fresh copies of the post-grouping variables
    final Var[] ps = new Var[post.length];
    final int pl = ps.length;
    for (int p = 0; p < pl; p++) {
      final Var old = post[p];
      ps[p] = scp.addCopy(old, qc);
      vs.put(old.id, ps[p]);
    }

    // done
    return new GroupBy(Arr.copyAll(qc, scp, vs, specs), pEx, ps, nonOcc, info);
  }
예제 #3
0
파일: FTWords.java 프로젝트: jefferya/basex
 @Override
 public FTExpr copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) {
   final FTWords ftw =
       new FTWords(
           info,
           query.copy(qc, scp, vs),
           mode,
           occ == null ? null : Arr.copyAll(qc, scp, vs, occ));
   if (ftt != null) ftw.ftt = ftt.copy(ftw);
   ftw.tokens = tokens;
   ftw.data = data;
   ftw.first = first;
   ftw.pos = pos;
   ftw.fast = fast;
   return ftw;
 }
예제 #4
0
 @Override
 public IterPath copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) {
   final Expr rt = root == null ? null : root.copy(qc, scp, vs);
   return copyType(new IterPath(info, rt, Arr.copyAll(qc, scp, vs, steps)));
 }
예제 #5
0
 @Override
 public Expr compile(final QueryContext ctx, final VarScope scp) throws QueryException {
   super.compile(ctx, scp);
   return allAreValues() ? preEval(ctx) : this;
 }
예제 #6
0
파일: Transform.java 프로젝트: nikhi/basex
 @Override
 public Expr compile(final QueryContext ctx, final VarScope scp) throws QueryException {
   for (final Let c : copies) c.expr = c.expr.compile(ctx, scp);
   super.compile(ctx, scp);
   return this;
 }
예제 #7
0
 @Override
 public Expr compile(final QueryContext ctx, final VarScope scp) throws QueryException {
   super.compile(ctx, scp);
   return optimize(ctx, scp);
 }
예제 #8
0
파일: IterMap.java 프로젝트: fpapai/basex
 @Override
 public IterMap copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) {
   return copyType(new IterMap(info, Arr.copyAll(qc, scp, vs, exprs)));
 }