use of com.google.gerrit.server.config.ConfigSection in project gerrit by GerritCodeReview.
the class DB2 method getUrl.
@Override
public String getUrl() {
final StringBuilder b = new StringBuilder();
final ConfigSection dbc = new ConfigSection(cfg, "database");
b.append("jdbc:db2://");
b.append(hostname(dbc.optional("hostname")));
b.append(port(dbc.optional("port")));
b.append("/");
b.append(dbc.required("database"));
return b.toString();
}
use of com.google.gerrit.server.config.ConfigSection in project gerrit by GerritCodeReview.
the class HANA method getUrl.
@Override
public String getUrl() {
final StringBuilder b = new StringBuilder();
final ConfigSection dbs = new ConfigSection(cfg, "database");
b.append("jdbc:sap://");
b.append(hostname(dbs.required("hostname")));
int instance = Integer.parseInt(dbs.required("instance"));
String port = "3" + String.format("%02d", instance) + "15";
b.append(port(port));
return b.toString();
}
use of com.google.gerrit.server.config.ConfigSection in project gerrit by GerritCodeReview.
the class Oracle method getUrl.
@Override
public String getUrl() {
final StringBuilder b = new StringBuilder();
final ConfigSection dbc = new ConfigSection(cfg, "database");
b.append("jdbc:oracle:thin:@");
b.append(hostname(dbc.optional("hostname")));
b.append(port(dbc.optional("port")));
b.append(":");
b.append(dbc.required("instance"));
return b.toString();
}
use of com.google.gerrit.server.config.ConfigSection in project gerrit by GerritCodeReview.
the class PostgreSQL method getUrl.
@Override
public String getUrl() {
final StringBuilder b = new StringBuilder();
final ConfigSection dbc = new ConfigSection(cfg, "database");
b.append("jdbc:postgresql://");
b.append(hostname(dbc.optional("hostname")));
b.append(port(dbc.optional("port")));
b.append("/");
b.append(dbc.required("database"));
return b.toString();
}
use of com.google.gerrit.server.config.ConfigSection in project gerrit by GerritCodeReview.
the class MariaDb method getUrl.
@Override
public String getUrl() {
StringBuilder b = new StringBuilder();
ConfigSection dbs = new ConfigSection(cfg, "database");
b.append("jdbc:mariadb://");
b.append(hostname(dbs.optional("hostname")));
b.append(port(dbs.optional("port")));
b.append("/");
b.append(dbs.required("database"));
return b.toString();
}
Aggregations