Top Description Fields Constructors Methods
org.h2.result

public abstract Class LazyResult

extends FetchedResult
Class Inheritance
Known Direct Subclasses
org.h2.command.query.Select.LazyResultSelect, org.h2.command.query.SelectUnion.LazyResultUnion
Imports
org.h2.engine.SessionLocal, org.h2.expression.Expression, org.h2.message.DbException, org.h2.value.TypeInfo, .Value

Lazy execution support for queries.
Author
Sergi Vladykin

Field Summary

Modifier and TypeField and Description
private boolean
private final Expression[]
private long
private final SessionLocal
Inherited from org.h2.result.FetchedResult:
afterLastcurrentRownextRowrowId

Constructor Summary

AccessConstructor and Description
public
LazyResult(SessionLocal session, Expression[] expressions)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements org.h2.result.ResultInterface.close.

Close the result and delete any temporary files

protected abstract Value[]

Returns:

next row or null
fetchNextRow
()

Fetch next row or null if none available.

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 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.

public void
reset()

Implements org.h2.result.ResultInterface.reset.

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

public void
setFetchSize(int
the new fetch size
fetchSize
)

Implements org.h2.result.ResultInterface.setFetchSize.

Set the fetch size for this result set.

public void
setLimit(long limit)

public boolean

Returns:

true if a row exists
skip
()

Go to the next row and skip it.

protected boolean

Returns:

true if next row was available
skipNextRow
()

Skip next row.

Inherited from org.h2.result.FetchedResult:
createShallowCopycurrentRowgetRowIdisAfterLastneedToClosenext

Field Detail

closedback to summary
private boolean closed
expressionsback to summary
private final Expression[] expressions
limitback to summary
private long limit
sessionback to summary
private final SessionLocal session

Constructor Detail

LazyResultback to summary
public LazyResult(SessionLocal session, Expression[] expressions)

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
fetchNextRowback to summary
protected abstract Value[] fetchNextRow()

Fetch next row or null if none available.

Returns:Value[]

next row or null

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
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
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
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
setLimitback to summary
public void setLimit(long limit)
skipback to summary
public boolean skip()

Go to the next row and skip it.

Returns:boolean

true if a row exists

skipNextRowback to summary
protected boolean skipNextRow()

Skip next row.

Returns:boolean

true if next row was available