Beispiel #1
0
 @Override
 public String toString() {
   return new TokenBuilder(DB_PREFIX)
       .add(':')
       .add(index.type().toString().toLowerCase(Locale.ENGLISH))
       .add("-range(")
       .addExt(index.min)
       .add(SEP)
       .addExt(index.max)
       .add(')')
       .toString();
 }
Beispiel #2
0
  @Override
  public BasicNodeIter iter(final QueryContext qc) {
    final byte kind = index.type() == IndexType.TEXT ? Data.TEXT : Data.ATTR;

    return new BasicNodeIter() {
      final IndexIterator it = ictx.data.iter(index);

      @Override
      public ANode next() {
        return it.more() ? new DBNode(ictx.data, it.pre(), kind) : null;
      }
    };
  }
Beispiel #3
0
  @Override
  public AxisIter iter(final QueryContext ctx) {
    final Data data = ictx.data;
    final byte kind = ind.type() == IndexType.TEXT ? Data.TEXT : Data.ATTR;

    return new AxisIter() {
      final IndexIterator it = data.iter(ind);

      @Override
      public ANode next() {
        return it.more() ? new DBNode(data, it.next(), kind) : null;
      }
    };
  }
Beispiel #4
0
 @Override
 public void plan(final FElem plan) {
   addPlan(
       plan,
       planElem(DATA, ictx.data.meta.name, MIN, index.min, MAX, index.max, TYPE, index.type()));
 }