Package oracle.jdbc

Interface VectorMetaData


public interface VectorMetaData
Metadata for a VECTOR column or parameter.
Since:
23.4
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the preferred array class for conversions of the VECTOR described by this meta data.
    boolean
    Returns true if the VECTOR described by this metadata has a SPARSE encoding.
    int
    Returns the number of values (ie: dimensions) in the VECTOR described by this metadata, or -1 if the VECTOR has a variable length.
    Returns the type of the VECTOR described by this metadata.
  • Method Details

    • length

      int length()
      Returns the number of values (ie: dimensions) in the VECTOR described by this metadata, or -1 if the VECTOR has a variable length.
      Returns:
      The VECTOR length, or -1.
    • type

      OracleType type()
      Returns the type of the VECTOR described by this metadata. The OracleType returned by this method is one of the following:
      OracleType.VECTOR
      A VECTOR that contains any type of value.
      OracleType.VECTOR_FLOAT64
      A VECTOR that contains 64-bit floating point numbers.
      OracleType.VECTOR_FLOAT32
      A VECTOR that contains 32-bit floating point numbers.
      OracleType.VECTOR_INT8
      A VECTOR that contains 8-bit signed integers.
      OracleType.VECTOR_BINARY
      A VECTOR that contains 1-bit integers.
      Returns:
      The VECTOR type. Not null.
    • arrayClass

      Class<?> arrayClass()

      Returns the preferred array class for conversions of the VECTOR described by this meta data.

      The preferred array class is one that can store all possible values of the VECTOR in the least number of bits without losing information. For instance, a float[] is preferred when converting a VECTOR of FLOAT32 values, and a double[] is preferred when converting a VECTOR of FLOAT64 values.

      A lossless conversion is guaranteed when the preferred array class is provided as the type argument to getObject methods of ResultSet and CallableStatement, or when an instance of the preferred array class is provided as the x argument, along with OracleType.VECTOR as the targetSqlType argument, to setObject methods of PreparedStatement and CallableStatement.

      The setObject and getObject methods may support conversions with alternative array classes. Conversions with alternative array classes may require a narrowing or widening conversion that loses information.

      Returns:
      The preferred array class. Not null.
    • isSparse

      boolean isSparse()
      Returns true if the VECTOR described by this metadata has a SPARSE encoding.
      Returns:
      true if SPARSE, or false if not.