Examples of ResultSetImpl


Examples of com.google.code.hs4j.impl.ResultSetImpl

  }

  @Override
  protected void onDone() {
    if (this.result == null) {
      this.result = new ResultSetImpl(Collections
          .<List<byte[]>> emptyList(), this.fieldList, this.encoding);
    }
  }
View Full Code Here

Examples of com.google.code.hs4j.impl.ResultSetImpl

    }
    if (!currentRow.isEmpty()) {
      rows.add(currentRow);
    }
    this.result = new ResultSetImpl(rows, this.fieldList, this.encoding);
  }
View Full Code Here

Examples of org.apache.tajo.client.ResultSetImpl

  }

  @Test
  public void test() throws IOException, SQLException {
    ResultSetImpl rs = new ResultSetImpl(null, null, conf, desc);
    ResultSetMetaData meta = rs.getMetaData();
    assertNotNull(meta);
    Schema schema = scoreMeta.getSchema();
    assertEquals(schema.getColumnNum(), meta.getColumnCount());
    for (int i = 0; i < meta.getColumnCount(); i++) {
      assertEquals(schema.getColumn(i).getColumnName(), meta.getColumnName(i + 1));
      assertEquals(schema.getColumn(i).getQualifier(), meta.getTableName(i + 1));
      assertEquals(schema.getColumn(i).getDataType().getClass().getCanonicalName(),
          meta.getColumnTypeName(i + 1));
    }

    int i = 0;
    assertTrue(rs.isBeforeFirst());
    for (; rs.next(); i++) {
      assertEquals("test"+i%100, rs.getString(1));
      assertEquals("test"+i%100, rs.getString("deptname"));
      assertEquals(i+1, rs.getInt(2));
      assertEquals(i+1, rs.getInt("score"));
    }
    assertEquals(10000, i);
    assertTrue(rs.isAfterLast());
  }
View Full Code Here

Examples of org.teiid.jdbc.ResultSetImpl

   
    Map<Integer, Integer> params = new HashMap<Integer, Integer>();
    mmcs.outParamIndexMap = params;
    params.put(Integer.valueOf(1), Integer.valueOf(1));
    params.put(Integer.valueOf(2), Integer.valueOf(2));
    ResultSetImpl rs = Mockito.mock(ResultSetImpl.class);
    mmcs.resultSet = rs;
    Mockito.stub(rs.getOutputParamValue(1)).toReturn(null);
    Mockito.stub(rs.getOutputParamValue(2)).toReturn(Boolean.TRUE);
    mmcs.getBoolean(1);
    assertTrue(mmcs.wasNull());
    assertTrue(mmcs.getBoolean(2));
    assertFalse(mmcs.wasNull());
  }
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.