@@ -474,6 +474,9 @@ impl fmt::Display for IdentWithAlias {
474474#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
475475#[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
476476pub struct WildcardAdditionalOptions {
477+ /// `[ILIKE...]`.
478+ /// Snowflake syntax: <https://docs.snowflake.com/en/sql-reference/sql/select>
479+ pub opt_ilike : Option < IlikeSelectItem > ,
477480 /// `[EXCLUDE...]`.
478481 pub opt_exclude : Option < ExcludeSelectItem > ,
479482 /// `[EXCEPT...]`.
@@ -489,6 +492,9 @@ pub struct WildcardAdditionalOptions {
489492
490493impl fmt:: Display for WildcardAdditionalOptions {
491494 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
495+ if let Some ( ilike) = & self . opt_ilike {
496+ write ! ( f, " {ilike}" ) ?;
497+ }
492498 if let Some ( exclude) = & self . opt_exclude {
493499 write ! ( f, " {exclude}" ) ?;
494500 }
@@ -505,6 +511,29 @@ impl fmt::Display for WildcardAdditionalOptions {
505511 }
506512}
507513
514+ /// Snowflake `ILIKE` information.
515+ ///
516+ /// # Syntax
517+ /// ```plaintext
518+ /// ILIKE <value>
519+ /// ```
520+ #[ derive( Debug , Clone , PartialEq , PartialOrd , Eq , Ord , Hash ) ]
521+ #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
522+ #[ cfg_attr( feature = "visitor" , derive( Visit , VisitMut ) ) ]
523+ pub struct IlikeSelectItem {
524+ pub pattern : String ,
525+ }
526+
527+ impl fmt:: Display for IlikeSelectItem {
528+ fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
529+ write ! (
530+ f,
531+ "ILIKE '{}'" ,
532+ value:: escape_single_quote_string( & self . pattern)
533+ ) ?;
534+ Ok ( ( ) )
535+ }
536+ }
508537/// Snowflake `EXCLUDE` information.
509538///
510539/// # Syntax
0 commit comments