(
&mut self,
response: ExecuteResponse,
row_desc: Option<RelationDesc>,
portal_name: String,
max_rows: ExecuteCount,
get_response: GetResponse,
| 1907 | #[allow(clippy::too_many_arguments)] |
| 1908 | #[instrument(level = "debug")] |
| 1909 | async fn send_execute_response( |
| 1910 | &mut self, |
| 1911 | response: ExecuteResponse, |
| 1912 | row_desc: Option<RelationDesc>, |
| 1913 | portal_name: String, |
| 1914 | max_rows: ExecuteCount, |
| 1915 | get_response: GetResponse, |
| 1916 | fetch_portal_name: Option<String>, |
| 1917 | timeout: ExecuteTimeout, |
| 1918 | execute_started: Instant, |
| 1919 | ) -> Result<State, io::Error> { |
| 1920 | let mut tag = response.tag(); |
| 1921 | |
| 1922 | macro_rules! command_complete { |
| 1923 | () => {{ |
| 1924 | self.send(BackendMessage::CommandComplete { |
| 1925 | tag: tag |
| 1926 | .take() |
| 1927 | .expect("command_complete only called on tag-generating results"), |
| 1928 | }) |
| 1929 | .await?; |
| 1930 | Ok(State::Ready) |
| 1931 | }}; |
| 1932 | } |
| 1933 | |
| 1934 | let r = match response { |
| 1935 | ExecuteResponse::ClosedCursor => { |
| 1936 | self.complete_portal(&portal_name); |
| 1937 | command_complete!() |
| 1938 | } |
| 1939 | ExecuteResponse::DeclaredCursor => { |
| 1940 | self.complete_portal(&portal_name); |
| 1941 | command_complete!() |
| 1942 | } |
| 1943 | ExecuteResponse::EmptyQuery => { |
| 1944 | self.send(BackendMessage::EmptyQueryResponse).await?; |
| 1945 | Ok(State::Ready) |
| 1946 | } |
| 1947 | ExecuteResponse::Fetch { |
| 1948 | name, |
| 1949 | count, |
| 1950 | timeout, |
| 1951 | ctx_extra, |
| 1952 | } => { |
| 1953 | self.fetch( |
| 1954 | name, |
| 1955 | count, |
| 1956 | max_rows, |
| 1957 | Some(portal_name.to_string()), |
| 1958 | timeout, |
| 1959 | ctx_extra, |
| 1960 | ) |
| 1961 | .await |
| 1962 | } |
| 1963 | ExecuteResponse::SendingRowsStreaming { |
| 1964 | rows, |
| 1965 | instance_id, |
| 1966 | strategy, |
no test coverage detected