testcontainers / testcontainers-java

Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
https://testcontainers.org
MIT License
7.9k stars 1.62k forks source link

[Feature]: Add support for pgvector in jdbc url's #8633

Closed thijslemmens closed 1 month ago

thijslemmens commented 2 months ago

Module

PostgreSQL

Problem

I'd like to use pgvector in my Spring boot applications. Currently, I cannot indicate this in my jdbc url like for TimeScaleDB and postgis. I would like to add support for urls like this: jdbc:tc:pgvector:14:///

Currently, I use this jdbc:tc:postgresql:14:///

and I wrote a ImageNameSubstitutor to swap out the image.

Solution

Write a JdbcDatabaseContainerProvider for PGVector

Benefit

This makes it very easy to support PGVector in TestContainers.

Alternatives

Creating the container in code or write a ImageNameSubstitutor.

Would you like to help contributing this feature?

Yes

eddumelendez commented 2 months ago

Hi @thijslemmens, PR is welcome