Class AvaticaParameterBinder


public class AvaticaParameterBinder extends Object
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.

  • Constructor Details

    • AvaticaParameterBinder

      public AvaticaParameterBinder(ArrowFlightSqlClientHandler.PreparedStatement preparedStatement, BufferAllocator bufferAllocator)
      Instantiate a new AvaticaParameterBinder.
      preparedStatement - The PreparedStatement to bind parameters to.
      bufferAllocator - The BufferAllocator to use for allocating memory.
  • Method Details

    • bind

      public void bind(List<org.apache.calcite.avatica.remote.TypedValue> typedValues)
      Bind the given Avatica values to the prepared statement.
      typedValues - The parameter values.
    • bind

      public void bind(List<org.apache.calcite.avatica.remote.TypedValue> typedValues, int index)
      Bind the given Avatica values to the prepared statement at the given index.
      typedValues - The parameter values.
      index - index for parameter.