Class PostgreSQLVectorType
java.lang.Object
io.hypersistence.utils.hibernate.type.ImmutableType<float[]>
io.hypersistence.utils.hibernate.type.basic.PostgreSQLVectorType
- All Implemented Interfaces:
Serializable,org.hibernate.type.Type,org.hibernate.usertype.EnhancedUserType<float[]>,org.hibernate.usertype.UserType<float[]>
Maps a
float[] object type to a PostgreSQL pgvector
vector column type.
This implementation does not require the pgvector-java library on the classpath.
Instead, it builds the underlying org.postgresql.util.PGobject via reflection,
the same way PostgreSQLInetType and PostgreSQLMacAddressType do for other
PostgreSQL-specific column types.
- Author:
- Chirag Gupta
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPostgreSQLVectorType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext) -
Method Summary
Modifier and TypeMethodDescriptionfloat[]fromStringValue(CharSequence sequence) float[]get(ResultSet rs, int position, org.hibernate.engine.spi.SharedSessionContractImplementor session, Object owner) Get the column value from the JDBCResultSet.intvoidset(PreparedStatement st, float[] value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) Set the column value on the provided JDBCPreparedStatement.Methods inherited from class io.hypersistence.utils.hibernate.type.ImmutableType
assemble, assemble, beforeAssemble, compare, compare, deepCopy, deepCopy, disassemble, disassemble, equals, getColumnSpan, getConfiguration, getHashCode, getHashCode, getName, getReturnedClass, getSqlTypeCodes, hashCode, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isDirty, isDirty, isEntityType, isEqual, isEqual, isModified, isMutable, isSame, nullSafeGet, nullSafeSet, nullSafeSet, replace, replace, replace, returnedClass, toColumnNullness, toLoggableString, toSqlLiteral, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.type.Type
disassemble, getReturnedClassName, getTypeForEqualsHashCodeMethods inherited from interface org.hibernate.usertype.UserType
getDefaultSqlLength, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlPrecision, getDefaultSqlScale, getDefaultSqlScale, getValueConverter, isComparable, nullSafeGet, nullSafeSet
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PostgreSQLVectorType
public PostgreSQLVectorType() -
PostgreSQLVectorType
public PostgreSQLVectorType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext)
-
-
Method Details
-
getSqlType
public int getSqlType() -
fromStringValue
- Throws:
org.hibernate.HibernateException
-