Class BulkExecutePacket
java.lang.Object
org.mariadb.jdbc.message.client.BulkExecutePacket
- All Implemented Interfaces:
RedoableClientMessage, RedoableWithPrepareClientMessage, ClientMessage
batch execution. This relies on COM_STMT_BULK_EXECUTE
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<Parameters> private final Stringprivate booleanprivate final BasePreparedStatementprivate Prepare -
Constructor Summary
ConstructorsConstructorDescriptionBulkExecutePacket(Prepare prepareResult, List<Parameters> batchParameterList, String command, BasePreparedStatement prep) Constructor -
Method Summary
Modifier and TypeMethodDescriptionintNumber of parameter rows, and so expected return lengthbooleanAre return value encoded in binary protocolMessage descriptionintencoder method in case of failover, passing new prepared objectsql command valuebooleanIndicating if result might be a COM_STMT_BULK resultprep()Server prepare statement callervoidSave parameters of command that can be re-executedvoidsetPrepareResult(PrepareResultPacket prepareResult) Set prepare result, if pipelining prepareMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClientMessage
canSkipMeta, getLocalInfileInputStream, readPacket, validateLocalFileNameMethods inherited from interface RedoableClientMessage
ensureReplayableMethods inherited from interface RedoableWithPrepareClientMessage
encode, reEncode, rePrepare
-
Field Details
-
command
-
prep
-
batchParameterList
-
prepareResult
-
mightBeBulkResult
private boolean mightBeBulkResult
-
-
Constructor Details
-
BulkExecutePacket
public BulkExecutePacket(Prepare prepareResult, List<Parameters> batchParameterList, String command, BasePreparedStatement prep) Constructor- Parameters:
prepareResult- prepare resultbatchParameterList- batch parameter listcommand- sql commandprep- object creator
-
-
Method Details
-
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 IOException, 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:
IOException- if a socket exception occursSQLException- 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
Description copied from interface:RedoableWithPrepareClientMessagesql command value- Specified by:
getCommandin interfaceRedoableWithPrepareClientMessage- Returns:
- sql command
-
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
Description copied from interface:ClientMessageMessage description- Specified by:
descriptionin interfaceClientMessage- Returns:
- description
-
setPrepareResult
Description copied from interface:RedoableWithPrepareClientMessageSet prepare result, if pipelining prepare- Specified by:
setPrepareResultin interfaceRedoableWithPrepareClientMessage- Parameters:
prepareResult- prepare results
-