Package org.h2.result
Class FetchedResult
- java.lang.Object
-
- org.h2.result.FetchedResult
-
- All Implemented Interfaces:
java.lang.AutoCloseable,ResultInterface
- Direct Known Subclasses:
LazyResult,ResultRemote
public abstract class FetchedResult extends java.lang.Object implements ResultInterface
Abstract fetched result.
-
-
Constructor Summary
Constructors Constructor Description FetchedResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResultInterfacecreateShallowCopy(Session targetSession)Create a shallow copy of the result set.Value[]currentRow()Get the current row.longgetRowId()Get the current row id, starting with 0.booleanisAfterLast()Check if the current position is after last row.booleanneedToClose()Check if this result set should be closed, for example because it is buffered using a temporary file.booleannext()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
-
-
-
-
Method Detail
-
currentRow
public final Value[] currentRow()
Description copied from interface:ResultInterfaceGet the current row.- Specified by:
currentRowin interfaceResultInterface- Returns:
- the row
-
next
public final boolean next()
Description copied from interface:ResultInterfaceGo to the next row.- Specified by:
nextin interfaceResultInterface- Returns:
- true if a row exists
-
isAfterLast
public final boolean isAfterLast()
Description copied from interface:ResultInterfaceCheck if the current position is after last row.- Specified by:
isAfterLastin interfaceResultInterface- Returns:
- true if after last
-
getRowId
public final long getRowId()
Description copied from interface:ResultInterfaceGet the current row id, starting with 0. -1 is returned when next() was not called yet.- Specified by:
getRowIdin interfaceResultInterface- Returns:
- the row id
-
needToClose
public final boolean needToClose()
Description copied from interface:ResultInterfaceCheck if this result set should be closed, for example because it is buffered using a temporary file.- Specified by:
needToClosein interfaceResultInterface- Returns:
- true if close should be called.
-
createShallowCopy
public final ResultInterface createShallowCopy(Session targetSession)
Description copied from interface:ResultInterfaceCreate a shallow copy of the result set. The data and a temporary table (if there is any) is not copied.- Specified by:
createShallowCopyin interfaceResultInterface- Parameters:
targetSession- the session of the copy- Returns:
- the copy if possible, or null if copying is not possible
-
-