Package org.teiid.query.processor

Examples of org.teiid.query.processor.BatchIterator.reset()


    BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
    bi.setBuffer(bm.createTupleBuffer(Arrays.asList(new ElementSymbol("x")), "test", TupleSourceType.PROCESSOR), true)//$NON-NLS-1$
    bi.mark();
    bi.nextTuple();
    bi.nextTuple();
    bi.reset();
    bi.nextTuple();
  }
 
  @Test public void testReset1() throws Exception {
    BatchIterator bi = new BatchIterator(new FakeRelationalNode(1, new List[] {
View Full Code Here


    TupleBuffer tb = bm.createTupleBuffer(Arrays.asList(new ElementSymbol("x")), "test", TupleSourceType.PROCESSOR);
    bi.setBuffer(tb, true)//$NON-NLS-1$
    bi.nextTuple();
    bi.mark();
    bi.nextTuple();
    bi.reset();
    assertEquals(2, bi.getCurrentIndex());
    assertEquals(2, bi.nextTuple().get(0));
  }
 
  @Test public void testReset2() throws Exception {
View Full Code Here

    bi.hasNext();
    bi.mark();
    bi.nextTuple();
    bi.nextTuple();
    assertNull(bi.nextTuple());
    bi.reset();
    bi.hasNext();
    assertEquals(1, bi.getCurrentIndex());
    assertEquals(1, bi.nextTuple().get(0));
  }
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.