mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-08-02 13:12:16 +00:00
Fix build (#1483)
This commit is contained in:
parent
8e0d26abb3
commit
ee90373d35
1 changed files with 5 additions and 3 deletions
|
@ -230,15 +230,17 @@ pub fn parse_comment(parser: &mut Parser) -> Result<Statement, ParserError> {
|
|||
}
|
||||
|
||||
pub fn parse_create(parser: &mut Parser) -> Option<Result<Statement, ParserError>> {
|
||||
let name = parser.maybe_parse(|parser| -> Result<ObjectName, ParserError> {
|
||||
match parser.maybe_parse(|parser| -> Result<ObjectName, ParserError> {
|
||||
parser.expect_keyword(Keyword::CREATE)?;
|
||||
parser.expect_keyword(Keyword::TYPE)?;
|
||||
let name = parser.parse_object_name(false)?;
|
||||
parser.expect_keyword(Keyword::AS)?;
|
||||
parser.expect_keyword(Keyword::ENUM)?;
|
||||
Ok(name)
|
||||
});
|
||||
name.map(|name| parse_create_type_as_enum(parser, name))
|
||||
}) {
|
||||
Ok(name) => name.map(|name| parse_create_type_as_enum(parser, name)),
|
||||
Err(e) => Some(Err(e)),
|
||||
}
|
||||
}
|
||||
|
||||
// https://www.postgresql.org/docs/current/sql-createtype.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue