提交 c0508bda 编写于 作者: L LonwoLonwo

#13379 view triggers reading supported

上级 113a0a67
......@@ -128,6 +128,12 @@ public enum OracleObjectType implements DBSObjectType {
@Override
public OracleTrigger findObject(DBRProgressMonitor monitor, OracleSchema schema, String objectName) throws DBException
{
// First we will try to find a trigger at the tables level
OracleTableTrigger trigger = schema.tableTriggerCache.getObject(monitor, schema, objectName);
if (trigger != null) {
return trigger;
}
// Nope. Now we will try to find a trigger at the schemas level
return schema.triggerCache.getObject(monitor, schema, objectName);
}
}),
......
......@@ -1377,7 +1377,7 @@ public class OracleSchema extends OracleGlobalObject implements DBSSchema, DBPRe
OracleUtils.getAdminAllViewPrefix(session.getProgressMonitor(), schema.getDataSource(), "TRIGGERS") + " t, " +
OracleUtils.getAdminAllViewPrefix(session.getProgressMonitor(), schema.getDataSource(), "TRIGGER_COLS") + " c" +
"\nWHERE t.TABLE_OWNER=?" + (table == null ? "" : " AND t.TABLE_NAME=?") +
" AND t.BASE_OBJECT_TYPE='TABLE' AND t.TABLE_OWNER=c.TABLE_OWNER(+) AND t.TABLE_NAME=c.TABLE_NAME(+)" +
" AND t.BASE_OBJECT_TYPE=" + (table instanceof OracleView ? "'VIEW'" : "'TABLE'") + " AND t.TABLE_OWNER=c.TABLE_OWNER(+) AND t.TABLE_NAME=c.TABLE_NAME(+)" +
" AND t.OWNER=c.TRIGGER_OWNER(+) AND t.TRIGGER_NAME=c.TRIGGER_NAME(+)" +
"\nORDER BY t.TRIGGER_NAME"
);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册