postgresql-embedded icon indicating copy to clipboard operation
postgresql-embedded copied to clipboard

Add start method which takes IRuntimeConfig without List<String> additionalParams

Open LukeButters opened this issue 7 years ago • 0 comments

Hi

Could a start method be added which looks like this:

    public String start(IRuntimeConfig runtimeConfig, String host, int port, String dbName, String user, String password) throws IOException {
        return start(runtimeConfig, host, port, dbName, user, password, additionalParams, DEFAULT_ADD_PARAMS, DEFAULT_POSTGRES_PARAMS);
    }

So that it is possible to set it up like:

final String url = postgres.start(cachedRuntimeConfig(new File("target/embeddedPostgress").toPath()), 
                    "localhost", 12345, "name", "user", "pass");

Otherwise I would have to copy the private static List DEFAULT_ADD_PARAMS into the calling class then pass in those arguments.

I guess the alternative would be to make DEFAULT_ADD_PARAMS public although if that is done it would need to be wrapped in a unmodifiable list.

LukeButters avatar Dec 27 '18 21:12 LukeButters