Package org.h2.result
Class ResultRemote
java.lang.Object
org.h2.result.FetchedResult
org.h2.result.ResultRemote
- All Implemented Interfaces:
AutoCloseable,ResultInterface
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.
-
Constructor Summary
ConstructorsConstructorDescriptionResultRemote(SessionRemote session, Transfer transfer, int id, int columnCount, int fetchSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the result and delete any temporary filesgetAlias(int i) Get the column alias name for the column.getColumnName(int i) Get the column name.getColumnType(int i) Get the column data type.intGet the current fetch size for this result set.intgetNullable(int i) Check if this column is nullable.longGet the number of rows in this object.getSchemaName(int i) Get the schema name for the column, if one exists.getTableName(int i) Get the table name for the column, if one exists.intGet the number of visible columns.booleanhasNext()Check if this result has more rows to fetch.booleanisClosed()Check if this result set is closed.booleanisIdentity(int i) Check if this is an identity column.booleanisLazy()Check if this a lazy execution result.voidreset()Go to the beginning of the result, that means before the first row.voidsetFetchSize(int fetchSize) Set the fetch size for this result set.toString()Methods inherited from class org.h2.result.FetchedResult
createShallowCopy, currentRow, getRowId, isAfterLast, needToClose, next
-
Constructor Details
-
ResultRemote
public ResultRemote(SessionRemote session, Transfer transfer, int id, int columnCount, int fetchSize) throws IOException - Throws:
IOException
-
-
Method Details
-
isLazy
public boolean isLazy()Description copied from interface:ResultInterfaceCheck if this a lazy execution result.- Returns:
- true if it is a lazy result
-
getAlias
Description copied from interface:ResultInterfaceGet the column alias name for the column.- Parameters:
i- the column number (starting with 0)- Returns:
- the alias name
-
getSchemaName
Description copied from interface:ResultInterfaceGet the schema name for the column, if one exists.- Parameters:
i- the column number (starting with 0)- Returns:
- the schema name or null
-
getTableName
Description copied from interface:ResultInterfaceGet the table name for the column, if one exists.- Parameters:
i- the column number (starting with 0)- Returns:
- the table name or null
-
getColumnName
Description copied from interface:ResultInterfaceGet the column name.- Parameters:
i- the column number (starting with 0)- Returns:
- the column name
-
getColumnType
Description copied from interface:ResultInterfaceGet the column data type.- Parameters:
i- the column number (starting with 0)- Returns:
- the column data type
-
isIdentity
public boolean isIdentity(int i) Description copied from interface:ResultInterfaceCheck if this is an identity column.- Parameters:
i- the column number (starting with 0)- Returns:
- true for identity columns
-
getNullable
public int getNullable(int i) Description copied from interface:ResultInterfaceCheck if this column is nullable.- Parameters:
i- the column number (starting with 0)- Returns:
- Column.NULLABLE_*
-
reset
public void reset()Description copied from interface:ResultInterfaceGo to the beginning of the result, that means before the first row. -
getVisibleColumnCount
public int getVisibleColumnCount()Description copied from interface:ResultInterfaceGet the number of visible columns. More columns may exist internally for sorting or grouping.- Returns:
- the number of columns
-
getRowCount
public long getRowCount()Description copied from interface:ResultInterfaceGet the number of rows in this object.- Returns:
- the number of rows
-
hasNext
public boolean hasNext()Description copied from interface:ResultInterfaceCheck if this result has more rows to fetch.- Returns:
- true if it has
-
close
public void close()Description copied from interface:ResultInterfaceClose the result and delete any temporary files -
toString
-
getFetchSize
public int getFetchSize()Description copied from interface:ResultInterfaceGet the current fetch size for this result set.- Returns:
- the fetch size
-
setFetchSize
public void setFetchSize(int fetchSize) Description copied from interface:ResultInterfaceSet the fetch size for this result set.- Parameters:
fetchSize- the new fetch size
-
isClosed
public boolean isClosed()Description copied from interface:ResultInterfaceCheck if this result set is closed.- Returns:
- true if it is
-