Ebean PGvector

6 views
Skip to first unread message

Ryszard Trojnacki

unread,
Oct 8, 2025, 10:47:23 AM (5 days ago) Oct 8
to Ebean ORM
Hi Rob,

I have done some work to make Ebean work with pgvector extension for Postgres.

So far I have:
1. Extended ebean-datasource module to add posibility to register PGvector types.
2. Added module for main ebean.

Ad. 1. This just adds a new listener that allows to do something with newly created connection for example do: PGvector.registerTypes(connection);

Overall I'm not sure if this is the right way to do this.
This allows for manually changing new connection settings. But for a module this makes no sens. The module should be initalized without extra manually written code like: io.ebean.core.type.ExtraTypeFactory that is in META-INF/services.

Should I change this to ServiceLoader mode?


Ad. 2. I have added a module ebean-pgvector that adds scalar types, but to do that I had also to:
- add extra types: ExtraDbTypes,
- add types to enum DbType,
- register new types in PostgresPlatform.

And now when everything is done I'm trying to run tests, but I have problem with this.
I have added PGvectorSetup and registered it in PlatformAutoConfig. I have setup this in application-test.yml, but it (Docker container) doesn't start.

What I'm missing?


-- 
Greetings,
Ryszard Trojnacki
Reply all
Reply to author
Forward
0 new messages