Skip to content

Conversation

@n0tl3ss
Copy link
Member

@n0tl3ss n0tl3ss commented Dec 8, 2025

No description provided.

@dstepanov
Copy link
Contributor

Can you try to implement it without changes in DataType and get/set mapping?

The idea would be to use DataType.OBJECT and use a custom AttributeConverter where the context is JdbcConversionContext/R2dbcConversionContext there we should probably also add the current dialect; by that we can fetch some dialect specific vector helper. (See PostgresEnumsSpec as an example to use it).
The vector data classes should be annotated with @TypeDef. We might want to introduce a new runtime interface that can also be implemented by AttributeConverter to let the schema generator know what type to put.

The idea would be to implement it in almost non-invasive way so other things like geo etc can be supported as well easily.


Supported platforms (since 5.0.0):
- Oracle Database 23ai VECTOR columns (JDBC and R2DBC)
- PostgreSQL pgvector (JDBC and R2DBC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to add MySQL vector support as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added only for jdbc


OptionalInt len = SqlQueryBuilderUtils.findPersistenceColumnValue(annotationMetadata, "length");

Class<?> converterClass = prop.getAnnotationMetadata().classValue(MappedProperty.class, "converter").orElse(null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use TypeDef

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can't be used since the property doesn't have TypeDef it has only MappedProperty and data from TypeDef was copied to MappedProperty in the visitor

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants