Skip to content

Commit e8d0bc1

Browse files
hovaescoclaude
andcommitted
Snowflake: parse SHOW [TERSE] UNIQUE KEYS
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent cbd33aa commit e8d0bc1

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/ast/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,6 +2554,8 @@ pub enum ShowKeysKind {
25542554
Imported,
25552555
/// `SHOW EXPORTED KEYS`
25562556
Exported,
2557+
/// `SHOW [TERSE] UNIQUE KEYS`
2558+
Unique,
25572559
}
25582560

25592561
impl fmt::Display for ShowKeysKind {
@@ -2562,6 +2564,7 @@ impl fmt::Display for ShowKeysKind {
25622564
ShowKeysKind::Primary => f.write_str("PRIMARY"),
25632565
ShowKeysKind::Imported => f.write_str("IMPORTED"),
25642566
ShowKeysKind::Exported => f.write_str("EXPORTED"),
2567+
ShowKeysKind::Unique => f.write_str("UNIQUE"),
25652568
}
25662569
}
25672570
}

src/dialect/snowflake.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,9 @@ impl Dialect for SnowflakeDialect {
665665
if parser.parse_keyword(Keyword::EXPORTED) {
666666
return Some(parse_show_keys(ShowKeysKind::Exported, terse, parser));
667667
}
668+
if parser.parse_keyword(Keyword::UNIQUE) {
669+
return Some(parse_show_keys(ShowKeysKind::Unique, terse, parser));
670+
}
668671
if parser.parse_keywords(&[Keyword::ROW, Keyword::ACCESS, Keyword::POLICIES]) {
669672
return Some(parse_show_row_access_policies(parser));
670673
}

0 commit comments

Comments
 (0)