public interface VectorMetaData
Modifier and Type | Method and Description |
---|---|
java.lang.Class<?> |
arrayClass()
Returns the preferred array class for conversions of the VECTOR described
by this meta data.
|
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. |
OracleType |
type()
Returns the type of the VECTOR described by this metadata.
|
int length()
-1
if the VECTOR has a variable length.-1
.OracleType type()
OracleType
returned by this method is one of the following:
OracleType.VECTOR
OracleType.VECTOR_FLOAT64
OracleType.VECTOR_FLOAT32
OracleType.VECTOR_INT8
java.lang.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.