Top Description Fields Constructors Methods
org.h2.result

public final Class MergedResult

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .HashMap, .Map, org.h2.util.Utils, org.h2.value.Value

Merged result. Used to combine several results into one. Merged result will contain rows from all appended results. Results are not required to have the same lists of columns, but required to have compatible column definitions, for example, if one result has a java.sql.Types#VARCHAR column NAME then another results that have NAME column should also define it with the same type.

Field Summary

Modifier and TypeField and Description
private final ArrayList<SimpleResult.Column>
private final ArrayList<Map<SimpleResult.Column, Value>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
add(ResultInterface
result to append
result
)

Appends a result.

public SimpleResult

Returns:

result with rows from all appended result sets
getResult
()

Returns merged results.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

columnsback to summary
private final ArrayList<SimpleResult.Column> columns
databack to summary
private final ArrayList<Map<SimpleResult.Column, Value>> data

Constructor Detail

MergedResultback to summary
public MergedResult()

Method Detail

addback to summary
public void add(ResultInterface result)

Appends a result.

Parameters
result:ResultInterface

result to append

getResultback to summary
public SimpleResult getResult()

Returns merged results.

Returns:SimpleResult

result with rows from all appended result sets

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