Top Description Fields Constructors Methods
org.h2.mvstore.db

pack-priv Class MVPlainTempResult

extends MVTempResult
Class Inheritance
Imports
org.h2.engine.Database, org.h2.expression.Expression, org.h2.message.DbException, org.h2.mvstore.Cursor, .MVMap, .MVMap.Builder, org.h2.mvstore.type.LongDataType, org.h2.result.ResultExternal, .RowFactory.DefaultRowFactory, org.h2.value.Value, .ValueRow

Plain temporary result.

Field Summary

Modifier and TypeField and Description
private long
counter

Counter for the identities of rows.

private Cursor<Long, ValueRow>
cursor

Cursor for the next() method.

private final MVMap<Long, ValueRow>
map

Map with identities of rows as keys rows as values.

Inherited from org.h2.mvstore.db.MVTempResult:
childCountclosedexpressionsparentresultColumnCountrowCountstorevisibleColumnCount

Constructor Summary

AccessConstructor and Description
private
MVPlainTempResult(MVPlainTempResult
parent result
parent
)

Creates a shallow copy of the result.

pack-priv
MVPlainTempResult(Database
database
database
,
Expression[]
column expressions
expressions
,
int
count of visible columns
visibleColumnCount
,
int
the number of columns including visible columns and additional virtual columns for ORDER BY clause
resultColumnCount
)

Creates a new plain temporary result.

Method Summary

Modifier and TypeMethod and Description
public int
addRow(Value[]
the row to add
values
)

Implements org.h2.result.ResultExternal.addRow.

Add a row to this object.

public boolean
contains(Value[]
the row
values
)

Implements org.h2.result.ResultExternal.contains.

Check if the given row exists in this object.

public synchronized ResultExternal
createShallowCopy()

Implements org.h2.result.ResultExternal.createShallowCopy.

Create a shallow copy of this object if possible.

public Value[]
next()

Implements org.h2.result.ResultExternal.next.

Get the next row from the result.

public int
removeRow(Value[]
the row
values
)

Implements org.h2.result.ResultExternal.removeRow.

Remove the row with the given values from this object if such a row exists.

public void
reset()

Implements org.h2.result.ResultExternal.reset.

Reset the current position of this object.

Inherited from org.h2.mvstore.db.MVTempResult:
addRowscloseof

Field Detail

counterback to summary
private long counter

Counter for the identities of rows. A separate counter is used instead of rowCount because rows due to presence of removeRow(Value[]) method to ensure that each row will have an own identity.

cursorback to summary
private Cursor<Long, ValueRow> cursor

Cursor for the next() method.

mapback to summary
private final MVMap<Long, ValueRow> map

Map with identities of rows as keys rows as values.

Constructor Detail

MVPlainTempResultback to summary
private MVPlainTempResult(MVPlainTempResult parent)

Creates a shallow copy of the result.

Parameters
parent:MVPlainTempResult

parent result

MVPlainTempResultback to summary
pack-priv MVPlainTempResult(Database database, Expression[] expressions, int visibleColumnCount, int resultColumnCount)

Creates a new plain temporary result. This result does not sort its rows, but it can be used in index-sorted queries and it can preserve additional columns for WITH TIES processing.

Parameters
database:Database

database

expressions:Expression[]

column expressions

visibleColumnCount:int

count of visible columns

resultColumnCount:int

the number of columns including visible columns and additional virtual columns for ORDER BY clause

Method Detail

addRowback to summary
public int addRow(Value[] values)

Implements org.h2.result.ResultExternal.addRow.

Doc from org.h2.result.ResultExternal.addRow.

Add a row to this object.

Parameters
values:Value[]

the row to add

Returns:int

the new number of rows in this object

Annotations
@Override
containsback to summary
public boolean contains(Value[] values)

Implements org.h2.result.ResultExternal.contains.

Doc from org.h2.result.ResultExternal.contains.

Check if the given row exists in this object.

Parameters
values:Value[]

the row

Returns:boolean

true if it exists

Annotations
@Override
createShallowCopyback to summary
public synchronized ResultExternal createShallowCopy()

Implements org.h2.result.ResultExternal.createShallowCopy.

Doc from org.h2.result.ResultExternal.createShallowCopy.

Create a shallow copy of this object if possible.

Returns:ResultExternal

the shallow copy, or null

Annotations
@Override
nextback to summary
public Value[] next()

Implements org.h2.result.ResultExternal.next.

Doc from org.h2.result.ResultExternal.next.

Get the next row from the result.

Returns:Value[]

the next row or null

Annotations
@Override
removeRowback to summary
public int removeRow(Value[] values)

Implements org.h2.result.ResultExternal.removeRow.

Doc from org.h2.result.ResultExternal.removeRow.

Remove the row with the given values from this object if such a row exists.

Parameters
values:Value[]

the row

Returns:int

the new row count

Annotations
@Override
resetback to summary
public void reset()

Implements org.h2.result.ResultExternal.reset.

Doc from org.h2.result.ResultExternal.reset.

Reset the current position of this object.

Annotations
@Override