/** * Updates a column in the current or insert row. * * @param columnIndex (1,2,...) * @param x the value * @throws SQLException if the result set is closed or not updatable */ @Override public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateTimestamp(" + columnIndex + ", x);"); } update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x)); } catch (Exception e) { throw logAndConvert(e); } }
/** * Updates a column in the current or insert row. * * @param columnLabel the column label * @param x the value * @throws SQLException if the result set is closed or not updatable */ @Override public void updateTimestamp(String columnLabel, Timestamp x) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateTimestamp(" + quote(columnLabel) + ", x);"); } update(columnLabel, x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x)); } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the value of a parameter. * * @param parameterIndex the parameter index (1, 2, ...) * @param x the value * @throws SQLException if this object is closed */ @Override public void setTimestamp(int parameterIndex, java.sql.Timestamp x) throws SQLException { try { if (isDebugEnabled()) { debugCode("setTimestamp(" + parameterIndex + ", " + quoteTimestamp(x) + ");"); } Value v = x == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(x); setParameter(parameterIndex, v); } catch (Exception e) { throw logAndConvert(e); } }
Timestamp value = rs.getTimestamp(columnIndex); v = value == null ? (Value) ValueNull.INSTANCE : ValueTimestamp.get(value); break;
return ValueTime.get((Time) x); } else if (x instanceof Timestamp) { return ValueTimestamp.get((Timestamp) x); } else if (x instanceof java.util.Date) { return ValueTimestamp.fromMillis(((java.util.Date) x).getTime());
break; case DATE_ADD: result = ValueTimestamp.get(dateadd( v0.getString(), v1.getInt(), v2.getTimestamp())); break;