org.h2.result

## Interface LocalResult

All Superinterfaces:
  java.lang.AutoCloseable, ResultInterface, ResultTarget

All Known Implementing Classes:
  LocalResultImpl

    public interface LocalResult
    extends ResultInterface, ResultTarget

A local result set contains all row data of a result set. The object is generated by `LocalResultFactory`, and it is also used directly by the ResultSet class in the embedded mode. The memory usage and other policies are defined by implementation.

### Method Summary

Methods
`boolean` `containsDistinct(Value[] values)` Check if this result set contains the given row.
`boolean` `containsNull()` Check if this result set contains a NULL value.
`void` `done()` This method is called after all rows have been added.
`void` `removeDistinct(Value[] values)` Remove the row from the result set if it exists.
`void` `setDistinct()` Remove duplicate rows.
`void` `setDistinct(int[] distinctIndexes)` Remove rows with duplicates in columns with specified indexes.
`void` `setFetchPercent(boolean fetchPercent)`
`void` `setLimit(int limit)` Set the number of rows that this result will return at the maximum.
`void` `setMaxMemoryRows(int maxValue)` Redefine count of maximum rows holds in memory for the result.
`void` `setOffset(int offset)` Set the offset of the first row to return.
`void` `setSortOrder(SortOrder sort)` Sets sort order to be used by this result.
`void` `setWithTies(SortOrder withTiesSortOrder)` Enables inclusion of tied rows to result and sets the sort order for tied rows.

### Methods inherited from interface org.h2.result.ResultInterface

`close, createShallowCopy, currentRow, getAlias, getColumnName, getColumnType, getFetchSize, getNullable, getRowCount, getRowId, getSchemaName, getTableName, getVisibleColumnCount, hasNext, isAfterLast, isAutoIncrement, isClosed, isLazy, needToClose, next, reset, setFetchSize`

### Methods inherited from interface org.h2.result.ResultTarget

`addRow, getRowCount, limitsWereApplied`

### Method Detail

#### setMaxMemoryRows

    void setMaxMemoryRows(int maxValue)

Redefine count of maximum rows holds in memory for the result.

Parameters:
  `maxValue` - Maximum rows count in memory.
See Also:
  `SysProperties.MAX_MEMORY_ROWS`

#### setSortOrder

    void setSortOrder(SortOrder sort)

Sets sort order to be used by this result. When rows are presorted by the query this method should not be used.

Parameters:
  `sort` - the sort order

#### setDistinct

    void setDistinct()

Remove duplicate rows.

#### setDistinct

    void setDistinct(int[] distinctIndexes)

Remove rows with duplicates in columns with specified indexes.

Parameters:
  `distinctIndexes` - distinct indexes

#### containsDistinct

    boolean containsDistinct(Value[] values)

Check if this result set contains the given row.

Parameters:
  `values` - the row
Returns:
  true if the row exists

#### containsNull

    boolean containsNull()

Check if this result set contains a NULL value. This method may reset this result.

Returns:
  true if there is a NULL value

#### removeDistinct

    void removeDistinct(Value[] values)

Remove the row from the result set if it exists.

Parameters:
  `values` - the row

#### done

    void done()

This method is called after all rows have been added.

#### setLimit

    void setLimit(int limit)

Set the number of rows that this result will return at the maximum.

Parameters:
  `limit` - the limit (-1 means no limit, 0 means no rows)

#### setFetchPercent

    void setFetchPercent(boolean fetchPercent)

Parameters:
  `fetchPercent` - whether limit expression specifies percentage of rows

#### setWithTies

    void setWithTies(SortOrder withTiesSortOrder)

Enables inclusion of tied rows to result and sets the sort order for tied rows. The specified sort order must be the same as sort order if sort order was set. Passed value will be used if sort order was not set that is possible when rows are presorted.

Parameters:
  `withTiesSortOrder` - the sort order for tied rows

#### setOffset

    void setOffset(int offset)

Set the offset of the first row to return.

Parameters:
  `offset` - the offset