Class MemoryMergedResult<T extends org.apache.shardingsphere.infra.rule.ShardingSphereRule>
- java.lang.Object
-
- org.apache.shardingsphere.infra.merge.result.impl.memory.MemoryMergedResult<T>
-
- Type Parameters:
T- type of rule
- All Implemented Interfaces:
MergedResult
public abstract class MemoryMergedResult<T extends org.apache.shardingsphere.infra.rule.ShardingSphereRule> extends Object implements MergedResult
Memory merged result.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMemoryMergedResult(T rule, org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema schema, SQLStatementContext sqlStatementContext, List<QueryResult> queryResults)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ObjectgetCalendarValue(int columnIndex, Class<?> type, Calendar calendar)Get calendar value.ReadergetCharacterStream(int columnIndex)Get CharacterStream.InputStreamgetInputStream(int columnIndex, String type)Get InputStream.ObjectgetValue(int columnIndex, Class<?> type)Get data value.protected abstract List<MemoryQueryResultRow>init(T rule, org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema schema, SQLStatementContext sqlStatementContext, List<QueryResult> queryResults)booleannext()Iterate next data.booleanwasNull()Judge ResultSet is null or not.
-
-
-
Constructor Detail
-
MemoryMergedResult
protected MemoryMergedResult(T rule, org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema schema, SQLStatementContext sqlStatementContext, List<QueryResult> queryResults) throws SQLException
- Throws:
SQLException
-
-
Method Detail
-
init
protected abstract List<MemoryQueryResultRow> init(T rule, org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereSchema schema, SQLStatementContext sqlStatementContext, List<QueryResult> queryResults) throws SQLException
- Throws:
SQLException
-
next
public final boolean next()
Description copied from interface:MergedResultIterate next data.- Specified by:
nextin interfaceMergedResult- Returns:
- has next data
-
getValue
public final Object getValue(int columnIndex, Class<?> type) throws SQLException
Description copied from interface:MergedResultGet data value.- Specified by:
getValuein interfaceMergedResult- Parameters:
columnIndex- column indextype- class type of data value- Returns:
- data value
- Throws:
SQLException- SQL exception
-
getCalendarValue
public final Object getCalendarValue(int columnIndex, Class<?> type, Calendar calendar)
Description copied from interface:MergedResultGet calendar value.- Specified by:
getCalendarValuein interfaceMergedResult- Parameters:
columnIndex- column indextype- class type of data valuecalendar- calendar- Returns:
- calendar value
-
getInputStream
public final InputStream getInputStream(int columnIndex, String type) throws SQLException
Description copied from interface:MergedResultGet InputStream.- Specified by:
getInputStreamin interfaceMergedResult- Parameters:
columnIndex- column indextype- class type of data value- Returns:
- InputStream
- Throws:
SQLException- SQL exception
-
getCharacterStream
public Reader getCharacterStream(int columnIndex) throws SQLException
Description copied from interface:MergedResultGet CharacterStream.- Specified by:
getCharacterStreamin interfaceMergedResult- Parameters:
columnIndex- column index- Returns:
- Reader
- Throws:
SQLException- SQL exception
-
wasNull
public final boolean wasNull()
Description copied from interface:MergedResultJudge ResultSet is null or not.- Specified by:
wasNullin interfaceMergedResult- Returns:
- ResultSet is null or not
-
-