Interface TimestampWriter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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 TypeMethodDescriptionvoidwriteTimestamp(PreparedStatement preparedStatement, int position, Instant timestamp) Write a timestamp from aInstantto 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 aInstantto a data value suitable for the database scheme.- Parameters:
preparedStatement- the statement to updateposition- the position of the timestamp parameter in the statementtimestamp-Instantto convert- Throws:
SQLException- if modification of the statement fails
-