use of org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext in project dbeaver by dbeaver.
the class PostgreDebugController method attachSession.
@Override
public void attachSession(DBGSession session, DBCExecutionContext sessionContext, Map<String, Object> configuration, DBRProgressMonitor monitor) throws DBException {
PostgreDebugSession pgSession = (PostgreDebugSession) session;
JDBCExecutionContext sessionJdbc = (JDBCExecutionContext) sessionContext;
int oid = Integer.parseInt(String.valueOf(configuration.get(PROCEDURE_OID)));
int pid = Integer.parseInt(String.valueOf(configuration.get(ATTACH_PROCESS)));
String kind = String.valueOf(configuration.get(ATTACH_KIND));
boolean global = DBGController.ATTACH_KIND_GLOBAL.equals(kind);
String call = (String) configuration.get(SCRIPT_TEXT);
pgSession.attach(sessionJdbc, oid, pid, global, call);
}
use of org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext in project dbeaver by dbeaver.
the class DB2DataSource method setDefaultObject.
@Override
public void setDefaultObject(@NotNull DBRProgressMonitor monitor, @NotNull DBSObject object) throws DBException {
final DB2Schema oldSelectedEntity = getDefaultObject();
if (!(object instanceof DB2Schema)) {
throw new IllegalArgumentException("Invalid object type: " + object);
}
for (JDBCExecutionContext context : getAllContexts()) {
setCurrentSchema(monitor, context, (DB2Schema) object);
}
activeSchemaName = object.getName();
// Send notifications
if (oldSelectedEntity != null) {
DBUtils.fireObjectSelect(oldSelectedEntity, false);
}
if (this.activeSchemaName != null) {
DBUtils.fireObjectSelect(object, true);
}
}
Aggregations