Package com.google.cloud.spanner.pgadapter.wireprotocol (0.25.0)

Classes

AbstractQueryProtocolMessage

Abstract base class for extended query protocol messages. These can be buffered in memory locally until a flush or sync message is received. Any corresponding database statement will only be executed once a flush/sync is received.

BindMessage

Message of type bind (meaning that it is a message called to a prepared statement to complete it with missing data to prepare for execution). A bound prepared statement always yields a portal unless it fails.

BootstrapMessage

This represents all messages which occur before ControlMessage type messages. Those include encryption, admin (e.g.: cancellation) and start-up messages.

CancelMessage

This message handles the imperative cancellation, as issues in a new connection by the PG wire protocol. We expect that this message contains an ID for the connection which issues the original query, as well as an auth secret.

CloseMessage

Close the designated statement.

ControlMessage

Generic representation for a control wire message: that is, a message which does not handle any form of start-up, but reather general communications.

CopyDataMessage

Normally used to send data to the back-end. Spanner does not currently support this, so send will throw a descriptive error to be sent to the user. Note that we do parse this in order for this to be future proof, and to ensure the input stream is flushed of the command (in order to continue receiving properly)

CopyDoneMessage

Normally used to signal a copy command is done. Spanner does not currently support copies, so send will throw a descriptive error to be sent to the user. Note that we do parse this in order for this to be future proof, and to ensure the input stream is flushed of the command (in order to continue receiving properly)

CopyFailMessage

Normally used to signal a copy command failed. Spanner does not currently support copies, so send will throw a descriptive error to be sent to the user. Note that we do parse this in order for this to be future proof, and to ensure the input stream is flushed of the command (in order to continue receiving properly)

DescribeMessage

Calls describe on a portal or prepared statement.

ExecuteMessage

Executes a portal.

FlushMessage

Handles a flush command from the user. This flushes any pending changes to Cloud Spanner and then sends any pending messages to the client.

FunctionCallMessage

Normally used to send a function call the back-end. Spanner does not currently support this, so send will throw a descriptive error to be sent to the user. Note that we do parse this in order for this to be future proof, and to ensure the input stream is flushed of the command (in order to continue receiving properly)

ParseMessage

Creates a prepared statement.

PasswordMessage

PGAdapter will convert a password message into gRPC authentication in the following ways:

  1. If the username is 'oauth2' the password will be interpreted as an OAuth2 token.
  2. If the username is an email address and the password contains private key section, PGAdapter will construct a service account from the email address and private key.
  3. Otherwise, PGAdapter will try to construct a Google credentials instance from the string in the password message. The username will be ignored.

QueryMessage

Executes a simple statement.

SSLMessage

Handles SSL bootstrap message.

SkipMessage

SkipMessage is a pseudo wire-protocol message that is used to read and skip messages that we receive that we do not want at that time. This applies to COPY messages during normal operation, and sync/flush messages during COPY operation.

StartupMessage

The first (non-encryption, non-admin) message expected in from a client in a connection loop. Here we handle metadata and authentication if any.

SyncMessage

Handles a sync command from the user. JDBC does not require this step, so server-side this is a noop.

TerminateMessage

Closes a connection.

WireMessage

Generic representation for a wire message, generally executed by calling send.

Enums

ControlMessage.ManuallyCreatedToken

Token that is used to mark ControlMessages that are manually created to execute a QueryMessage.

ControlMessage.PreparedType