Skip to content

Commit

Permalink
parsing for CREATE PEER, PubSub and ES
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Apr 12, 2024
1 parent 773ae09 commit 6da04de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ define_keywords!(
DUPLICATE,
DYNAMIC,
EACH,
ELASTICSEARCH,
ELEMENT,
ELEMENTS,
ELSE,
Expand Down Expand Up @@ -510,6 +511,7 @@ define_keywords!(
PRIVILEGES,
PROCEDURE,
PROGRAM,
PUBSUB,
PURGE,
QUALIFY,
QUARTER,
Expand Down
4 changes: 4 additions & 0 deletions src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8406,6 +8406,8 @@ impl<'a> Parser<'a> {
Some(Keyword::S3) => Ok(PeerType::S3),
Some(Keyword::SQLSERVER) => Ok(PeerType::SQLServer),
Some(Keyword::EVENTHUBS) => Ok(PeerType::Eventhubs),
Some(Keyword::PUBSUB) => Ok(PeerType::PubSub),
Some(Keyword::ELASTICSEARCH) => Ok(PeerType::Elasticsearch),
other => {
let supported_peer_types = [
"BIGQUERY",
Expand All @@ -8416,6 +8418,8 @@ impl<'a> Parser<'a> {
"S3",
"SQLSERVER",

Check failure on line 8419 in src/parser/mod.rs

View workflow job for this annotation

GitHub Actions / codestyle

Diff in /home/runner/work/sqlparser-rs/sqlparser-rs/src/parser/mod.rs
"EVENTHUBS",
"PUBSUB",
"ELASTICSEARCH"
];
let err = format!(
"expected peertype as one of {}, got {:#?}",
Expand Down

0 comments on commit 6da04de

Please sign in to comment.