Package org.mariadb.jdbc.message.client
Class QueryWithParametersRewritePacket
- java.lang.Object
-
- org.mariadb.jdbc.message.client.QueryWithParametersRewritePacket
-
- All Implemented Interfaces:
RedoableClientMessage,ClientMessage
public final class QueryWithParametersRewritePacket extends java.lang.Object implements RedoableClientMessage
batch execution using REWRITE.- See Also:
- documentation
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Parameters>parametersListprivate ClientParserparserprivate java.lang.StringpreSqlCmd-
Fields inherited from interface org.mariadb.jdbc.message.ClientMessage
LOAD_LOCAL_INFILE_PREFIX
-
-
Constructor Summary
Constructors Constructor Description QueryWithParametersRewritePacket(java.lang.String preSqlCmd, ClientParser parser, java.util.List<Parameters> batchParameterList)
-
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)Encode client message to socket.voidensureReplayable(Context context)Ensure that command can be replayedjava.io.InputStreamgetLocalInfileInputStream()Get current local infile input stream.voidsaveParameters()Save parameters of command that can be re-executedbooleanvalidateLocalFileName(java.lang.String fileName, Context context)Request for local file to be validated from current query.-
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, mightBeBulkResult, readPacket
-
Methods inherited from interface org.mariadb.jdbc.message.client.RedoableClientMessage
encode, reEncode
-
-
-
-
Field Detail
-
preSqlCmd
private final java.lang.String preSqlCmd
-
parser
private final ClientParser parser
-
parametersList
private java.util.List<Parameters> parametersList
-
-
Constructor Detail
-
QueryWithParametersRewritePacket
public QueryWithParametersRewritePacket(java.lang.String preSqlCmd, ClientParser parser, java.util.List<Parameters> batchParameterList)- Parameters:
preSqlCmd- pre sql commandparser- parserbatchParameterList- parameters
-
-
Method Detail
-
saveParameters
public void saveParameters()
Description copied from interface:RedoableClientMessageSave parameters of command that can be re-executed- Specified by:
saveParametersin interfaceRedoableClientMessage
-
ensureReplayable
public void ensureReplayable(Context context) throws java.io.IOException, java.sql.SQLException
Description copied from interface:RedoableClientMessageEnsure that command can be replayed- Specified by:
ensureReplayablein interfaceRedoableClientMessage- Parameters:
context- connection context- Throws:
java.io.IOException- If socket error occursjava.sql.SQLException- for other type of issue
-
encode
public int encode(Writer writer, Context context) throws java.io.IOException, java.sql.SQLException
Description copied from interface:ClientMessageEncode client message to socket.- Specified by:
encodein interfaceClientMessage- Parameters:
writer- socket writercontext- connection context- Returns:
- number of client message written
- Throws:
java.io.IOException- if socket error occurjava.sql.SQLException- if any issue occurs
-
binaryProtocol
public boolean binaryProtocol()
Description copied from interface:ClientMessageAre return value encoded in binary protocol- Specified by:
binaryProtocolin interfaceClientMessage- Returns:
- use binary protocol
-
getLocalInfileInputStream
public java.io.InputStream getLocalInfileInputStream()
Description copied from interface:ClientMessageGet current local infile input stream.- Specified by:
getLocalInfileInputStreamin interfaceClientMessage- Returns:
- default to null
-
description
public java.lang.String description()
Description copied from interface:ClientMessageMessage description- Specified by:
descriptionin interfaceClientMessage- Returns:
- description
-
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
-
validateLocalFileName
public boolean validateLocalFileName(java.lang.String fileName, Context context)Description copied from interface:ClientMessageRequest for local file to be validated from current query.- Specified by:
validateLocalFileNamein interfaceClientMessage- Parameters:
fileName- server file request pathcontext- current connection context- Returns:
- true if file name correspond to demand and query is a load local infile
-
-