public class CmdInformationBatch extends java.lang.Object implements CmdInformation
| Modifier and Type | Field and Description |
|---|---|
private int |
autoIncrement |
private int |
expectedSize |
private boolean |
hasException |
private int |
insertIdNumber |
private java.util.Queue<java.lang.Long> |
insertIds |
private boolean |
rewritten |
private java.util.Queue<java.lang.Long> |
updateCounts |
RESULT_SET_VALUE| Constructor and Description |
|---|
CmdInformationBatch(int expectedSize,
int autoIncrement)
CmdInformationBatch is similar to CmdInformationMultiple, but knowing it's for batch, doesn't
take take of moreResult.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorStat() |
void |
addResultSetStat() |
void |
addSuccessStat(long updateCount,
long insertId) |
java.sql.ResultSet |
getBatchGeneratedKeys(Protocol protocol) |
int |
getCurrentStatNumber() |
java.sql.ResultSet |
getGeneratedKeys(Protocol protocol,
java.lang.String sql)
Return GeneratedKeys containing insert ids.
|
long |
getLargeUpdateCount() |
long[] |
getLargeUpdateCounts() |
int[] |
getServerUpdateCounts() |
int |
getUpdateCount() |
int[] |
getUpdateCounts() |
boolean |
isCurrentUpdateCount() |
boolean |
moreResults() |
void |
reset()
Clear error state, used for clear exception after first batch query, when fall back to
per-query execution.
|
void |
setRewrite(boolean rewritten) |
private final java.util.Queue<java.lang.Long> insertIds
private final java.util.Queue<java.lang.Long> updateCounts
private final int expectedSize
private final int autoIncrement
private int insertIdNumber
private boolean hasException
private boolean rewritten
public CmdInformationBatch(int expectedSize,
int autoIncrement)
expectedSize - expected batch size.autoIncrement - connection auto increment value.public void addErrorStat()
addErrorStat in interface CmdInformationpublic void reset()
reset in interface CmdInformationpublic void addResultSetStat()
addResultSetStat in interface CmdInformationpublic void addSuccessStat(long updateCount,
long insertId)
addSuccessStat in interface CmdInformationpublic int[] getUpdateCounts()
getUpdateCounts in interface CmdInformationpublic int[] getServerUpdateCounts()
getServerUpdateCounts in interface CmdInformationpublic long[] getLargeUpdateCounts()
getLargeUpdateCounts in interface CmdInformationpublic int getUpdateCount()
getUpdateCount in interface CmdInformationpublic long getLargeUpdateCount()
getLargeUpdateCount in interface CmdInformationpublic java.sql.ResultSet getBatchGeneratedKeys(Protocol protocol)
getBatchGeneratedKeys in interface CmdInformationpublic java.sql.ResultSet getGeneratedKeys(Protocol protocol, java.lang.String sql)
getGeneratedKeys in interface CmdInformationprotocol - current protocolsql - SQL commandpublic int getCurrentStatNumber()
getCurrentStatNumber in interface CmdInformationpublic boolean moreResults()
moreResults in interface CmdInformationpublic boolean isCurrentUpdateCount()
isCurrentUpdateCount in interface CmdInformationpublic void setRewrite(boolean rewritten)
setRewrite in interface CmdInformation