Class KeyOnlyPreparedStatementProcessor

java.lang.Object
com.linkedin.venice.sql.KeyOnlyPreparedStatementProcessor
All Implemented Interfaces:
PreparedStatementProcessor
Direct Known Subclasses:
KeyValuePreparedStatementProcessor

public class KeyOnlyPreparedStatementProcessor extends Object implements PreparedStatementProcessor
This class provides plumbing to plug the fields of Avro records into a PreparedStatement.
  • Method Details

    • process

      public void process(org.apache.avro.generic.GenericRecord key, org.apache.avro.generic.GenericRecord value, PreparedStatement preparedStatement)
      Specified by:
      process in interface PreparedStatementProcessor
    • processKey

      protected void processKey(org.apache.avro.generic.GenericRecord key, PreparedStatement preparedStatement) throws SQLException
      Throws:
      SQLException
    • populateArrays

      protected void populateArrays(int index, @Nonnull org.apache.avro.Schema schema, @Nonnull int[] avroFieldIndexToJdbcIndexMapping, @Nonnull int[] avroFieldIndexToUnionBranchIndex, @Nonnull JDBCType[] avroFieldIndexToCorrespondingType, @Nonnull Set<String> columnsToProject)
    • getLastKeyJdbcIndex

      protected final int getLastKeyJdbcIndex()
    • processRecord

      protected void processRecord(org.apache.avro.generic.GenericRecord record, PreparedStatement preparedStatement, int[] avroFieldIndexToJdbcIndexMapping, int[] avroFieldIndexToUnionBranchIndex, JDBCType[] avroFieldIndexToCorrespondingType) throws SQLException
      Throws:
      SQLException