Parse the name of a CREATE SINK optional parameter
(&mut self)
| 3598 | |
| 3599 | /// Parse the name of a CREATE SINK optional parameter |
| 3600 | fn parse_create_sink_option_name(&mut self) -> Result<CreateSinkOptionName, ParserError> { |
| 3601 | let name = match self.expect_one_of_keywords(&[PARTITION, SNAPSHOT, VERSION, COMMIT])? { |
| 3602 | SNAPSHOT => CreateSinkOptionName::Snapshot, |
| 3603 | VERSION => CreateSinkOptionName::Version, |
| 3604 | PARTITION => { |
| 3605 | self.expect_keyword(STRATEGY)?; |
| 3606 | CreateSinkOptionName::PartitionStrategy |
| 3607 | } |
| 3608 | COMMIT => { |
| 3609 | self.expect_keyword(INTERVAL)?; |
| 3610 | CreateSinkOptionName::CommitInterval |
| 3611 | } |
| 3612 | _ => unreachable!(), |
| 3613 | }; |
| 3614 | Ok(name) |
| 3615 | } |
| 3616 | |
| 3617 | /// Parse a NAME = VALUE parameter for CREATE SINK |
| 3618 | fn parse_create_sink_option(&mut self) -> Result<CreateSinkOption<Raw>, ParserError> { |
no test coverage detected