Skip to content
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

Add questdb as a database provider #7244

Merged
merged 1 commit into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modules/databases/jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Insert `tc:` after `jdbc:` as follows. Note that the hostname, port and database

#### Using QuestDB

`jdbc:tc:postgresql:6.5.3:///databasename`
`jdbc:tc:questdb:6.5.3:///databasename`

#### Using TimescaleDB

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.testcontainers.containers;

@Deprecated
public class LegacyQuestDBProvider extends JdbcDatabaseContainerProvider {

@Override
public boolean supports(String databaseType) {
return databaseType.equals(QuestDBContainer.LEGACY_DATABASE_PROVIDER);
}

@Override
public JdbcDatabaseContainer newInstance(String tag) {
return new QuestDBContainer(QuestDBContainer.DEFAULT_IMAGE_NAME.withTag(tag));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
*/
public class QuestDBContainer extends JdbcDatabaseContainer<QuestDBContainer> {

static final String DATABASE_PROVIDER = "postgresql";
@Deprecated
static final String LEGACY_DATABASE_PROVIDER = "postgresql";

static final String DATABASE_PROVIDER = "questdb";

private static final String DEFAULT_DATABASE_NAME = "qdb";

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
org.testcontainers.containers.LegacyQuestDBProvider
org.testcontainers.containers.QuestDBProvider
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ public class QuestDBJDBCDriverTest extends AbstractJDBCDriverTest {
@Parameterized.Parameters(name = "{index} - {0}")
public static Iterable<Object[]> data() {
return Arrays.asList(
new Object[][] { { "jdbc:tc:postgresql://hostname/databasename", EnumSet.of(Options.PmdKnownBroken) } }
new Object[][] {
{ "jdbc:tc:postgresql://hostname/databasename", EnumSet.of(Options.PmdKnownBroken) },
{ "jdbc:tc:questdb://hostname/databasename", EnumSet.of(Options.PmdKnownBroken) },
}
);
}
}
Loading