private ResultSet loadResultSet(boolean useCurrentFilter) throws SQLException {
    Connection connection = connectionHandler.getStandaloneConnection();
    DBDataset dataset = getDataset();
    if (dataset != null) {
      Project project = dataset.getProject();
      DatasetFilter filter = DatasetFilterManager.EMPTY_FILTER;
      if (useCurrentFilter) {
        DatasetFilterManager filterManager = DatasetFilterManager.getInstance(project);
        filter = filterManager.getActiveFilter(dataset);
        if (filter == null) filter = DatasetFilterManager.EMPTY_FILTER;
      }

      String selectStatement = filter.createSelectStatement(dataset, getState().getSortingState());
      Statement statement =
          isReadonly()
              ? connection.createStatement()
              : connection.createStatement(
                  ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
      checkDisposed();
      int timeout = settings.getGeneralSettings().getFetchTimeout().value();
      if (timeout != -1) {
        statement.setQueryTimeout(timeout);
      }
      return statement.executeQuery(selectStatement);
    }
    return null;
  }
  private int computeRowCount() {
    int originalRowCount = getRowCount();
    int stateRowCount = getState().getRowCount();
    int fetchRowCount = Math.max(stateRowCount, originalRowCount);

    int fetchBlockSize = settings.getGeneralSettings().getFetchBlockSize().value();
    fetchRowCount = (fetchRowCount / fetchBlockSize + 1) * fetchBlockSize;

    return Math.max(fetchRowCount, fetchBlockSize);
  }
        @Override
        public void focusGained(FocusEvent e) {
          if (e.getOppositeComponent() != null) {
            JTextField valueTextField = editorComponent.getTextField();
            DataEditorSettings settings = cell.getRow().getModel().getSettings();
            if (settings.getGeneralSettings().getSelectContentOnCellEdit().value()) {
              valueTextField.selectAll();
            }

            Rectangle rectangle = new Rectangle(mainPanel.getLocation(), mainPanel.getSize());
            parentForm.getColumnsPanel().scrollRectToVisible(rectangle);
          }
        }