Package org.mariadb.jdbc.message.client
Class BulkExecutePacket
- java.lang.Object
-
- org.mariadb.jdbc.message.client.BulkExecutePacket
-
- All Implemented Interfaces:
RedoableClientMessage,RedoableWithPrepareClientMessage,ClientMessage
public final class BulkExecutePacket extends java.lang.Object implements RedoableWithPrepareClientMessage
batch execution. This relies on COM_STMT_BULK_EXECUTE- See Also:
- documentation
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Parameters>batchParameterListprivate java.lang.Stringcommandprivate booleanmightBeBulkResultprivate BasePreparedStatementprepprivate PrepareprepareResult
-
Constructor Summary
Constructors Constructor Description BulkExecutePacket(Prepare prepareResult, java.util.List<Parameters> batchParameterList, java.lang.String command, BasePreparedStatement prep)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intbatchUpdateLength()Number of parameter rows, and so expected return lengthbooleanbinaryProtocol()Are return value encoded in binary protocoljava.lang.Stringdescription()Message descriptionintencode(Writer writer, Context context, Prepare newPrepareResult)encoder method in case of failover, passing new prepared objectjava.lang.StringgetCommand()sql command valuebooleanmightBeBulkResult()Indicating if result might be a COM_STMT_BULK resultBasePreparedStatementprep()Server prepare statement callervoidsaveParameters()Save parameters of command that can be re-executedvoidsetPrepareResult(PrepareResultPacket prepareResult)Set prepare result, if pipelining prepare-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.jdbc.message.ClientMessage
canSkipMeta, getLocalInfileInputStream, readPacket, validateLocalFileName
-
Methods inherited from interface org.mariadb.jdbc.message.client.RedoableClientMessage
ensureReplayable
-
Methods inherited from interface org.mariadb.jdbc.message.client.RedoableWithPrepareClientMessage
encode, reEncode, rePrepare
-
-
-
-
Field Detail
-
command
private final java.lang.String command
-
prep
private final BasePreparedStatement prep
-
batchParameterList
private java.util.List<Parameters> batchParameterList
-
prepareResult
private Prepare prepareResult
-
mightBeBulkResult
private boolean mightBeBulkResult
-
-
Constructor Detail
-
BulkExecutePacket
public BulkExecutePacket(Prepare prepareResult, java.util.List<Parameters> batchParameterList, java.lang.String command, BasePreparedStatement prep)
Constructor- Parameters:
prepareResult- prepare resultbatchParameterList- batch parameter listcommand- sql commandprep- object creator
-
-
Method Detail
-
saveParameters
public void saveParameters()
Description copied from interface:RedoableClientMessageSave parameters of command that can be re-executed- Specified by:
saveParametersin interfaceRedoableClientMessage
-
encode
public int encode(Writer writer, Context context, Prepare newPrepareResult) throws java.io.IOException, java.sql.SQLException
Description copied from interface:RedoableWithPrepareClientMessageencoder method in case of failover, passing new prepared object- Specified by:
encodein interfaceRedoableClientMessage- Specified by:
encodein interfaceRedoableWithPrepareClientMessage- Parameters:
writer- socket writercontext- connection contextnewPrepareResult- new prepare result- Returns:
- number of command sent
- Throws:
java.io.IOException- if a socket exception occursjava.sql.SQLException- for any other kind of error
-
mightBeBulkResult
public boolean mightBeBulkResult()
Description copied from interface:ClientMessageIndicating if result might be a COM_STMT_BULK result- Specified by:
mightBeBulkResultin interfaceClientMessage- Returns:
- true if so.
-
batchUpdateLength
public int batchUpdateLength()
Description copied from interface:ClientMessageNumber of parameter rows, and so expected return length- Specified by:
batchUpdateLengthin interfaceClientMessage- Returns:
- batch update length
-
getCommand
public java.lang.String getCommand()
Description copied from interface:RedoableWithPrepareClientMessagesql command value- Specified by:
getCommandin interfaceRedoableWithPrepareClientMessage- Returns:
- sql command
-
prep
public BasePreparedStatement prep()
Description copied from interface:RedoableWithPrepareClientMessageServer prepare statement caller- Specified by:
prepin interfaceRedoableWithPrepareClientMessage- Returns:
- caller
-
binaryProtocol
public boolean binaryProtocol()
Description copied from interface:ClientMessageAre return value encoded in binary protocol- Specified by:
binaryProtocolin interfaceClientMessage- Returns:
- use binary protocol
-
description
public java.lang.String description()
Description copied from interface:ClientMessageMessage description- Specified by:
descriptionin interfaceClientMessage- Returns:
- description
-
setPrepareResult
public void setPrepareResult(PrepareResultPacket prepareResult)
Description copied from interface:RedoableWithPrepareClientMessageSet prepare result, if pipelining prepare- Specified by:
setPrepareResultin interfaceRedoableWithPrepareClientMessage- Parameters:
prepareResult- prepare results
-
-