Class 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 Detail

      • QueryWithParametersPacket

        public QueryWithParametersPacket​(String preSqlCmd,
                                         org.mariadb.jdbc.util.ClientParser parser,
                                         Parameters parameters)
        Constructor
        Parameters:
        preSqlCmd - additional pre command
        parser - command parser result
        parameters - parameters
    • Method Detail

      • 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 interface org.mariadb.jdbc.message.ClientMessage
        Parameters:
        encoder - socket writer
        context - connection context
        Returns:
        number of client message written
        Throws:
        IOException - if socket error occur
        SQLException - 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 interface org.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 interface org.mariadb.jdbc.message.ClientMessage
        Parameters:
        fileName - server file request path
        context - 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 interface org.mariadb.jdbc.message.ClientMessage
        Returns:
        description