Examples of wasNull()


Examples of java.sql.ResultSet.wasNull()

      vals[i - 1] =  dd;
    }
    break;
  case BYTE:
    byte by = rs.getByte(i);
    if (rs.wasNull()) {
      vals[i - 1] = Utils.missingValue();
    } else {
      vals[i - 1] = (double)by;
    }
    break;
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

      vals[i - 1] = (double)by;
    }
    break;
  case SHORT:
    short sh = rs.getShort(i);
    if (rs.wasNull()) {
      vals[i - 1] = Utils.missingValue();
    } else {
      vals[i - 1] = (double)sh;
    }
    break;
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

      vals[i - 1] = (double)sh;
    }
    break;
  case INTEGER:
    int in = rs.getInt(i);
    if (rs.wasNull()) {
      vals[i - 1] = Utils.missingValue();
    } else {
      vals[i - 1] = (double)in;
    }
    break;
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

      vals[i - 1] = (double)in;
    }
    break;
  case LONG:
    long lo = rs.getLong(i);
    if (rs.wasNull()) {
      vals[i - 1] = Utils.missingValue();
    } else {
      vals[i - 1] = (double)lo;
    }
    break;
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

      vals[i - 1] = (double)lo;
    }
    break;
  case FLOAT:
    float fl = rs.getFloat(i);
    if (rs.wasNull()) {
      vals[i - 1] = Utils.missingValue();
    } else {
      vals[i - 1] = (double)fl;
    }
    break;
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

      vals[i - 1] = (double)fl;
    }
    break;
  case DATE:
          Date date = rs.getDate(i);
          if (rs.wasNull()) {
      vals[i - 1] = Utils.missingValue();
    } else {
            // TODO: Do a value check here.
            vals[i - 1] = (double)date.getTime();
          }
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

            vals[i - 1] = (double)date.getTime();
          }
          break;
  case TIME:
          Time time = rs.getTime(i);
          if (rs.wasNull()) {
      vals[i - 1] = Utils.missingValue();
    } else {
            // TODO: Do a value check here.
            vals[i - 1] = (double) time.getTime();
          }
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

    Object [] result = new Object [numAttributes];
    for(int i = 1; i <= numAttributes; i++) {
      switch (translateDBColumnType(md.getColumnTypeName(i))) {
  case STRING :
    result[i - 1] = rs.getString(i);
    if (rs.wasNull()) {
      result[i - 1] = null;
    }
    break;
  case FLOAT:
  case DOUBLE:
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

    }
    break;
  case FLOAT:
  case DOUBLE:
    result[i - 1] = new Double(rs.getDouble(i));
    if (rs.wasNull()) {
      result[i - 1] = null;
    }
    break;
  default:
    throw new Exception("Unhandled SQL result type (field " + (i + 1)
View Full Code Here

Examples of java.sql.ResultSet.wasNull()

        Statement stat = conn.createStatement();
        stat.execute("create table test(id int)");
        ResultSet rs;
        rs = stat.executeQuery("call transaction_id()");
        rs.next();
        assertTrue(rs.getString(1) == null && rs.wasNull());
        stat.execute("insert into test values(1)");
        rs = stat.executeQuery("call transaction_id()");
        rs.next();
        assertTrue(rs.getString(1) == null && rs.wasNull());
        conn.setAutoCommit(false);
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.