Class DescribeMessage (0.18.4)

public class DescribeMessage extends AbstractQueryProtocolMessage

Calls describe on a portal or prepared statement.

Static Fields

IDENTIFIER

protected static final char IDENTIFIER
Field Value
TypeDescription
char

Constructors

DescribeMessage(ConnectionHandler connection)

public DescribeMessage(ConnectionHandler connection)
Parameter
NameDescription
connectionConnectionHandler

DescribeMessage(ConnectionHandler connection, ControlMessage.ManuallyCreatedToken manuallyCreatedToken)

public DescribeMessage(ConnectionHandler connection, ControlMessage.ManuallyCreatedToken manuallyCreatedToken)

Constructor for manually created Describe messages from the simple query protocol.

Parameters
NameDescription
connectionConnectionHandler
manuallyCreatedTokenControlMessage.ManuallyCreatedToken

DescribeMessage(ConnectionHandler connection, ControlMessage.PreparedType type, String name, ControlMessage.ManuallyCreatedToken manuallyCreatedToken)

public DescribeMessage(ConnectionHandler connection, ControlMessage.PreparedType type, String name, ControlMessage.ManuallyCreatedToken manuallyCreatedToken)

Constructor for manually created Describe messages from PREPARE statements.

Parameters
NameDescription
connectionConnectionHandler
typeControlMessage.PreparedType
nameString
manuallyCreatedTokenControlMessage.ManuallyCreatedToken

Methods

flush()

public void flush()
Overrides
Exceptions
TypeDescription
Exception

getHeaderLength()

protected int getHeaderLength()

How many bytes is taken by the payload header. Header is defined here as protocol definition + length. Most common value here is four bytes, so we keep that as default. Effectively, this is how much of the message you "don't" want to read from the message's total length with readAll.

Returns
TypeDescription
int
Overrides

getIdentifier()

protected String getIdentifier()

Used for logging.

Returns
TypeDescription
String
Overrides

getMessageName()

protected String getMessageName()

Used for logging.

Returns
TypeDescription
String
Overrides

getName()

public String getName()
Returns
TypeDescription
String

getPayloadString()

protected String getPayloadString()

Used for logging.

Returns
TypeDescription
String
Overrides

getSql()

public String getSql()
Returns
TypeDescription
String
Overrides

getType()

public ControlMessage.PreparedType getType()
Returns
TypeDescription
ControlMessage.PreparedType

handleDescribeStatement()

public void handleDescribeStatement()

Called when a describe message of type 'S' is received.

Exceptions
TypeDescription
Exception

if sending the message back to the client causes an error.