package x.sql2.configs;
import x.sql2.dialect.PGSQLDialect;
import x.sql2.enums.SQLDatabaseType;
public class PostgresConnectionsConfig extends ISQLConnectionsConfig {
public PostgresConnectionsConfig(String host_port, String dbName, String username, String password, int connectionsLimit) {
setDriverName("org.postgresql.Driver");
setConnectionString("jdbc:postgresql://"+host_port+"/"+dbName);
setUsername(username);
setPassword(password);
setConnectionsCount(connectionsLimit);
setDialect(new PGSQLDialect());
}
@Override
public SQLDatabaseType getDatabaseType() {
return SQLDatabaseType.POSTGRESQL_8_4;
}
}