Package org.h2.result
Class MergedResult
- java.lang.Object
-
- org.h2.result.MergedResult
-
public final class MergedResult extends java.lang.ObjectMerged 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 aTypes.VARCHARcolumnNAMEthen another results that haveNAMEcolumn should also define it with the same type.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<SimpleResult.Column>columnsprivate java.util.ArrayList<java.util.Map<SimpleResult.Column,Value>>data
-
Constructor Summary
Constructors Constructor Description MergedResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(ResultInterface result)Appends a result.SimpleResultgetResult()Returns merged results.java.lang.StringtoString()
-
-
-
Field Detail
-
data
private final java.util.ArrayList<java.util.Map<SimpleResult.Column,Value>> data
-
columns
private final java.util.ArrayList<SimpleResult.Column> columns
-
-
Method Detail
-
add
public void add(ResultInterface result)
Appends a result.- Parameters:
result- result to append
-
getResult
public SimpleResult getResult()
Returns merged results.- Returns:
- result with rows from all appended result sets
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-