public class CachedSelectResult extends SelectQueryResult
Modifier and Type | Field and Description |
---|---|
protected short |
warningCount |
isClosed, prepareResult
Constructor and Description |
---|
CachedSelectResult(ColumnInformation[] ci,
List<ValueObject[]> result,
short warningCount)
Initialisation.
|
Modifier and Type | Method and Description |
---|---|
void |
addResult(AbstractQueryResult other)
When using rewrite statement, there can be many insert/update command send to database, according to max_allowed_packet size.
|
static CachedSelectResult |
createCachedSelectResult(StreamingSelectResult streamingResult)
Will retrieve all "next" stream, and cache them.
|
ColumnInformation[] |
getColumnInformation() |
String |
getMessage() |
ResultSetType |
getResultSetType() |
int |
getRowPointer()
Gets the current row number.
|
int |
getRows() |
ValueObject |
getValueObject(int position)
gets the value at position i in the result set. i starts at zero!
|
short |
getWarnings() |
boolean |
isAfterLast()
Is pointer after last row.
|
boolean |
isBeforeFirst()
Is pointer before first row.
|
void |
moveRowPointerTo(int pointerPosition)
Moves the row pointer to position i.
|
boolean |
next()
Move pointer forward.
|
close, getFailureObject, isClosed, setFailureObject
public CachedSelectResult(ColumnInformation[] ci, List<ValueObject[]> result, short warningCount)
ci
- column informationsresult
- first valueObjectwarningCount
- warning countpublic void addResult(AbstractQueryResult other)
addResult
in class AbstractQueryResult
other
- other AbstractQueryResult.public static CachedSelectResult createCachedSelectResult(StreamingSelectResult streamingResult) throws IOException, QueryException
streamingResult
- streamingResult to populateIOException
- if any error occur during retreiving "next"s packetsQueryException
- if receiving an database error streampublic boolean next() throws IOException, QueryException
SelectQueryResult
next
in class SelectQueryResult
IOException
- ioExceptionQueryException
- queryExceptionpublic short getWarnings()
getWarnings
in class SelectQueryResult
public String getMessage()
getMessage
in class SelectQueryResult
public ColumnInformation[] getColumnInformation()
getColumnInformation
in class SelectQueryResult
public ValueObject getValueObject(int position) throws NoSuchColumnException
getValueObject
in class SelectQueryResult
position
- index, starts at 0NoSuchColumnException
- if the column does not existpublic int getRows()
getRows
in class AbstractQueryResult
public void moveRowPointerTo(int pointerPosition)
SelectQueryResult
moveRowPointerTo
in class SelectQueryResult
pointerPosition
- pointer to movepublic int getRowPointer()
SelectQueryResult
getRowPointer
in class SelectQueryResult
public ResultSetType getResultSetType()
getResultSetType
in class SelectQueryResult
public boolean isBeforeFirst()
isBeforeFirst
in class SelectQueryResult
public boolean isAfterLast()
isAfterLast
in class SelectQueryResult
Copyright © 2016. All rights reserved.