Package org.mariadb.jdbc.message.client
Class QueryWithParametersPacket
- java.lang.Object
-
- org.mariadb.jdbc.message.client.QueryWithParametersPacket
-
- All Implemented Interfaces:
RedoableClientMessage
,org.mariadb.jdbc.message.ClientMessage
public final class QueryWithParametersPacket extends Object implements RedoableClientMessage
Query client packet COM_QUERY see https://mariadb.com/kb/en/com_query/ same than QueryPacket, but with parameters that will be escaped
-
-
Constructor Summary
Constructors Constructor Description QueryWithParametersPacket(String preSqlCmd, org.mariadb.jdbc.util.ClientParser parser, Parameters parameters)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
batchUpdateLength()
Number of parameter rows, and so expected return lengthString
description()
Message descriptionint
encode(Writer encoder, org.mariadb.jdbc.client.Context context)
Encode client message to socket.void
ensureReplayable(org.mariadb.jdbc.client.Context context)
Ensure that command can be replayedvoid
saveParameters()
Save parameters of command that can be re-executedboolean
validateLocalFileName(String fileName, org.mariadb.jdbc.client.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
binaryProtocol, canSkipMeta, readPacket
-
Methods inherited from interface org.mariadb.jdbc.message.client.RedoableClientMessage
encode, reEncode
-
-
-
-
Constructor Detail
-
QueryWithParametersPacket
public QueryWithParametersPacket(String preSqlCmd, org.mariadb.jdbc.util.ClientParser parser, Parameters parameters)
Constructor- Parameters:
preSqlCmd
- additional pre commandparser
- command parser resultparameters
- parameters
-
-
Method Detail
-
ensureReplayable
public void ensureReplayable(org.mariadb.jdbc.client.Context context) throws IOException, SQLException
Description copied from interface:RedoableClientMessage
Ensure that command can be replayed- Specified by:
ensureReplayable
in interfaceRedoableClientMessage
- Parameters:
context
- connection context- Throws:
IOException
- If socket error occursSQLException
- for other type of issue
-
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 encoder, org.mariadb.jdbc.client.Context context) throws IOException, SQLException
Description copied from interface:org.mariadb.jdbc.message.ClientMessage
Encode client message to socket.- Specified by:
encode
in interfaceorg.mariadb.jdbc.message.ClientMessage
- Parameters:
encoder
- socket writercontext
- connection context- Returns:
- number of client message written
- Throws:
IOException
- if socket error occurSQLException
- if any issue occurs
-
batchUpdateLength
public int batchUpdateLength()
Description copied from interface:org.mariadb.jdbc.message.ClientMessage
Number of parameter rows, and so expected return length- Specified by:
batchUpdateLength
in interfaceorg.mariadb.jdbc.message.ClientMessage
- Returns:
- batch update length
-
validateLocalFileName
public boolean validateLocalFileName(String fileName, org.mariadb.jdbc.client.Context context)
Description copied from interface:org.mariadb.jdbc.message.ClientMessage
Request for local file to be validated from current query.- Specified by:
validateLocalFileName
in interfaceorg.mariadb.jdbc.message.ClientMessage
- Parameters:
fileName
- server file request pathcontext
- current connection context- Returns:
- true if file name correspond to demand and query is a load local infile
-
description
public String description()
Description copied from interface:org.mariadb.jdbc.message.ClientMessage
Message description- Specified by:
description
in interfaceorg.mariadb.jdbc.message.ClientMessage
- Returns:
- description
-
-