提交 97c05edc 编写于 作者: L LonwoLonwo

#10219 view format options saving

上级 db256091
......@@ -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.
先完成此消息的编辑!
想要评论请 注册