Class Parse

java.lang.Object
io.r2dbc.postgresql.message.frontend.Parse
All Implemented Interfaces:
FrontendMessage, FrontendMessage.DirectEncoder

public final class Parse extends Object implements FrontendMessage, FrontendMessage.DirectEncoder
The Parse message.
  • Field Details

  • Constructor Details

    • Parse

      public Parse(String name, int[] parameters, String query)
      Create a new message.
      Parameters:
      name - the name of the destination prepared statement (an empty string selects the unnamed prepared statement)
      parameters - the object IDs of the parameter data types. Placing a zero here is equivalent to leaving the type unspecified.
      query - the query string to be parsed
      Throws:
      IllegalArgumentException - if name, parameters, or query is null
      See Also:
  • Method Details

    • encode

      public Publisher<io.netty.buffer.ByteBuf> encode(io.netty.buffer.ByteBufAllocator byteBufAllocator)
      Description copied from interface: FrontendMessage
      Encode a message into a ByteBuf.
      Specified by:
      encode in interface FrontendMessage
      Parameters:
      byteBufAllocator - the byteBufAllocator to use to get a ByteBuf to write into
      Returns:
      a Publisher that produces the ByteBuf containing the encoded message
    • encode

      public void encode(io.netty.buffer.ByteBuf byteBuf)
      Description copied from interface: FrontendMessage.DirectEncoder
      Encode a message directly by writing its content to a ByteBuf.
      Specified by:
      encode in interface FrontendMessage.DirectEncoder
      Parameters:
      byteBuf - the target ByteBuf to write into
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object