forked from github/dataease
Merge pull request #6109 from dataease/pr@dev@fixrowpermissions
fix: pg、db2 支持currentSchema
This commit is contained in:
commit
8ba3e583a2
@ -15,7 +15,7 @@ public class Db2Configuration extends JdbcConfiguration {
|
||||
public String getJdbc() {
|
||||
if(StringUtils.isEmpty(extraParams.trim())){
|
||||
if (StringUtils.isEmpty(getSchema())) {
|
||||
return "jdbc:db2://HOSTNAME:PORT/DATABASE:currentSchema=SCHEMA;"
|
||||
return "jdbc:db2://HOSTNAME:PORT/DATABASE"
|
||||
.replace("HOSTNAME", getHost().trim())
|
||||
.replace("PORT", getPort().toString().trim())
|
||||
.replace("DATABASE", getDataBase().trim());
|
||||
|
@ -11,14 +11,22 @@ public class PgConfiguration extends JdbcConfiguration {
|
||||
|
||||
private String driver = "org.postgresql.Driver";
|
||||
private String extraParams = "";
|
||||
|
||||
public String getJdbc() {
|
||||
if(StringUtils.isEmpty(extraParams.trim())){
|
||||
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?currentSchema=SCHEMA"
|
||||
.replace("HOSTNAME", getHost().trim())
|
||||
.replace("PORT", getPort().toString().trim())
|
||||
.replace("DATABASE", getDataBase().trim())
|
||||
.replace("SCHEMA", getSchema().trim());
|
||||
}else {
|
||||
if (StringUtils.isEmpty(extraParams.trim())) {
|
||||
if (StringUtils.isEmpty(getSchema())) {
|
||||
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE"
|
||||
.replace("HOSTNAME", getHost().trim())
|
||||
.replace("PORT", getPort().toString().trim())
|
||||
.replace("DATABASE", getDataBase().trim());
|
||||
} else {
|
||||
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?currentSchema=SCHEMA"
|
||||
.replace("HOSTNAME", getHost().trim())
|
||||
.replace("PORT", getPort().toString().trim())
|
||||
.replace("DATABASE", getDataBase().trim())
|
||||
.replace("SCHEMA", getSchema().trim());
|
||||
}
|
||||
} else {
|
||||
return "jdbc:postgresql://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
|
||||
.replace("HOSTNAME", getHost().trim())
|
||||
.replace("PORT", getPort().toString().trim())
|
||||
|
Loading…
Reference in New Issue
Block a user