Skip to content

Commit

Permalink
Make datasource interface
Browse files Browse the repository at this point in the history
  • Loading branch information
romchellis committed May 31, 2023
1 parent 08e9a51 commit 9be09ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Containerized target datasource
*/
public final class ContainerTargetDatasource extends TargetDatasource {
public final class ContainerTargetDatasource implements TargetDatasource {
private final JdbcDatabaseContainer<?> container;

public ContainerTargetDatasource(JdbcDatabaseContainer<?> container) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.jooq.meta.jaxb.Jdbc;

/** Datasource using provided parameters */
public final class ExistingTargetDatasource extends TargetDatasource {
public final class ExistingTargetDatasource implements TargetDatasource {
private final Jdbc jdbc;

public ExistingTargetDatasource(Jdbc jdbc) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.testcontainers.jooq.codegen.database.DatabaseProvider;

/** Datasource to migrate and generate sources on */
public abstract class TargetDatasource implements AutoCloseable {
public interface TargetDatasource extends AutoCloseable {

public static TargetDatasource createOrJoinExisting(Jdbc jdbc, DatabaseProps database) {
if (needSpinContainer(jdbc)) {
Expand All @@ -28,11 +28,11 @@ private static boolean needSpinContainer(Jdbc jdbc) {
.test(jdbc);
}

public abstract String getUrl();
String getUrl();

public abstract String getUsername();
String getUsername();

public abstract String getPassword();
String getPassword();

public abstract Driver getDriver() throws SQLException;
Driver getDriver() throws SQLException;
}

0 comments on commit 9be09ee

Please sign in to comment.