-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make TimescaleDB available with JDBC syntax #3891
Conversation
The Syntax for the use of a TimescaleDB Testcontainer should be jdbc:tc:timescaledb:///databasename or jdbc:tc:timescaledb:2.1.0-pg13:///databasename if a Tag is given. This should allow the user to use the container without any further configuration.
950215b
to
07d5d3b
Compare
The DockerImage has to be compatible with PostgreSQL
The DockerImage has to be compatible with PostgreSQL
if (databaseType.equalsIgnoreCase("postgresql") || | ||
databaseType.equalsIgnoreCase("postgis") || | ||
databaseType.equalsIgnoreCase("timescaledb")) { | ||
databaseQuery = "SELECT CURRENT_DATABASE()"; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty ugly and should be made more generic, but that would be a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm happy with this - it follows the pattern used for PostGIS already (although has more by way of tests, which is good).
One general topic, which I think we should consider outside of this PR, is recommendations for usage of PostGIS/TimescaleDB outside of a JDBC URL usage mode. I know it's as simple as creating a PostgreSQLContainer
with a different image, but this isn't particularly discoverable or documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix #3890
The Syntax for the use of a TimescaleDB Testcontainer should be
jdbc:tc:timescaledb:///databasename
orjdbc:tc:timescaledb:2.1.0-pg13:///databasename
if a Tag is given. This should allow the user to use the container without any further configuration.Checklist
Default docker image
latest
tags, and we do not use tags that may be mutated in the futureModule dependencies
compileOnly
if they are likely to already be on the classpath for users' tests (e.g. client libraries or drivers)implementation
(and thus transitive dependencies) if they are very unlikely to conflict with users' dependencies.API (e.g.
MyModuleContainer
class)compileOnly
dependencies. This is to reduce the risk of compatibility problems with future versions of third party libraries.Documentation