docs: public static void sendSubCmd(final PacketOutputStream out,
        final ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int queryTimeout)
        throws IOException {
      out.write(Packet.COM_QUERY);
      if (queryTimeout > 0) {
        out.write(("SET STATEMENT max_statement_time=" + queryTimeout + " FOR ").getBytes());
      }
      if (clientPrepareResult.isRewriteType()) {
  
        out.write(clientPrepareResult.getQueryParts().get(0));
        out.write(clientPrepareResult.getQueryParts().get(1));
        for (int i = 0; i < clientPrepareResult.getParamCount(); i++) {
          parameters[i].writeTo(out);
          out.write(clientPrepareResult.getQueryParts().get(i + 2));
        }
        out
            .write(clientPrepareResult.getQueryParts().get(clientPrepareResult.getParamCount() + 2));
  
      } else {
  
        out.write(clientPrepareResult.getQueryParts().get(0));
        for (int i = 0; i < clientPrepareResult.getParamCount(); i++) {
          parameters[i].writeTo(out);
          out.write(clientPrepareResult.getQueryParts().get(i + 1));
        }
  
      }
  
    }