This result is used for distinct and/or sorted results.
| Modifier and Type | Field and Description |
|---|---|
| private Value[] | |
| private Cursor | |
| private final boolean | distinct
Whether this result is a standard distinct result. |
| private final int[] | distinctIndexes
Distinct indexes for DISTINCT ON results. |
| private MVMap | index
Optional index. |
| private final int[] | indexes
Mapping of indexes of columns to its positions in the store, or |
| private final MVMap | map
Map with rows as keys and counts of duplicate rows as values. |
| private ValueDataType | orderedDistinctOnType
Used for DISTINCT ON in presence of ORDER BY. |
| private long | valueCount
Count of remaining duplicate rows for the |
| Access | Constructor and Description |
|---|---|
| private | |
| pack-priv | MVSortedTempResult(Database
database database, Expression[] column expressions expressions, boolean whether this result should be distinct distinct, int[] indexes of distinct columns for DISTINCT ON results distinctIndexes, int count of visible columns visibleColumnCount, int the number of columns including visible columns and additional
virtual columns for ORDER BY and DISTINCT ON clauses resultColumnCount, SortOrder sort order, or sort)null if this result does not need any
sortingCreates a new sorted temporary result. |
| Modifier and Type | Method and Description |
|---|---|
| public int | addRow(Value[]
the row to add values)Implements org. Add a row to this object. |
| public boolean | contains(Value[]
the row values)Implements org. Check if the given row exists in this object. |
| public synchronized ResultExternal | createShallowCopy()
Implements org. Create a shallow copy of this object if possible. |
| private ValueRow | |
| private Value[] | |
| public Value[] | |
| public int | removeRow(Value[]
the row values)Implements org. Remove the row with the given values from this object if such a row exists. |
| public void |
| current | back to summary |
|---|---|
| private Value[] current Current value for the | |
| cursor | back to summary |
|---|---|
| private Cursor<ValueRow, Long> cursor Cursor for the | |
| distinct | back to summary |
|---|---|
| private final boolean distinct Whether this result is a standard distinct result. | |
| distinctIndexes | back to summary |
|---|---|
| private final int[] distinctIndexes Distinct indexes for DISTINCT ON results. | |
| index | back to summary |
|---|---|
| private MVMap<ValueRow, Value> index Optional index. This index is created only if result is distinct and
| |
| indexes | back to summary |
|---|---|
| private final int[] indexes Mapping of indexes of columns to its positions in the store, or | |
| map | back to summary |
|---|---|
| private final MVMap<ValueRow, Long> map Map with rows as keys and counts of duplicate rows as values. If this map is distinct all values are 1. | |
| orderedDistinctOnType | back to summary |
|---|---|
| private ValueDataType orderedDistinctOnType Used for DISTINCT ON in presence of ORDER BY. | |
| valueCount | back to summary |
|---|---|
| private long valueCount Count of remaining duplicate rows for the | |
| MVSortedTempResult | back to summary |
|---|---|
| private MVSortedTempResult(MVSortedTempResult parent) Creates a shallow copy of the result.
| |
| MVSortedTempResult | back to summary |
|---|---|
| pack-priv MVSortedTempResult(Database database, Expression[] expressions, boolean distinct, int[] distinctIndexes, int visibleColumnCount, int resultColumnCount, SortOrder sort) Creates a new sorted temporary result.
| |
| addRow | back to summary |
|---|---|
| public int addRow(Value[] values) Implements org. Doc from org. Add a row to this object. | |
| contains | back to summary |
|---|---|
| public boolean contains(Value[] values) Implements org. Doc from org. Check if the given row exists in this object. | |
| createShallowCopy | back to summary |
|---|---|
| public synchronized ResultExternal createShallowCopy() Implements org. Doc from org. Create a shallow copy of this object if possible.
| |
| getKey | back to summary |
|---|---|
| private ValueRow getKey(Value[] values) Reorder values if required and convert them into | |
| getValue | back to summary |
|---|---|
| private Value[] getValue(Value[] key) Reorder values back if required. | |
| next | back to summary |
|---|---|
| public Value[] next() Implements org. Doc from org. Get the next row from the result. | |
| removeRow | back to summary |
|---|---|
| public int removeRow(Value[] values) Implements org. Doc from org. Remove the row with the given values from this object if such a row exists. | |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Doc from org. Reset the current position of this object.
| |