提交 b07726b2 编写于 作者: S Serge Rider

Oracle: table refresh fix. MySQL & PG table refresh fixes (clear cache)

Former-commit-id: 6f19522b
上级 c518b335
......@@ -33,10 +33,7 @@ import org.jkiss.dbeaver.model.impl.jdbc.JDBCUtils;
import org.jkiss.dbeaver.model.impl.jdbc.cache.JDBCObjectCache;
import org.jkiss.dbeaver.model.meta.*;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntity;
import org.jkiss.dbeaver.model.struct.DBSEntityAssociation;
import org.jkiss.dbeaver.model.struct.DBSEntityConstraint;
import org.jkiss.dbeaver.model.struct.DBSEntityConstraintType;
import org.jkiss.dbeaver.model.struct.*;
import org.jkiss.dbeaver.model.struct.rdb.DBSForeignKeyModifyRule;
import org.jkiss.dbeaver.model.struct.rdb.DBSTable;
import org.jkiss.dbeaver.model.struct.rdb.DBSTableIndex;
......@@ -488,6 +485,13 @@ public class MySQLTable extends MySQLTableBase
return additionalInfo.description;
}
@Override
public DBSObject refreshObject(@NotNull DBRProgressMonitor monitor) throws DBException {
getContainer().constraintCache.clearObjectCache(this);
getContainer().indexCache.clearObjectCache(this);
return super.refreshObject(monitor);
}
public static class EngineListProvider implements IPropertyValueListProvider<MySQLTable> {
@Override
public boolean allowCustomValue()
......
......@@ -193,10 +193,8 @@ public class OracleTable extends OracleTablePhysical implements DBPScriptObject,
@Override
public DBSObject refreshObject(@NotNull DBRProgressMonitor monitor) throws DBException
{
super.refreshObject(monitor);
getContainer().foreignKeyCache.clearObjectCache(this);
return this;
return super.refreshObject(monitor);
}
@Override
......
......@@ -214,10 +214,9 @@ public abstract class OracleTableBase extends JDBCTable<OracleDataSource, Oracle
@Override
public DBSObject refreshObject(@NotNull DBRProgressMonitor monitor) throws DBException
{
getContainer().tableCache.clearChildrenCache(this);
getContainer().constraintCache.clearObjectCache(this);
return this;
return getContainer().tableCache.refreshObject(monitor, getContainer(), this);
}
@Association
......
......@@ -169,15 +169,8 @@ public abstract class OracleTablePhysical extends OracleTableBase implements DBS
@Override
public DBSObject refreshObject(@NotNull DBRProgressMonitor monitor) throws DBException
{
super.refreshObject(monitor);
this.getContainer().indexCache.clearObjectCache(this);
partitionInfo = null;
if (partitionCache != null) {
partitionCache.clearCache();
}
realRowCount = null;
return this;
return super.refreshObject(monitor);
}
@Override
......
......@@ -33,8 +33,6 @@ import org.jkiss.dbeaver.model.meta.LazyProperty;
import org.jkiss.dbeaver.model.meta.Property;
import org.jkiss.dbeaver.model.meta.PropertyGroup;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityConstraintType;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.utils.CommonUtils;
import java.sql.ResultSet;
......@@ -158,13 +156,6 @@ public class OracleView extends OracleTableBase implements OracleSourceObject
}
}
@Override
public DBSObject refreshObject(@NotNull DBRProgressMonitor monitor) throws DBException
{
additionalInfo.loaded = false;
return super.refreshObject(monitor);
}
@Override
public void refreshObjectState(@NotNull DBRProgressMonitor monitor) throws DBCException
{
......
......@@ -151,6 +151,8 @@ public abstract class PostgreTableBase extends JDBCTable<PostgreDataSource, Post
@Override
public DBSObject refreshObject(@NotNull DBRProgressMonitor monitor) throws DBException
{
getContainer().constraintCache.clearObjectCache(this);
getContainer().indexCache.clearObjectCache(this);
return getContainer().tableCache.refreshObject(monitor, getContainer(), this);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册