Class AvaticaParameterBinder
java.lang.Object
org.apache.arrow.driver.jdbc.utils.AvaticaParameterBinder
Convert Avatica PreparedStatement parameters from a list of TypedValue to Arrow and bind them to
the VectorSchemaRoot representing the PreparedStatement parameters.
NOTE: Make sure to close the parameters VectorSchemaRoot once we're done with them.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ArrowTypeVisitor that binds Avatica TypedValues to the given FieldVector at the specified index. -
Constructor Summary
ConstructorDescriptionAvaticaParameterBinder
(ArrowFlightSqlClientHandler.PreparedStatement preparedStatement, BufferAllocator bufferAllocator) Instantiate a new AvaticaParameterBinder. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Bind the given Avatica values to the prepared statement.void
Bind the given Avatica values to the prepared statement at the given index.
-
Constructor Details
-
AvaticaParameterBinder
public AvaticaParameterBinder(ArrowFlightSqlClientHandler.PreparedStatement preparedStatement, BufferAllocator bufferAllocator) Instantiate a new AvaticaParameterBinder.- Parameters:
preparedStatement
- The PreparedStatement to bind parameters to.bufferAllocator
- The BufferAllocator to use for allocating memory.
-
-
Method Details
-
bind
Bind the given Avatica values to the prepared statement.- Parameters:
typedValues
- The parameter values.
-
bind
Bind the given Avatica values to the prepared statement at the given index.- Parameters:
typedValues
- The parameter values.index
- index for parameter.
-