(&mut self)
| 4598 | } |
| 4599 | |
| 4600 | fn parse_alter_cluster_option(&mut self) -> Result<ClusterAlterOption<Raw>, ParserError> { |
| 4601 | let (name, value) = match self.expect_one_of_keywords(&[WAIT])? { |
| 4602 | WAIT => { |
| 4603 | let _ = self.consume_token(&Token::Eq); |
| 4604 | let v = match self.expect_one_of_keywords(&[FOR, UNTIL])? { |
| 4605 | FOR => Some(WithOptionValue::ClusterAlterStrategy( |
| 4606 | ClusterAlterOptionValue::For(self.parse_value()?), |
| 4607 | )), |
| 4608 | UNTIL => { |
| 4609 | self.expect_keyword(READY)?; |
| 4610 | let _ = self.consume_token(&Token::Eq); |
| 4611 | self.expect_token(&Token::LParen)?; |
| 4612 | let opts = Some(WithOptionValue::ClusterAlterStrategy( |
| 4613 | ClusterAlterOptionValue::UntilReady(self.parse_comma_separated( |
| 4614 | Parser::parse_cluster_alter_until_ready_option, |
| 4615 | )?), |
| 4616 | )); |
| 4617 | self.expect_token(&Token::RParen)?; |
| 4618 | opts |
| 4619 | } |
| 4620 | _ => unreachable!(), |
| 4621 | }; |
| 4622 | (ClusterAlterOptionName::Wait, v) |
| 4623 | } |
| 4624 | _ => unreachable!(), |
| 4625 | }; |
| 4626 | Ok(ClusterAlterOption { name, value }) |
| 4627 | } |
| 4628 | |
| 4629 | fn parse_cluster_alter_until_ready_option( |
| 4630 | &mut self, |
nothing calls this directly
no test coverage detected