MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / parse_source_option_name

Method parse_source_option_name

src/sql-parser/src/parser.rs:3303–3316  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

3301 }
3302
3303 fn parse_source_option_name(&mut self) -> Result<CreateSourceOptionName, ParserError> {
3304 let name = match self.expect_one_of_keywords(&[TIMESTAMP, RETAIN])? {
3305 TIMESTAMP => {
3306 self.expect_keyword(INTERVAL)?;
3307 CreateSourceOptionName::TimestampInterval
3308 }
3309 RETAIN => {
3310 self.expect_keyword(HISTORY)?;
3311 CreateSourceOptionName::RetainHistory
3312 }
3313 _ => unreachable!(),
3314 };
3315 Ok(name)
3316 }
3317
3318 /// Parses a single valid option in the WITH block of a create source
3319 fn parse_source_option(&mut self) -> Result<CreateSourceOption<Raw>, ParserError> {

Callers 1

parse_source_optionMethod · 0.80

Calls 2

expect_keywordMethod · 0.80

Tested by

no test coverage detected