Class CmdInformationMultiple
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.read.dao.CmdInformationMultiple
-
- All Implemented Interfaces:
CmdInformation
public class CmdInformationMultiple extends java.lang.Object implements CmdInformation
-
-
Field Summary
Fields Modifier and Type Field Description private int
autoIncrement
private int
expectedSize
private boolean
hasException
private int
insertIdNumber
private java.util.ArrayList<java.lang.Long>
insertIds
private int
moreResults
private boolean
rewritten
private java.util.ArrayList<java.lang.Long>
updateCounts
-
Fields inherited from interface org.mariadb.jdbc.internal.com.read.dao.CmdInformation
RESULT_SET_VALUE
-
-
Constructor Summary
Constructors Constructor Description CmdInformationMultiple(int expectedSize, int autoIncrement)
Object containing update / insert ids, optimized for only multiple result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
insertIds
private final java.util.ArrayList<java.lang.Long> insertIds
-
updateCounts
private final java.util.ArrayList<java.lang.Long> 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
-
-
Method Detail
-
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
public java.sql.ResultSet getBatchGeneratedKeys(Protocol protocol)
- Specified by:
getBatchGeneratedKeys
in interfaceCmdInformation
-
getGeneratedKeys
public java.sql.ResultSet getGeneratedKeys(Protocol protocol, java.lang.String sql)
Return GeneratedKeys containing insert ids. Insert ids are calculated using autoincrement value.- Specified by:
getGeneratedKeys
in interfaceCmdInformation
- Parameters:
protocol
- current protocolsql
- SQL command- 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
-
-