Top Description Fields Constructors Methods
org.h2.result

public final Class ResultRemote

extends FetchedResult
Class Inheritance
Imports
java.io.IOException, java.util.ArrayList, org.h2.api.ErrorCode, org.h2.engine.SessionRemote, .SysProperties, org.h2.message.DbException, .Trace, org.h2.value.Transfer, .TypeInfo, .Value

The client side part of a result set that is kept on the server. In many cases, the complete data is kept on the client side, but for large results only a subset is in-memory.

Field Summary

Modifier and TypeField and Description
private final ResultColumn[]
private int
private int
private ArrayList<Value[]>
private long
private long
private SessionRemote
private final Trace
private Transfer
Inherited from org.h2.result.FetchedResult:
afterLastcurrentRownextRowrowId

Constructor Summary

AccessConstructor and Description
public
ResultRemote(SessionRemote session, Transfer transfer, int id, int columnCount, int fetchSize)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.h2.result.ResultInterface.close.

Close the result and delete any temporary files

private void
private boolean
fetchRows(int fetch)

public String
getAlias(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getAlias.

Get the column alias name for the column.

public String
getColumnName(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getColumnName.

Get the column name.

public TypeInfo
getColumnType(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getColumnType.

Get the column data type.

public int
getFetchSize()

Implements org.h2.result.ResultInterface.getFetchSize.

Get the current fetch size for this result set.

public int
getNullable(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getNullable.

Check if this column is nullable.

public long
getRowCount()

Implements org.h2.result.ResultInterface.getRowCount.

Get the number of rows in this object.

public String
getSchemaName(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getSchemaName.

Get the schema name for the column, if one exists.

public String
getTableName(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.getTableName.

Get the table name for the column, if one exists.

public int
getVisibleColumnCount()

Implements org.h2.result.ResultInterface.getVisibleColumnCount.

Get the number of visible columns.

public boolean
hasNext()

Implements org.h2.result.ResultInterface.hasNext.

Check if this result has more rows to fetch.

public boolean
isClosed()

Implements org.h2.result.ResultInterface.isClosed.

Check if this result set is closed.

public boolean
isIdentity(int
the column number (starting with 0)
i
)

Implements org.h2.result.ResultInterface.isIdentity.

Check if this is an identity column.

public boolean
isLazy()

Implements org.h2.result.ResultInterface.isLazy.

Check if this a lazy execution result.

private void
public void
reset()

Implements org.h2.result.ResultInterface.reset.

Go to the beginning of the result, that means before the first row.

private void
public void
setFetchSize(int
the new fetch size
fetchSize
)

Implements org.h2.result.ResultInterface.setFetchSize.

Set the fetch size for this result set.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.h2.result.FetchedResult:
createShallowCopycurrentRowgetRowIdisAfterLastneedToClosenext

Field Detail

columnsback to summary
private final ResultColumn[] columns
fetchSizeback to summary
private int fetchSize
idback to summary
private int id
resultback to summary
private ArrayList<Value[]> result
rowCountback to summary
private long rowCount
rowOffsetback to summary
private long rowOffset
sessionback to summary
private SessionRemote session
traceback to summary
private final Trace trace
transferback to summary
private Transfer transfer

Constructor Detail

ResultRemoteback to summary
public ResultRemote(SessionRemote session, Transfer transfer, int id, int columnCount, int fetchSize) throws IOException

Method Detail

closeback to summary
public void close()

Implements org.h2.result.ResultInterface.close.

Doc from org.h2.result.ResultInterface.close.

Close the result and delete any temporary files

Annotations
@Override
fetchAdditionalRowsback to summary
private void fetchAdditionalRows()
fetchRowsback to summary
private boolean fetchRows(int fetch) throws IOException
getAliasback to summary
public String getAlias(int i)

Implements org.h2.result.ResultInterface.getAlias.

Doc from org.h2.result.ResultInterface.getAlias.

Get the column alias name for the column.

Parameters
i:int

the column number (starting with 0)

Returns:String

the alias name

Annotations
@Override
getColumnNameback to summary
public String getColumnName(int i)

Implements org.h2.result.ResultInterface.getColumnName.

Doc from org.h2.result.ResultInterface.getColumnName.

Get the column name.

Parameters
i:int

the column number (starting with 0)

Returns:String

the column name

Annotations
@Override
getColumnTypeback to summary
public TypeInfo getColumnType(int i)

Implements org.h2.result.ResultInterface.getColumnType.

Doc from org.h2.result.ResultInterface.getColumnType.

Get the column data type.

Parameters
i:int

the column number (starting with 0)

Returns:TypeInfo

the column data type

Annotations
@Override
getFetchSizeback to summary
public int getFetchSize()

Implements org.h2.result.ResultInterface.getFetchSize.

Doc from org.h2.result.ResultInterface.getFetchSize.

Get the current fetch size for this result set.

Returns:int

the fetch size

Annotations
@Override
getNullableback to summary
public int getNullable(int i)

Implements org.h2.result.ResultInterface.getNullable.

Doc from org.h2.result.ResultInterface.getNullable.

Check if this column is nullable.

Parameters
i:int

the column number (starting with 0)

Returns:int

Column.NULLABLE_*

Annotations
@Override
getRowCountback to summary
public long getRowCount()

Implements org.h2.result.ResultInterface.getRowCount.

Doc from org.h2.result.ResultInterface.getRowCount.

Get the number of rows in this object.

Returns:long

the number of rows

Annotations
@Override
getSchemaNameback to summary
public String getSchemaName(int i)

Implements org.h2.result.ResultInterface.getSchemaName.

Doc from org.h2.result.ResultInterface.getSchemaName.

Get the schema name for the column, if one exists.

Parameters
i:int

the column number (starting with 0)

Returns:String

the schema name or null

Annotations
@Override
getTableNameback to summary
public String getTableName(int i)

Implements org.h2.result.ResultInterface.getTableName.

Doc from org.h2.result.ResultInterface.getTableName.

Get the table name for the column, if one exists.

Parameters
i:int

the column number (starting with 0)

Returns:String

the table name or null

Annotations
@Override
getVisibleColumnCountback to summary
public int getVisibleColumnCount()

Implements org.h2.result.ResultInterface.getVisibleColumnCount.

Doc from org.h2.result.ResultInterface.getVisibleColumnCount.

Get the number of visible columns. More columns may exist internally for sorting or grouping.

Returns:int

the number of columns

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements org.h2.result.ResultInterface.hasNext.

Doc from org.h2.result.ResultInterface.hasNext.

Check if this result has more rows to fetch.

Returns:boolean

true if it has

Annotations
@Override
isClosedback to summary
public boolean isClosed()

Implements org.h2.result.ResultInterface.isClosed.

Doc from org.h2.result.ResultInterface.isClosed.

Check if this result set is closed.

Returns:boolean

true if it is

Annotations
@Override
isIdentityback to summary
public boolean isIdentity(int i)

Implements org.h2.result.ResultInterface.isIdentity.

Doc from org.h2.result.ResultInterface.isIdentity.

Check if this is an identity column.

Parameters
i:int

the column number (starting with 0)

Returns:boolean

true for identity columns

Annotations
@Override
isLazyback to summary
public boolean isLazy()

Implements org.h2.result.ResultInterface.isLazy.

Doc from org.h2.result.ResultInterface.isLazy.

Check if this a lazy execution result.

Returns:boolean

true if it is a lazy result

Annotations
@Override
remapIfOldback to summary
private void remapIfOld()
resetback to summary
public void reset()

Implements org.h2.result.ResultInterface.reset.

Doc from org.h2.result.ResultInterface.reset.

Go to the beginning of the result, that means before the first row.

Annotations
@Override
sendCloseback to summary
private void sendClose()
setFetchSizeback to summary
public void setFetchSize(int fetchSize)

Implements org.h2.result.ResultInterface.setFetchSize.

Doc from org.h2.result.ResultInterface.setFetchSize.

Set the fetch size for this result set.

Parameters
fetchSize:int

the new fetch size

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override