/** * 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); } }
Date value = rs.getDate(columnIndex); v = value == null ? (Value) ValueNull.INSTANCE : ValueDate.get(value); break;
return LocalDateTimeUtils.localDateToDateValue(obj); return ValueDate.get((Date)obj);
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);
public static Value convertDateToUniversal(Date x, Calendar source) throws SQLException { return ValueDate.get(new Date(getUniversalTime(source, x))); }
/** * Converts a LocalDate to a Value. * * @param localDate the LocalDate to convert, not {@code null} * @return the value */ public static Value localDateToDateValue(Object localDate) { try { Date date = (Date) DATE_VALUE_OF.invoke(null, localDate); return ValueDate.get(date); } catch (IllegalAccessException e) { throw DbException.convert(e); } catch (InvocationTargetException e) { throw DbException.convertInvocation(e, "date conversion failed"); } }
/** * 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 */ public void updateDate(int columnIndex, Date x) throws SQLException { try { if (debug()) { debugCode("updateDate("+columnIndex+", x);"); } update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x)); } catch (Throwable e) { throw logAndConvert(e); } }
/** * 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 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 columnName the name of the column label * @param x the value * @throws SQLException if the result set is closed */ public void updateDate(String columnName, Date x) throws SQLException { try { if (debug()) { debugCode("updateDate("+quote(columnName)+", x);"); } update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x)); } catch (Throwable 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 */ public void setDate(int parameterIndex, java.sql.Date x) throws SQLException { try { if (debug()) { debugCode("setDate("+parameterIndex+", " + quoteDate(x) + ");"); } Value v = x == null ? (Value) ValueNull.INSTANCE : ValueDate.get(x); setParameter(parameterIndex, v); } catch (Throwable 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); } }
/** * 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); } }
/** * 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); } }
return ValueUuid.get(uuid.getMostSignificantBits(), uuid.getLeastSignificantBits()); case Value.DATE: return ValueDate.get((Date)obj); case Value.TIME: return ValueTime.get((Time)obj);
return LocalDateTimeUtils.localDateToDateValue(obj); return ValueDate.get((Date)obj);