Injects state that affects how certain backend messages are encoded. Specifically, the encoding of `BackendMessage::DataRow` depends upon the types of the datums in the row. To avoid including the same type information in each message, we use this side channel to install the type information in the codec before sending any data row messages. This violates the abstraction boundary a bit but result
(
&mut self,
encode_state: Vec<(mz_pgrepr::Type, mz_pgwire_common::Format)>,
)
| 139 | /// violates the abstraction boundary a bit but results in much better |
| 140 | /// performance. |
| 141 | pub fn set_encode_state( |
| 142 | &mut self, |
| 143 | encode_state: Vec<(mz_pgrepr::Type, mz_pgwire_common::Format)>, |
| 144 | ) { |
| 145 | self.inner.get_mut().codec_mut().encode_state = encode_state; |
| 146 | } |
| 147 | |
| 148 | /// Enables or disables copy mode on the codec. |
| 149 | /// |