Interface VectorMetaData
-
public interface VectorMetaDataMetadata for a VECTOR column or parameter.- Since:
- 23.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Class<?>arrayClass()Returns the preferred array class for conversions of the VECTOR described by this meta data.booleanisSparse()Returns true if the VECTOR described by this metadata has a SPARSE encoding.intlength()Returns the number of values (ie: dimensions) in the VECTOR described by this metadata, or-1if the VECTOR has a variable length.OracleTypetype()Returns the type of the VECTOR described by this metadata.
-
-
-
Method Detail
-
length
int length()
Returns the number of values (ie: dimensions) in the VECTOR described by this metadata, or-1if 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. TheOracleTypereturned 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
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 adouble[]is preferred when converting a VECTOR of FLOAT64 values.A lossless conversion is guaranteed when the preferred array class is provided as the
typeargument togetObjectmethods ofResultSetandCallableStatement, or when an instance of the preferred array class is provided as thexargument, along withOracleType.VECTORas thetargetSqlTypeargument, tosetObjectmethods ofPreparedStatementandCallableStatement.The
setObjectandgetObjectmethods 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.
-
-