Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface TimestampWriter
Writer interface for writing a formatted timestamp to a PreparedStatement during updates of the database. Used in AppendEventsStatementBuilder and AppendSnapshotStatementBuilder.
Since:
4.4
Author:
Trond Marius Øvstetun
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    writeTimestamp(PreparedStatement preparedStatement, int position, Instant timestamp)
    Write a timestamp from a Instant to a data value suitable for the database scheme.
  • Method Details

    • writeTimestamp

      void writeTimestamp(PreparedStatement preparedStatement, int position, Instant timestamp) throws SQLException
      Write a timestamp from a Instant to a data value suitable for the database scheme.
      Parameters:
      preparedStatement - the statement to update
      position - the position of the timestamp parameter in the statement
      timestamp - Instant to convert
      Throws:
      SQLException - if modification of the statement fails