Parses a key constraint.
(&mut self)
| 3290 | |
| 3291 | /// Parses a key constraint. |
| 3292 | fn parse_key_constraint(&mut self) -> Result<Option<KeyConstraint>, ParserError> { |
| 3293 | // PRIMARY KEY (col_1, ..., col_n) NOT ENFORCED |
| 3294 | if self.parse_keywords(&[PRIMARY, KEY]) { |
| 3295 | let columns = self.parse_parenthesized_column_list(Mandatory)?; |
| 3296 | self.expect_keywords(&[NOT, ENFORCED])?; |
| 3297 | Ok(Some(KeyConstraint::PrimaryKeyNotEnforced { columns })) |
| 3298 | } else { |
| 3299 | Ok(None) |
| 3300 | } |
| 3301 | } |
| 3302 | |
| 3303 | fn parse_source_option_name(&mut self) -> Result<CreateSourceOptionName, ParserError> { |
| 3304 | let name = match self.expect_one_of_keywords(&[TIMESTAMP, RETAIN])? { |
no test coverage detected