Skip to content

Commit

Permalink
Fix build and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavcloud committed Nov 13, 2024
1 parent 198ca40 commit ee68514
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7354,9 +7354,9 @@ impl Display for UtilityOption {
}
}

/// Represents the different options available for a SHOW <OBJECT>
/// statement to filter the results. Example from Snowflake:
/// https://docs.snowflake.com/en/sql-reference/sql/show-tables
/// Represents the different options available for `SHOW`
/// statements to filter the results. Example from Snowflake:
/// <https://docs.snowflake.com/en/sql-reference/sql/show-tables>
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
Expand Down Expand Up @@ -7404,13 +7404,16 @@ impl Display for ShowStatementOptions {
}

#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
pub enum ShowStatementFilterPosition {
Infix(ShowStatementFilter), // For example: SHOW COLUMNS LIKE '%name%' IN TABLE tbl
Suffix(ShowStatementFilter), // For example: SHOW COLUMNS IN tbl LIKE '%name%'
}

#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
pub enum ShowStatementInParentType {
Account,
Database,
Expand All @@ -7433,6 +7436,7 @@ impl fmt::Display for ShowStatementInParentType {

#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
pub struct ShowStatementIn {
pub clause: ShowStatementInClause,
pub parent_type: Option<ShowStatementInParentType>,
Expand Down
2 changes: 1 addition & 1 deletion src/dialect/snowflake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl Dialect for SnowflakeDialect {
}

/// Snowflake expects the `LIKE` option before the `IN` option,
/// for example: https://docs.snowflake.com/en/sql-reference/sql/show-views#syntax
/// for example: <https://docs.snowflake.com/en/sql-reference/sql/show-views#syntax>
fn supports_show_like_before_in(&self) -> bool {
true
}
Expand Down

0 comments on commit ee68514

Please sign in to comment.