com.amazon.redshift.jdbc

## Class MetadataAPIHelper.BestRowIdenData

- java.lang.Object
- - com.amazon.redshift.jdbc.MetadataAPIHelper.BestRowIdenData

Enclosing class:
  MetadataAPIHelper

    public static class MetadataAPIHelper.BestRowIdenData
    extends Object

Data container for the getBestRowIdentifier() metadata operation.

The JDBC getBestRowIdentifier() method returns column metadata for the best set of columns that uniquely identifies a table row. In Redshift JDBC, we're returning the primary key columns.

This class optimizes the lookup process by:

1. Retrieving all primary key column names and storing them in a HashSet for O(1) lookup
2. Getting complete column metadata for the table via SHOW COLUMNS
3. Filtering the column metadata to return only primary key columns

The HashSet approach provides efficient filtering when tables have many columns but few primary key columns, avoiding the need for nested loops during the filtering process.

See Also:
  `DatabaseMetaData.getBestRowIdentifier(String, String, String, int, boolean)`

### Constructor Summary

Constructors
Constructor and Description
`BestRowIdenData(List<MetadataAPIHelper.ShowColumnsInfo> resultSet, HashSet<String> pkColumnSet)`

### Method Summary

All Methods Instance Methods Concrete Methods
`HashSet<String>` `getPkColumnSet()`
`List<MetadataAPIHelper.ShowColumnsInfo>` `getResultSet()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BestRowIdenData

    public BestRowIdenData(List<MetadataAPIHelper.ShowColumnsInfo> resultSet,
                           HashSet<String> pkColumnSet)

### Method Detail

#### getPkColumnSet

    public HashSet<String> getPkColumnSet()

#### getResultSet

    public List<MetadataAPIHelper.ShowColumnsInfo> getResultSet()