Package org.h2.mvstore.db
Class MVPlainTempResult
java.lang.Object
org.h2.mvstore.db.MVTempResult
org.h2.mvstore.db.MVPlainTempResult
- All Implemented Interfaces:
ResultExternal
Plain temporary result.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
Counter for the identities of rows.Cursor for thenext()
method.Map with identities of rows as keys rows as values.Fields inherited from class org.h2.mvstore.db.MVTempResult
childCount, closed, expressions, parent, resultColumnCount, rowCount, store, visibleColumnCount
-
Constructor Summary
ConstructorsModifierConstructorDescription(package private)
MVPlainTempResult
(Database database, Expression[] expressions, int visibleColumnCount, int resultColumnCount) Creates a new plain temporary result.private
MVPlainTempResult
(MVPlainTempResult parent) Creates a shallow copy of the result. -
Method Summary
Modifier and TypeMethodDescriptionint
Add a row to this object.boolean
Check if the given row exists in this object.Create a shallow copy of this object if possible.Value[]
next()
Get the next row from the result.int
Remove the row with the given values from this object if such a row exists.void
reset()
Reset the current position of this object.Methods inherited from class org.h2.mvstore.db.MVTempResult
addRows, close, of
-
Field Details
-
map
Map with identities of rows as keys rows as values. -
counter
private long counterCounter for the identities of rows. A separate counter is used instead ofMVTempResult.rowCount
because rows due to presence ofremoveRow(Value[])
method to ensure that each row will have an own identity. -
cursor
Cursor for thenext()
method.
-
-
Constructor Details
-
MVPlainTempResult
Creates a shallow copy of the result.- Parameters:
parent
- parent result
-
MVPlainTempResult
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
- databaseexpressions
- column expressionsvisibleColumnCount
- count of visible columnsresultColumnCount
- the number of columns including visible columns and additional virtual columns for ORDER BY clause
-
-
Method Details
-
addRow
Description copied from interface:ResultExternal
Add a row to this object.- Parameters:
values
- the row to add- Returns:
- the new number of rows in this object
-
contains
Description copied from interface:ResultExternal
Check if the given row exists in this object.- Parameters:
values
- the row- Returns:
- true if it exists
-
createShallowCopy
Description copied from interface:ResultExternal
Create a shallow copy of this object if possible.- Returns:
- the shallow copy, or null
-
next
Description copied from interface:ResultExternal
Get the next row from the result.- Returns:
- the next row or null
-
removeRow
Description copied from interface:ResultExternal
Remove the row with the given values from this object if such a row exists.- Parameters:
values
- the row- Returns:
- the new row count
-
reset
public void reset()Description copied from interface:ResultExternal
Reset the current position of this object.
-