Package org.mariadb.jdbc.message.client
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 String
private boolean
private final BasePreparedStatement
private Prepare
-
Constructor Summary
ConstructorsConstructorDescriptionBulkExecutePacket
(Prepare prepareResult, List<Parameters> batchParameterList, String command, BasePreparedStatement prep) Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
Number of parameter rows, and so expected return lengthboolean
Are return value encoded in binary protocolMessage descriptionint
encoder method in case of failover, passing new prepared objectsql command valueboolean
prep()
Server prepare statement callervoid
Save parameters of command that can be re-executedvoid
setPrepareResult
(PrepareResultPacket prepareResult) Set prepare result, if pipelining prepareMethods 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 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:RedoableClientMessage
Save parameters of command that can be re-executed- Specified by:
saveParameters
in interfaceRedoableClientMessage
-
encode
public int encode(Writer writer, Context context, Prepare newPrepareResult) throws IOException, SQLException Description copied from interface:RedoableWithPrepareClientMessage
encoder method in case of failover, passing new prepared object- Specified by:
encode
in interfaceRedoableClientMessage
- Specified by:
encode
in 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()- Specified by:
mightBeBulkResult
in interfaceClientMessage
-
batchUpdateLength
public int batchUpdateLength()Description copied from interface:ClientMessage
Number of parameter rows, and so expected return length- Specified by:
batchUpdateLength
in interfaceClientMessage
- Returns:
- batch update length
-
getCommand
Description copied from interface:RedoableWithPrepareClientMessage
sql command value- Specified by:
getCommand
in interfaceRedoableWithPrepareClientMessage
- Returns:
- sql command
-
prep
Description copied from interface:RedoableWithPrepareClientMessage
Server prepare statement caller- Specified by:
prep
in interfaceRedoableWithPrepareClientMessage
- Returns:
- caller
-
binaryProtocol
public boolean binaryProtocol()Description copied from interface:ClientMessage
Are return value encoded in binary protocol- Specified by:
binaryProtocol
in interfaceClientMessage
- Returns:
- use binary protocol
-
description
Description copied from interface:ClientMessage
Message description- Specified by:
description
in interfaceClientMessage
- Returns:
- description
-
setPrepareResult
Description copied from interface:RedoableWithPrepareClientMessage
Set prepare result, if pipelining prepare- Specified by:
setPrepareResult
in interfaceRedoableWithPrepareClientMessage
- Parameters:
prepareResult
- prepare results
-