Class CmdInformationMultiple
java.lang.Object
org.mariadb.jdbc.internal.com.read.dao.CmdInformationMultiple
- All Implemented Interfaces:
CmdInformation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final int
private boolean
private int
private int
private boolean
Fields inherited from interface org.mariadb.jdbc.internal.com.read.dao.CmdInformation
RESULT_SET_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionCmdInformationMultiple
(int expectedSize, int autoIncrement) Object containing update / insert ids, optimized for only multiple result. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
addSuccessStat
(long updateCount, long insertId) getBatchGeneratedKeys
(Protocol protocol) int
getGeneratedKeys
(Protocol protocol) Return GeneratedKeys containing insert ids.long
long[]
int[]
int
int[]
boolean
boolean
void
reset()
Clear error state, used for clear exception after first batch query, when fall back to per-query execution.void
setRewrite
(boolean rewritten)
-
Field Details
-
insertIds
-
updateCounts
-
expectedSize
private final int expectedSize -
autoIncrement
private final int autoIncrement -
insertIdNumber
private int insertIdNumber -
moreResults
private int moreResults -
hasException
private boolean hasException -
rewritten
private boolean rewritten
-
-
Constructor Details
-
CmdInformationMultiple
public CmdInformationMultiple(int expectedSize, int autoIncrement) Object containing update / insert ids, optimized for only multiple result.- Parameters:
expectedSize
- expected batch size.autoIncrement
- connection auto increment value.
-
-
Method Details
-
addErrorStat
public void addErrorStat()- Specified by:
addErrorStat
in interfaceCmdInformation
-
reset
public void reset()Clear error state, used for clear exception after first batch query, when fall back to per-query execution.- Specified by:
reset
in interfaceCmdInformation
-
addResultSetStat
public void addResultSetStat()- Specified by:
addResultSetStat
in interfaceCmdInformation
-
addSuccessStat
public void addSuccessStat(long updateCount, long insertId) - Specified by:
addSuccessStat
in interfaceCmdInformation
-
getServerUpdateCounts
public int[] getServerUpdateCounts()- Specified by:
getServerUpdateCounts
in interfaceCmdInformation
-
getUpdateCounts
public int[] getUpdateCounts()- Specified by:
getUpdateCounts
in interfaceCmdInformation
-
getLargeUpdateCounts
public long[] getLargeUpdateCounts()- Specified by:
getLargeUpdateCounts
in interfaceCmdInformation
-
getUpdateCount
public int getUpdateCount()- Specified by:
getUpdateCount
in interfaceCmdInformation
-
getLargeUpdateCount
public long getLargeUpdateCount()- Specified by:
getLargeUpdateCount
in interfaceCmdInformation
-
getBatchGeneratedKeys
- Specified by:
getBatchGeneratedKeys
in interfaceCmdInformation
-
getGeneratedKeys
Return GeneratedKeys containing insert ids. Insert ids are calculated using autoincrement value.- Specified by:
getGeneratedKeys
in interfaceCmdInformation
- Parameters:
protocol
- current protocol- Returns:
- a resultSet with insert ids.
-
getCurrentStatNumber
public int getCurrentStatNumber()- Specified by:
getCurrentStatNumber
in interfaceCmdInformation
-
moreResults
public boolean moreResults()- Specified by:
moreResults
in interfaceCmdInformation
-
isCurrentUpdateCount
public boolean isCurrentUpdateCount()- Specified by:
isCurrentUpdateCount
in interfaceCmdInformation
-
setRewrite
public void setRewrite(boolean rewritten) - Specified by:
setRewrite
in interfaceCmdInformation
-