Interface ColumnBinder

All Known Implementing Classes:
BaseColumnBinder, BigIntBinder, BitBinder, DateDayBinder, DateMilliBinder, Decimal128Binder, Decimal256Binder, FixedSizeBinaryBinder, Float4Binder, Float8Binder, IntBinder, ListBinder, MapBinder, NullableColumnBinder, SmallIntBinder, Time32Binder, Time64Binder, TimeStampBinder, TinyIntBinder, VarBinaryBinder, VarCharBinder

public interface ColumnBinder
A helper to bind values from a wrapped Arrow vector to a JDBC PreparedStatement.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bind(PreparedStatement statement, int parameterIndex, int rowIndex)
    Bind the given row to the given parameter.
    Create a column binder for a vector, using the default JDBC type code for null values.
    forVector(FieldVector vector, Integer jdbcType)
    Create a column binder for a vector, overriding the JDBC type code used for null values.
    int
    Get the JDBC type code used by this binder.
    Get the vector used by this binder.
  • Method Details

    • bind

      void bind(PreparedStatement statement, int parameterIndex, int rowIndex) throws SQLException
      Bind the given row to the given parameter.
      Parameters:
      statement - The statement to bind to.
      parameterIndex - The parameter to bind to (1-indexed)
      rowIndex - The row to bind values from (0-indexed)
      Throws:
      SQLException - if an error occurs
    • getJdbcType

      int getJdbcType()
      Get the JDBC type code used by this binder.
      Returns:
      A type code from Types.
    • getVector

      FieldVector getVector()
      Get the vector used by this binder.
    • forVector

      static ColumnBinder forVector(FieldVector vector)
      Create a column binder for a vector, using the default JDBC type code for null values.
    • forVector

      static ColumnBinder forVector(FieldVector vector, Integer jdbcType)
      Create a column binder for a vector, overriding the JDBC type code used for null values.
      Parameters:
      vector - The vector that the column binder will wrap.
      jdbcType - The JDBC type code to use (or null to use the default).