Package org.h2.result
Class FetchedResult
java.lang.Object
org.h2.result.FetchedResult
- All Implemented Interfaces:
AutoCloseable
,ResultInterface
- Direct Known Subclasses:
LazyResult
,ResultRemote
Abstract fetched result.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ResultInterface
createShallowCopy
(Session targetSession) Create a shallow copy of the result set.final Value[]
Get the current row.final long
getRowId()
Get the current row id, starting with 0.final boolean
Check if the current position is after last row.final boolean
Check if this result set should be closed, for example because it is buffered using a temporary file.final boolean
next()
Go to the next row.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.h2.result.ResultInterface
close, getAlias, getColumnName, getColumnType, getFetchSize, getNullable, getRowCount, getSchemaName, getTableName, getVisibleColumnCount, hasNext, isClosed, isIdentity, isLazy, reset, setFetchSize
-
Field Details
-
Constructor Details
-
FetchedResult
FetchedResult()
-
-
Method Details
-
currentRow
Description copied from interface:ResultInterface
Get the current row.- Specified by:
currentRow
in interfaceResultInterface
- Returns:
- the row
-
next
public final boolean next()Description copied from interface:ResultInterface
Go to the next row.- Specified by:
next
in interfaceResultInterface
- Returns:
- true if a row exists
-
isAfterLast
public final boolean isAfterLast()Description copied from interface:ResultInterface
Check if the current position is after last row.- Specified by:
isAfterLast
in interfaceResultInterface
- Returns:
- true if after last
-
getRowId
public final long getRowId()Description copied from interface:ResultInterface
Get the current row id, starting with 0. -1 is returned when next() was not called yet.- Specified by:
getRowId
in interfaceResultInterface
- Returns:
- the row id
-
needToClose
public final boolean needToClose()Description copied from interface:ResultInterface
Check if this result set should be closed, for example because it is buffered using a temporary file.- Specified by:
needToClose
in interfaceResultInterface
- Returns:
- true if close should be called.
-
createShallowCopy
Description copied from interface:ResultInterface
Create a shallow copy of the result set. The data and a temporary table (if there is any) is not copied.- Specified by:
createShallowCopy
in interfaceResultInterface
- Parameters:
targetSession
- the session of the copy- Returns:
- the copy if possible, or null if copying is not possible
-