Class ComQuery
- java.lang.Object
-
- org.mariadb.jdbc.internal.com.send.ComQuery
-
public class ComQuery extends Object
-
-
Constructor Summary
Constructors Constructor Description ComQuery()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intsendBatchAggregateSemiColon(PacketOutputStream writer, String firstQuery, List<String> queries, int currentIndex)Statement.executeBatch() rewritten multiple (concatenate with ";") according to max_allowed_packet)static voidsendDirect(PacketOutputStream pos, byte[] sqlBytes)Send directly to socket the sql data.static voidsendDirect(PacketOutputStream pos, byte[] sqlBytes, int queryTimeout)Send directly to socket the sql data.static voidsendMultiDirect(PacketOutputStream pos, List<byte[]> sqlBytes)Send directly to socket the sql data.static voidsendMultiDirect(PacketOutputStream pos, List<byte[]> sqlBytes, int queryTimeout)Send directly to socket the sql data.static intsendRewriteCmd(PacketOutputStream pos, List<byte[]> queryParts, int currentIndex, int paramCount, List<ParameterHolder[]> parameterList, boolean rewriteValues)Client side PreparedStatement.executeBatch values rewritten (concatenate value params according to max_allowed_packet)static voidsendSubCmd(PacketOutputStream out, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int queryTimeout)Client-side PrepareStatement.execute() packet send.
-
-
-
Method Detail
-
sendSubCmd
public static void sendSubCmd(PacketOutputStream out, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int queryTimeout) throws IOException
Client-side PrepareStatement.execute() packet send.- Parameters:
out- outputStreamclientPrepareResult- clientPrepareResultparameters- parameterqueryTimeout- query timeout- Throws:
IOException- if connection fail
-
sendRewriteCmd
public static int sendRewriteCmd(PacketOutputStream pos, List<byte[]> queryParts, int currentIndex, int paramCount, List<ParameterHolder[]> parameterList, boolean rewriteValues) throws IOException
Client side PreparedStatement.executeBatch values rewritten (concatenate value params according to max_allowed_packet)- Parameters:
pos- outputStreamqueryParts- query partscurrentIndex- currentIndexparamCount- parameter posparameterList- parameter listrewriteValues- is query rewritable by adding values- Returns:
- current index
- Throws:
IOException- if connection fail
-
sendBatchAggregateSemiColon
public static int sendBatchAggregateSemiColon(PacketOutputStream writer, String firstQuery, List<String> queries, int currentIndex) throws IOException
Statement.executeBatch() rewritten multiple (concatenate with ";") according to max_allowed_packet)- Parameters:
writer- outputstreamfirstQuery- first queryqueries- queriescurrentIndex- currentIndex- Returns:
- current index
- Throws:
IOException- if connection error occur
-
sendDirect
public static void sendDirect(PacketOutputStream pos, byte[] sqlBytes) throws IOException
Send directly to socket the sql data.- Parameters:
pos- output streamsqlBytes- the query in UTF-8 bytes- Throws:
IOException- if connection error occur
-
sendDirect
public static void sendDirect(PacketOutputStream pos, byte[] sqlBytes, int queryTimeout) throws IOException
Send directly to socket the sql data.- Parameters:
pos- output streamsqlBytes- the query in UTF-8 bytesqueryTimeout- timeout using max_statement_time- Throws:
IOException- if connection error occur
-
sendMultiDirect
public static void sendMultiDirect(PacketOutputStream pos, List<byte[]> sqlBytes) throws IOException
Send directly to socket the sql data.- Parameters:
pos- output streamsqlBytes- the query in UTF-8 bytes- Throws:
IOException- if connection error occur
-
sendMultiDirect
public static void sendMultiDirect(PacketOutputStream pos, List<byte[]> sqlBytes, int queryTimeout) throws IOException
Send directly to socket the sql data.- Parameters:
pos- output streamsqlBytes- the query in UTF-8 bytesqueryTimeout- timeout using max_statement_time- Throws:
IOException- if connection error occur
-
-