提交 3044a57f 编写于 作者: A Andrew Khitrin

Merge branch 'devel' into 5878_oracle_constraints_lag


Former-commit-id: 375be0a3
......@@ -94,7 +94,7 @@ public class OracleDataSource extends JDBCDataSource
return super.getDataSourceFeature(featureId);
}
public boolean isViewAvailable(@NotNull DBRProgressMonitor monitor, @NotNull String schemaName, @NotNull String viewName) {
public boolean isViewAvailable(@NotNull DBRProgressMonitor monitor, @Nullable String schemaName, @NotNull String viewName) {
viewName = viewName.toUpperCase();
Boolean available;
synchronized (availableViews) {
......
......@@ -287,6 +287,7 @@ public class OracleStructureAssistant implements DBSStructureAssistant
return object;
}
@NotNull
@Override
public String getFullyQualifiedName(DBPEvaluationContext context) {
if (objectType == OracleObjectType.SYNONYM && OracleConstants.USER_PUBLIC.equals(schemaName)) {
......
......@@ -16,30 +16,18 @@
*/
package org.jkiss.dbeaver.ext.postgresql.model.data;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.ext.postgresql.PostgreUtils;
import org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource;
import org.jkiss.dbeaver.ext.postgresql.model.PostgreDataType;
import org.jkiss.dbeaver.ext.postgresql.model.PostgreDataTypeAttribute;
import org.jkiss.dbeaver.model.data.DBDComposite;
import org.jkiss.dbeaver.model.exec.DBCException;
import org.jkiss.dbeaver.model.exec.DBCSession;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCPreparedStatement;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCResultSet;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
import org.jkiss.dbeaver.model.impl.jdbc.JDBCStructImpl;
import org.jkiss.dbeaver.model.impl.jdbc.data.JDBCComposite;
import org.jkiss.dbeaver.model.impl.jdbc.data.JDBCCompositeStatic;
import org.jkiss.dbeaver.model.impl.jdbc.data.JDBCCursor;
import org.jkiss.dbeaver.model.impl.jdbc.data.handlers.JDBCStructValueHandler;
import org.jkiss.dbeaver.model.struct.DBSTypedObject;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Struct;
import java.sql.Types;
import java.util.Collection;
import java.util.Iterator;
/**
* PostgreArrayValueHandler
......@@ -52,7 +40,14 @@ public class PostgreRefCursorValueHandler extends JDBCStructValueHandler {
protected Object fetchColumnValue(DBCSession session, JDBCResultSet resultSet, DBSTypedObject type, int index) throws DBCException, SQLException {
// Fetch as string (#1735)
// Fetching cursor as object will close it so it won;'t be possible to use cursor in consequent queries
return resultSet.getString(index);
Object object = resultSet.getObject(index);
if (object instanceof ResultSet) {
return new JDBCCursor(
(JDBCSession) session,
(ResultSet) object,
type.getTypeName());
}
return object;
}
@Override
......
......@@ -673,9 +673,11 @@ public class ComplexObjectEditor extends TreeViewer {
children[i] = new CollItem(i, iterator.next());
}
}
if (children != null) {
childrenMap.put(parent, children);
if (children == null) {
children = new ComplexElement[0];
}
childrenMap.put(parent, children);
return children;
}
......
......@@ -179,7 +179,12 @@ public class CursorViewDialog extends ValueViewDialog implements IResultSetConta
@Override
public IResultSetDecorator createResultSetDecorator() {
return new QueryResultsDecorator();
return new QueryResultsDecorator() {
@Override
public long getDecoratorFeatures() {
return FEATURE_PANELS | FEATURE_STATUS_BAR;
}
};
}
private class CursorDataContainer implements DBSDataContainer {
......@@ -197,6 +202,11 @@ public class CursorViewDialog extends ValueViewDialog implements IResultSetConta
{
DBCStatistics statistics = new DBCStatistics();
DBRProgressMonitor monitor = session.getProgressMonitor();
try {
value.moveTo((int) firstRow);
} catch (DBCException e) {
log.debug(e);
}
DBCResultSet dbResult = value;
try {
long startTime = System.currentTimeMillis();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册