Skip to content

Commit 4b1219c

Browse files
author
Ilson Roberto Balliego Junior
committed
include comments for Snowflake structs
1 parent b75d3e5 commit 4b1219c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/ast/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6464,6 +6464,10 @@ impl Display for MySQLColumnPosition {
64646464
}
64656465
}
64666466

6467+
/// Snowflake `WITH ROW ACCESS POLICY policy_name ON (identifier, ...)`
6468+
///
6469+
/// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
6470+
/// <https://docs.snowflake.com/en/user-guide/security-row-intro>
64676471
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
64686472
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
64696473
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
@@ -6489,6 +6493,9 @@ impl Display for RowAccessPolicy {
64896493
}
64906494
}
64916495

6496+
/// Snowflake `WITH TAG ( tag_name = '<tag_value>', ...)`
6497+
///
6498+
/// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
64926499
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
64936500
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
64946501
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
@@ -6509,10 +6516,13 @@ impl Display for Tag {
65096516
}
65106517
}
65116518

6519+
/// Helper to indicate if a comment includes the `=` in the display form
65126520
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
65136521
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
65146522
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
65156523
pub enum CommentDef {
6524+
/// Includes `=` when printing the comment, as `COMMENT = 'comment'`
6525+
/// Does not include `=` when printing the comment, as `COMMENT 'comment'`
65166526
WithEq(String),
65176527
WithoutEq(String),
65186528
}

0 commit comments

Comments
 (0)