Class QueryPacket
java.lang.Object
org.mariadb.jdbc.message.client.QueryPacket
- All Implemented Interfaces:
RedoableClientMessage, ClientMessage
Query client packet COM_QUERY see https://mariadb.com/kb/en/com_query/
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQueryPacket(String sql) ConstructorQueryPacket(String sql, InputStream localInfileInputStream) Constructor with local infile input stream -
Method Summary
Modifier and TypeMethodDescriptionintNumber of parameter rows, and so expected return lengthMessage descriptionintEncode client message to socket.Get current local infile input stream.booleanisCommit()Check that command is a COMMIT commandbooleanvalidateLocalFileName(String fileName, Context context) Request for local file to be validated from current query.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClientMessage
binaryProtocol, canSkipMeta, mightBeBulkResult, readPacketMethods inherited from interface RedoableClientMessage
encode, ensureReplayable, reEncode, saveParameters
-
Field Details
-
sql
-
localInfileInputStream
-
-
Constructor Details
-
QueryPacket
-
QueryPacket
Constructor with local infile input stream- Parameters:
sql- sqllocalInfileInputStream- local infile input stream
-
-
Method Details
-
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
-
encode
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:
IOException- if socket error occur
-
isCommit
public boolean isCommit()Check that command is a COMMIT command- Returns:
- true if a commit command
-
validateLocalFileName
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
-
getLocalInfileInputStream
Description copied from interface:ClientMessageGet current local infile input stream.- Specified by:
getLocalInfileInputStreamin interfaceClientMessage- Returns:
- default to null
-
description
Description copied from interface:ClientMessageMessage description- Specified by:
descriptionin interfaceClientMessage- Returns:
- description
-