public class ComQuery
extends java.lang.Object
Constructor and Description |
---|
ComQuery() |
Modifier and Type | Method and Description |
---|---|
static int |
sendBatchAggregateSemiColon(PacketOutputStream writer,
java.lang.String firstQuery,
java.util.List<java.lang.String> queries,
int currentIndex)
Statement.executeBatch() rewritten multiple (concatenate with ";") according to
max_allowed_packet)
|
static void |
sendDirect(PacketOutputStream pos,
byte[] sqlBytes)
Send directly to socket the sql data.
|
static void |
sendDirect(PacketOutputStream pos,
byte[] sqlBytes,
int queryTimeout)
Send directly to socket the sql data.
|
static void |
sendMultiDirect(PacketOutputStream pos,
java.util.List<byte[]> sqlBytes)
Send directly to socket the sql data.
|
static void |
sendMultiDirect(PacketOutputStream pos,
java.util.List<byte[]> sqlBytes,
int queryTimeout)
Send directly to socket the sql data.
|
static int |
sendRewriteCmd(PacketOutputStream pos,
java.util.List<byte[]> queryParts,
int currentIndex,
int paramCount,
java.util.List<ParameterHolder[]> parameterList,
boolean rewriteValues)
Client side PreparedStatement.executeBatch values rewritten (concatenate value params according
to max_allowed_packet)
|
static void |
sendSubCmd(PacketOutputStream out,
ClientPrepareResult clientPrepareResult,
ParameterHolder[] parameters,
int queryTimeout)
Client-side PrepareStatement.execute() packet send.
|
public static void sendSubCmd(PacketOutputStream out, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int queryTimeout) throws java.io.IOException
out
- outputStreamclientPrepareResult
- clientPrepareResultparameters
- parameterqueryTimeout
- query timeoutjava.io.IOException
- if connection failpublic static int sendRewriteCmd(PacketOutputStream pos, java.util.List<byte[]> queryParts, int currentIndex, int paramCount, java.util.List<ParameterHolder[]> parameterList, boolean rewriteValues) throws java.io.IOException
pos
- outputStreamqueryParts
- query partscurrentIndex
- currentIndexparamCount
- parameter posparameterList
- parameter listrewriteValues
- is query rewritable by adding valuesjava.io.IOException
- if connection failpublic static int sendBatchAggregateSemiColon(PacketOutputStream writer, java.lang.String firstQuery, java.util.List<java.lang.String> queries, int currentIndex) throws java.io.IOException
writer
- outputstreamfirstQuery
- first queryqueries
- queriescurrentIndex
- currentIndexjava.io.IOException
- if connection error occurpublic static void sendDirect(PacketOutputStream pos, byte[] sqlBytes) throws java.io.IOException
pos
- output streamsqlBytes
- the query in UTF-8 bytesjava.io.IOException
- if connection error occurpublic static void sendDirect(PacketOutputStream pos, byte[] sqlBytes, int queryTimeout) throws java.io.IOException
pos
- output streamsqlBytes
- the query in UTF-8 bytesqueryTimeout
- timeout using max_statement_timejava.io.IOException
- if connection error occurpublic static void sendMultiDirect(PacketOutputStream pos, java.util.List<byte[]> sqlBytes) throws java.io.IOException
pos
- output streamsqlBytes
- the query in UTF-8 bytesjava.io.IOException
- if connection error occurpublic static void sendMultiDirect(PacketOutputStream pos, java.util.List<byte[]> sqlBytes, int queryTimeout) throws java.io.IOException
pos
- output streamsqlBytes
- the query in UTF-8 bytesqueryTimeout
- timeout using max_statement_timejava.io.IOException
- if connection error occur