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 TypeMethodDescriptionvoidbind(PreparedStatement statement, int parameterIndex, int rowIndex) Bind the given row to the given parameter.static ColumnBinderforVector(FieldVector vector) Create a column binder for a vector, using the default JDBC type code for null values.static ColumnBinderforVector(FieldVector vector, Integer jdbcType) Create a column binder for a vector, overriding the JDBC type code used for null values.intGet the JDBC type code used by this binder.Get the vector used by this binder.
-
Method Details
-
bind
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
-
getVector
FieldVector getVector()Get the vector used by this binder. -
forVector
Create a column binder for a vector, using the default JDBC type code for null values. -
forVector
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).
-