Package com.alibaba.wasp.jdbc.value

Examples of com.alibaba.wasp.jdbc.value.Value


            }
            if (lableAliasInited == false) {
              mapColumn(aliasLabelMap, columnLabel, i++);
            }
            Pair<DataType, byte[]> typeAndValue = ret.get(columnLabel);
            Value v = Value.toValue(typeAndValue.getSecond(),
                typeAndValue.getFirst());
            values.add(v);
          }
          result.add(values.toArray(new Value[values.size()]));
          lableAliasInited = true;
View Full Code Here


   *           if this object is closed
   */
  @Override
  public void setString(int parameterIndex, String x) throws SQLException {
    try {
      Value v = x == null ? (Value) ValueNull.INSTANCE : ValueString.get(x);
      setParameter(parameterIndex, v);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

   */
  @Override
  public void setBigDecimal(int parameterIndex, BigDecimal x)
      throws SQLException {
    try {
      Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDecimal.get(x);
      setParameter(parameterIndex, v);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

   *           if this object is closed
   */
  @Override
  public void setDate(int parameterIndex, java.sql.Date x) throws SQLException {
    try {
      Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x);
      setParameter(parameterIndex, v);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

   *           if this object is closed
   */
  @Override
  public void setTime(int parameterIndex, java.sql.Time x) throws SQLException {
    try {
      Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x);
      setParameter(parameterIndex, v);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

   *           if the column is not found or if the result set is closed
   */
  @Override
  public Object getObject(int columnIndex) throws SQLException {
    try {
      Value v = get(columnIndex);
      return conn.convertToDefaultObject(v);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

   */
  @Override
  public void setTimestamp(int parameterIndex, java.sql.Timestamp x)
      throws SQLException {
    try {
      Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x);
      setParameter(parameterIndex, v);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

   *           if the column is not found or if the result set is closed
   */
  @Override
  public Object getObject(String columnLabel) throws SQLException {
    try {
      Value v = get(columnLabel);
      return conn.convertToDefaultObject(v);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

    try {
      int type = DataType.convertSQLTypeToValueType(targetSqlType);
      if (x == null) {
        setParameter(parameterIndex, ValueNull.INSTANCE);
      } else {
        Value v = DataType.convertToValue(conn.getSession(), x, type);
        setParameter(parameterIndex, v.convertTo(type));
      }
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

   */
  @Override
  public Timestamp getTimestamp(int columnIndex, Calendar calendar)
      throws SQLException {
    try {
      Value value = get(columnIndex);
      return DateTimeUtils.convertTimestamp(value, calendar);
    } catch (Exception e) {
      throw Logger.logAndConvert(log, e);
    }
  }
View Full Code Here

TOP

Related Classes of com.alibaba.wasp.jdbc.value.Value

Copyright © 2018 www.massapicom. 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.