Handles a connection from a client to Spanner. This ConnectionHandler uses WireMessage to receive and send all messages from and to the client, using the intermediate
representation IntermediateStatement that servers as a middle layer between Postgres and
Spanner.
Each ConnectionHandler is also a Thread. Although a TCP connection does not
necessarily need to have its own thread, this makes the implementation more straightforward.
Add a currently executing statement to a buffer. This is only used in case a statement in
flight is cancelled. It must be saved separately, as a new connection is spawned to issue a
cancellation (as per Postgres protocol standard). This means some sort of IPC is required,
which in this case is a global Map.
To be used by a cancellation command to cancel a currently running statement, as contained in a
specific connection identified by connectionId. Since cancellation is a flimsy contract at
best, it is not imperative that the cancellation run, but it should be attempted nonetheless.
Simple runner starts a loop which keeps taking inbound messages, processing them, sending them
to Spanner, getting a result, processing that result, and replying to the client (in that
order). Also instantiates input and output streams from the client and handles auth.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-30 UTC."],[],[]]