Skip to content

Commit 53a1ccc

Browse files
Ilson Roberto Balliego Juniorballiegojr
authored andcommitted
include comments for Snowflake structs
1 parent becab8c commit 53a1ccc

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
@@ -6315,6 +6315,10 @@ impl Display for MySQLColumnPosition {
63156315
}
63166316
}
63176317

6318+
/// Snowflake `WITH ROW ACCESS POLICY policy_name ON (identifier, ...)`
6319+
///
6320+
/// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
6321+
/// <https://docs.snowflake.com/en/user-guide/security-row-intro>
63186322
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
63196323
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
63206324
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
@@ -6340,6 +6344,9 @@ impl Display for RowAccessPolicy {
63406344
}
63416345
}
63426346

6347+
/// Snowflake `WITH TAG ( tag_name = '<tag_value>', ...)`
6348+
///
6349+
/// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
63436350
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
63446351
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
63456352
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
@@ -6360,10 +6367,13 @@ impl Display for Tag {
63606367
}
63616368
}
63626369

6370+
/// Helper to indicate if a comment includes the `=` in the display form
63636371
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
63646372
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
63656373
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
63666374
pub enum CommentDef {
6375+
/// Includes `=` when printing the comment, as `COMMENT = 'comment'`
6376+
/// Does not include `=` when printing the comment, as `COMMENT 'comment'`
63676377
WithEq(String),
63686378
WithoutEq(String),
63696379
}

0 commit comments

Comments
 (0)