/** * 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 updateDate(int columnIndex, Date x) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateDate(" + columnIndex + ", x);"); } update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueDate.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 updateDate(String columnLabel, Date x) throws SQLException { try { if (isDebugEnabled()) { debugCode("updateDate(" + quote(columnLabel) + ", x);"); } update(columnLabel, x == null ? (Value) ValueNull.INSTANCE : ValueDate.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 setDate(int parameterIndex, java.sql.Date x) throws SQLException { try { if (isDebugEnabled()) { debugCode("setDate(" + parameterIndex + ", " + quoteDate(x) + ");"); } Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x); setParameter(parameterIndex, v); } catch (Exception e) { throw logAndConvert(e); } }
v = value == null ? (Value) ValueNull.INSTANCE : ValueDate.get(value); break;
return ValueBytes.get((byte[]) x); } else if (x instanceof Date) { return ValueDate.get((Date) x); } else if (x instanceof Time) { return ValueTime.get((Time) x);
value = ValueTime.fromNanos(0); } else if (dt.type == Value.DATE) { value = ValueDate.get(new Date(session.getTransactionStart())); } else { value = ValueString.get("").convertTo(type);
long now = session.getTransactionStart(); result = ValueDate.get(new Date(now)); break;