Interface AppendEventsStatementBuilder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Contract which defines how to build a PreparedStatement for use on
JdbcEventStorageEngine.appendEvents(List, Serializer)- Since:
- 4.3
- Author:
- Lucas Campos
-
Method Summary
Modifier and TypeMethodDescriptionbuild(Connection connection, EventSchema schema, Class<?> dataType, List<? extends EventMessage<?>> events, Serializer serializer, TimestampWriter timestampWriter) Build a statement to be used atJdbcEventStorageEngine.appendEvents(List, Serializer)
-
Method Details
-
build
PreparedStatement build(Connection connection, EventSchema schema, Class<?> dataType, List<? extends EventMessage<?>> events, Serializer serializer, TimestampWriter timestampWriter) throws SQLException Build a statement to be used atJdbcEventStorageEngine.appendEvents(List, Serializer)- Parameters:
connection- The connection to the database.schema- The EventSchema to be used.dataType- The serialized type of the payload and metadata.events- The events to be added.serializer- The serializer for the payload and metadata.timestampWriter- Writer responsible for writing timestamp in the correct format for the given database.- Returns:
- the newly created
PreparedStatement. - Throws:
SQLException- when an exception occurs while creating the prepared statement.
-