Examples of ResultSetReader


Examples of net.sourceforge.squirrel_sql.fw.sql.ResultSetReader

                                                                     computeWidths);
         _dataSetDefinition = new DataSetDefinition(colDefs);

         // Read the entire row, since some drivers complain if columns are
         // read out of sequence
         rdr = new ResultSetReader(rs, dialectType);
         Object[] row = null;

         while (true) {
            if (useColumnDefs)
               row = rdr.readRow(colDefs);
View Full Code Here

Examples of org.apache.oozie.util.db.SqlStatement.ResultSetReader

     */
    @Override
    public WorkflowInstance get(String id) throws WorkflowException {
        ParamChecker.notNull(id, "id");
        try {
            ResultSetReader rs = SqlStatement.parse(SqlStatement.selectColumns(OozieColumn.PI_state).where(
                    SqlStatement.isEqual(OozieColumn.PI_wfId, ParamChecker.notNull(id, "id"))).
                    prepareAndSetValues(connection).executeQuery());
            rs.next();
            LiteWorkflowInstance pInstance = WritableUtils.fromByteArray(rs.getByteArray(OozieColumn.PI_state),
                                                                         LiteWorkflowInstance.class);
            return pInstance;
        }
        catch (SQLException e) {
            throw new WorkflowException(ErrorCode.E0713, e.getMessage(), e);
View Full Code Here

Examples of org.apache.oozie.util.db.SqlStatement.ResultSetReader

     */
    @Override
    public WorkflowInstance get(String id) throws WorkflowException {
        ParamChecker.notNull(id, "id");
        try {
            ResultSetReader rs = SqlStatement.parse(SqlStatement.selectColumns(OozieColumn.PI_state).where(
                    SqlStatement.isEqual(OozieColumn.PI_wfId, ParamChecker.notNull(id, "id"))).
                    prepareAndSetValues(connection).executeQuery());
            rs.next();
            LiteWorkflowInstance pInstance = WritableUtils.fromByteArray(rs.getByteArray(OozieColumn.PI_state),
                                                                         LiteWorkflowInstance.class);
            return pInstance;
        }
        catch (SQLException e) {
            throw new WorkflowException(ErrorCode.E0713, e.getMessage(), e);
View Full Code Here

Examples of org.apache.oozie.util.db.SqlStatement.ResultSetReader

     */
    @Override
    public WorkflowInstance get(String id) throws WorkflowException {
        ParamChecker.notNull(id, "id");
        try {
            ResultSetReader rs = SqlStatement.parse(SqlStatement.selectColumns(OozieColumn.PI_state).where(
                    SqlStatement.isEqual(OozieColumn.PI_wfId, ParamChecker.notNull(id, "id"))).
                    prepareAndSetValues(connection).executeQuery());
            rs.next();
            LiteWorkflowInstance pInstance = WritableUtils.fromByteArray(rs.getByteArray(OozieColumn.PI_state),
                                                                         LiteWorkflowInstance.class);
            return pInstance;
        }
        catch (SQLException e) {
            throw new WorkflowException(ErrorCode.E0713, e.getMessage(), e);
View Full Code Here

Examples of org.apache.oozie.util.db.SqlStatement.ResultSetReader

     */
    @Override
    public WorkflowInstance get(String id) throws WorkflowException {
        ParamChecker.notNull(id, "id");
        try {
            ResultSetReader rs = SqlStatement.parse(SqlStatement.selectColumns(OozieColumn.PI_state).where(
                    SqlStatement.isEqual(OozieColumn.PI_wfId, ParamChecker.notNull(id, "id"))).
                    prepareAndSetValues(connection).executeQuery());
            rs.next();
            LiteWorkflowInstance pInstance = WritableUtils.fromByteArray(rs.getByteArray(OozieColumn.PI_state),
                                                                         LiteWorkflowInstance.class);
            return pInstance;
        }
        catch (SQLException e) {
            throw new WorkflowException(ErrorCode.E0713, e.getMessage(), e);
View Full Code Here

Examples of org.teiid.script.io.ResultSetReader

    }
   
    public void assertResultsSetEquals(ResultSet resultSet, File expected) {
        assertNotNull(resultSet);       
        try {
            writeResultSet(expected, new BufferedReader(new ResultSetReader(resultSet, DELIMITER)));
            if (resultSet.getType() != ResultSet.TYPE_FORWARD_ONLY) {
              resultSet.beforeFirst();
            }
            assertReaderEquals(new ResultSetReader(resultSet, DELIMITER), new FileReader(expected));
        } catch (IOException e) {
          throw new RuntimeException(e);
        } catch (SQLException e) {
          throw new RuntimeException(e);
        }
View Full Code Here

Examples of org.teiid.script.io.ResultSetReader

      assertResultsSetEquals(this.internalResultSet, expected);
    }
   
    public void assertResultsSetEquals(ResultSet resultSet,String expected) {
        assertNotNull(resultSet);
        assertReaderEquals(new ResultSetReader(resultSet, DELIMITER), new StringReader(expected));
    }
View Full Code Here

Examples of org.teiid.script.io.ResultSetReader

      assertResultsSetEquals(this.internalResultSet, expected);
    }
   
    public void assertResultsSetEquals(ResultSet resultSet, String[] expected) {
        assertNotNull(resultSet);
        assertReaderEquals(new ResultSetReader(resultSet, DELIMITER), new StringArrayReader(expected));
    }
View Full Code Here

Examples of org.teiid.script.io.ResultSetReader

            return;
        }       
        int row;
        try {
            row = -1;
            BufferedReader in = new BufferedReader(new ResultSetReader(results, DELIMITER));
            String line = in.readLine();
            while(line != null) {
                row++;
                if (comparePrint) {
                    line=line.replaceAll("\"", "\\\\\""); //$NON-NLS-1$ //$NON-NLS-2$
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.