提交 d2cf3f1e 编写于 作者: S Serge Rider 提交者: GitHub

Merge pull request #10225 from dbeaver/vieworaclefix#10219

#10219 view format options saving

Former-commit-id: 3ac66ddf
......@@ -175,12 +175,13 @@ public class OracleMaterializedView extends OracleTableBase implements OracleSou
currentDDLFormat = OracleDDLFormat.getCurrentFormat(getDataSource());
}
OracleDDLFormat newFormat = OracleDDLFormat.FULL;
if (options.containsKey(OracleConstants.PREF_KEY_DDL_FORMAT)) {
boolean isFormatInOptions = options.containsKey(OracleConstants.PREF_KEY_DDL_FORMAT);
if (isFormatInOptions) {
newFormat = (OracleDDLFormat) options.get(OracleConstants.PREF_KEY_DDL_FORMAT);
}
if (query == null || currentDDLFormat != newFormat && isPersisted()) {
try {
if (query == null) {
if (query == null || !isFormatInOptions) {
query = OracleUtils.getDDL(monitor, getTableTypeName(), this, currentDDLFormat, options);
} else {
query = OracleUtils.getDDL(monitor, getTableTypeName(), this, newFormat, options);
......
......@@ -123,13 +123,14 @@ public class OracleView extends OracleTableBase implements OracleSourceObject, D
currentDDLFormat = OracleDDLFormat.getCurrentFormat(getDataSource());
}
OracleDDLFormat newFormat = OracleDDLFormat.FULL;
if (options.containsKey(OracleConstants.PREF_KEY_DDL_FORMAT)) {
boolean isFormatInOptions = options.containsKey(OracleConstants.PREF_KEY_DDL_FORMAT);
if (isFormatInOptions) {
newFormat = (OracleDDLFormat) options.get(OracleConstants.PREF_KEY_DDL_FORMAT);
}
if (viewText == null || currentDDLFormat != newFormat) {
try {
if (viewText == null) {
if (viewText == null || !isFormatInOptions) {
viewText = OracleUtils.getDDL(monitor, getTableTypeName(), this, currentDDLFormat, options);
} else {
viewText = OracleUtils.getDDL(monitor, getTableTypeName(), this, newFormat, options);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册