Parse the next token as a value for an option list Note this is different than [`parse_value`] as it allows any word or keyword in this location. [`parse_value`]: sqlparser::parser::Parser::parse_value
(&mut self)
| 745 | /// |
| 746 | /// [`parse_value`]: sqlparser::parser::Parser::parse_value |
| 747 | pub fn parse_option_value(&mut self) -> Result<Value, DataFusionError> { |
| 748 | let next_token = self.parser.next_token(); |
| 749 | match next_token.token { |
| 750 | // e.g. things like "snappy" or "gzip" that may be keywords |
| 751 | Token::Word(word) => Ok(Value::SingleQuotedString(word.value)), |
| 752 | Token::SingleQuotedString(s) => Ok(Value::SingleQuotedString(s)), |
| 753 | Token::DoubleQuotedString(s) => Ok(Value::DoubleQuotedString(s)), |
| 754 | Token::EscapedStringLiteral(s) => Ok(Value::EscapedStringLiteral(s)), |
| 755 | Token::Number(n, l) => Ok(Value::Number(n, l)), |
| 756 | _ => self.expected("string or numeric value", &next_token), |
| 757 | } |
| 758 | } |
| 759 | |
| 760 | /// Parse a SQL `EXPLAIN` |
| 761 | pub fn parse_explain(&mut self) -> Result<Statement, DataFusionError> { |
no test coverage detected