Skip to main content

sqlparser/ast/
ddl.rs

1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements.  See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.  The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License.  You may obtain a copy of the License at
8//
9//   http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18//! AST types specific to CREATE/ALTER variants of [`Statement`](crate::ast::Statement)
19//! (commonly referred to as Data Definition Language, or DDL)
20
21#[cfg(not(feature = "std"))]
22use alloc::{
23    boxed::Box,
24    format,
25    string::{String, ToString},
26    vec,
27    vec::Vec,
28};
29use core::fmt::{self, Display, Write};
30
31#[cfg(feature = "serde")]
32use serde::{Deserialize, Serialize};
33
34#[cfg(feature = "visitor")]
35use sqlparser_derive::{Visit, VisitMut};
36
37use crate::ast::value::escape_single_quote_string;
38use crate::ast::{
39    display_comma_separated, display_separated,
40    table_constraints::{
41        CheckConstraint, ForeignKeyConstraint, PrimaryKeyConstraint, TableConstraint,
42        UniqueConstraint,
43    },
44    ArgMode, AttachedToken, CommentDef, ConditionalStatements, CreateFunctionBody,
45    CreateFunctionUsing, CreateTableLikeKind, CreateTableOptions, CreateViewParams, DataType, Expr,
46    FileFormat, FunctionBehavior, FunctionCalledOnNull, FunctionDefinitionSetParam, FunctionDesc,
47    FunctionDeterminismSpecifier, FunctionParallel, FunctionSecurity, HiveDistributionStyle,
48    HiveFormat, HiveIOFormat, HiveRowFormat, HiveSetLocation, Ident, InitializeKind,
49    MySQLColumnPosition, ObjectName, OnCommit, OneOrManyWithParens, OperateFunctionArg,
50    OrderByExpr, ProjectionSelect, Query, RefreshModeKind, RowAccessPolicy, SequenceOptions,
51    Spanned, SqlOption, StorageSerializationPolicy, TableVersion, Tag, TriggerEvent,
52    TriggerExecBody, TriggerObject, TriggerPeriod, TriggerReferencing, Value, ValueWithSpan,
53    WrappedCollection,
54};
55use crate::display_utils::{DisplayCommaSeparated, Indent, NewLine, SpaceOrNewline};
56use crate::keywords::Keyword;
57use crate::tokenizer::{Span, Token};
58
59/// Index column type.
60#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IndexColumn {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "IndexColumn",
            "column", &self.column, "operator_class", &&self.operator_class)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IndexColumn {
    #[inline]
    fn clone(&self) -> IndexColumn {
        IndexColumn {
            column: ::core::clone::Clone::clone(&self.column),
            operator_class: ::core::clone::Clone::clone(&self.operator_class),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IndexColumn {
    #[inline]
    fn eq(&self, other: &IndexColumn) -> bool {
        self.column == other.column &&
            self.operator_class == other.operator_class
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IndexColumn {
    #[inline]
    fn partial_cmp(&self, other: &IndexColumn)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.column,
                &other.column) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.operator_class,
                    &other.operator_class),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IndexColumn {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<OrderByExpr>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IndexColumn {
    #[inline]
    fn cmp(&self, other: &IndexColumn) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.column, &other.column) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.operator_class,
                    &other.operator_class),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IndexColumn {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.column, state);
        ::core::hash::Hash::hash(&self.operator_class, state)
    }
}Hash)]
61#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
62#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IndexColumn {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.column, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operator_class,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IndexColumn {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.column, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operator_class,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
63pub struct IndexColumn {
64    /// The indexed column expression.
65    pub column: OrderByExpr,
66    /// Optional operator class (index operator name).
67    pub operator_class: Option<ObjectName>,
68}
69
70impl From<Ident> for IndexColumn {
71    fn from(c: Ident) -> Self {
72        Self {
73            column: OrderByExpr::from(c),
74            operator_class: None,
75        }
76    }
77}
78
79impl<'a> From<&'a str> for IndexColumn {
80    fn from(c: &'a str) -> Self {
81        let ident = Ident::new(c);
82        ident.into()
83    }
84}
85
86impl fmt::Display for IndexColumn {
87    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
88        f.write_fmt(format_args!("{0}", self.column))write!(f, "{}", self.column)?;
89        if let Some(operator_class) = &self.operator_class {
90            f.write_fmt(format_args!(" {0}", operator_class))write!(f, " {operator_class}")?;
91        }
92        Ok(())
93    }
94}
95
96/// ALTER TABLE operation REPLICA IDENTITY values
97/// See [Postgres ALTER TABLE docs](https://www.postgresql.org/docs/current/sql-altertable.html)
98#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ReplicaIdentity {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ReplicaIdentity::Nothing =>
                ::core::fmt::Formatter::write_str(f, "Nothing"),
            ReplicaIdentity::Full =>
                ::core::fmt::Formatter::write_str(f, "Full"),
            ReplicaIdentity::Default =>
                ::core::fmt::Formatter::write_str(f, "Default"),
            ReplicaIdentity::Index(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Index",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ReplicaIdentity {
    #[inline]
    fn clone(&self) -> ReplicaIdentity {
        match self {
            ReplicaIdentity::Nothing => ReplicaIdentity::Nothing,
            ReplicaIdentity::Full => ReplicaIdentity::Full,
            ReplicaIdentity::Default => ReplicaIdentity::Default,
            ReplicaIdentity::Index(__self_0) =>
                ReplicaIdentity::Index(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ReplicaIdentity {
    #[inline]
    fn eq(&self, other: &ReplicaIdentity) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (ReplicaIdentity::Index(__self_0),
                    ReplicaIdentity::Index(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ReplicaIdentity {
    #[inline]
    fn partial_cmp(&self, other: &ReplicaIdentity)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (ReplicaIdentity::Index(__self_0),
                ReplicaIdentity::Index(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ReplicaIdentity {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ReplicaIdentity {
    #[inline]
    fn cmp(&self, other: &ReplicaIdentity) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (ReplicaIdentity::Index(__self_0),
                        ReplicaIdentity::Index(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ReplicaIdentity {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            ReplicaIdentity::Index(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
99#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
100#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ReplicaIdentity {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Nothing => {}
                            Self::Full => {}
                            Self::Default => {}
                            Self::Index(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ReplicaIdentity {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Nothing => {}
                            Self::Full => {}
                            Self::Default => {}
                            Self::Index(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
101pub enum ReplicaIdentity {
102    /// No replica identity (`REPLICA IDENTITY NOTHING`).
103    Nothing,
104    /// Full replica identity (`REPLICA IDENTITY FULL`).
105    Full,
106    /// Default replica identity (`REPLICA IDENTITY DEFAULT`).
107    Default,
108    /// Use the given index as replica identity (`REPLICA IDENTITY USING INDEX`).
109    Index(Ident),
110}
111
112impl fmt::Display for ReplicaIdentity {
113    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
114        match self {
115            ReplicaIdentity::Nothing => f.write_str("NOTHING"),
116            ReplicaIdentity::Full => f.write_str("FULL"),
117            ReplicaIdentity::Default => f.write_str("DEFAULT"),
118            ReplicaIdentity::Index(idx) => f.write_fmt(format_args!("USING INDEX {0}", idx))write!(f, "USING INDEX {idx}"),
119        }
120    }
121}
122
123/// An `ALTER TABLE` (`Statement::AlterTable`) operation
124#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTableOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterTableOperation::AddConstraint {
                constraint: __self_0, not_valid: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "AddConstraint", "constraint", __self_0, "not_valid",
                    &__self_1),
            AlterTableOperation::AddColumn {
                column_keyword: __self_0,
                if_not_exists: __self_1,
                column_def: __self_2,
                column_position: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "AddColumn", "column_keyword", __self_0, "if_not_exists",
                    __self_1, "column_def", __self_2, "column_position",
                    &__self_3),
            AlterTableOperation::AddProjection {
                if_not_exists: __self_0, name: __self_1, select: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "AddProjection", "if_not_exists", __self_0, "name",
                    __self_1, "select", &__self_2),
            AlterTableOperation::DropProjection {
                if_exists: __self_0, name: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "DropProjection", "if_exists", __self_0, "name", &__self_1),
            AlterTableOperation::MaterializeProjection {
                if_exists: __self_0, name: __self_1, partition: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "MaterializeProjection", "if_exists", __self_0, "name",
                    __self_1, "partition", &__self_2),
            AlterTableOperation::ClearProjection {
                if_exists: __self_0, name: __self_1, partition: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "ClearProjection", "if_exists", __self_0, "name", __self_1,
                    "partition", &__self_2),
            AlterTableOperation::DisableRowLevelSecurity =>
                ::core::fmt::Formatter::write_str(f,
                    "DisableRowLevelSecurity"),
            AlterTableOperation::DisableRule { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "DisableRule", "name", &__self_0),
            AlterTableOperation::DisableTrigger { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "DisableTrigger", "name", &__self_0),
            AlterTableOperation::DropConstraint {
                if_exists: __self_0, name: __self_1, drop_behavior: __self_2 }
                =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "DropConstraint", "if_exists", __self_0, "name", __self_1,
                    "drop_behavior", &__self_2),
            AlterTableOperation::DropColumn {
                has_column_keyword: __self_0,
                column_names: __self_1,
                if_exists: __self_2,
                drop_behavior: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "DropColumn", "has_column_keyword", __self_0,
                    "column_names", __self_1, "if_exists", __self_2,
                    "drop_behavior", &__self_3),
            AlterTableOperation::AttachPartition { partition: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "AttachPartition", "partition", &__self_0),
            AlterTableOperation::DetachPartition { partition: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "DetachPartition", "partition", &__self_0),
            AlterTableOperation::FreezePartition {
                partition: __self_0, with_name: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "FreezePartition", "partition", __self_0, "with_name",
                    &__self_1),
            AlterTableOperation::UnfreezePartition {
                partition: __self_0, with_name: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "UnfreezePartition", "partition", __self_0, "with_name",
                    &__self_1),
            AlterTableOperation::DropPrimaryKey { drop_behavior: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "DropPrimaryKey", "drop_behavior", &__self_0),
            AlterTableOperation::DropForeignKey {
                name: __self_0, drop_behavior: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "DropForeignKey", "name", __self_0, "drop_behavior",
                    &__self_1),
            AlterTableOperation::DropIndex { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "DropIndex", "name", &__self_0),
            AlterTableOperation::EnableAlwaysRule { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "EnableAlwaysRule", "name", &__self_0),
            AlterTableOperation::EnableAlwaysTrigger { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "EnableAlwaysTrigger", "name", &__self_0),
            AlterTableOperation::EnableReplicaRule { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "EnableReplicaRule", "name", &__self_0),
            AlterTableOperation::EnableReplicaTrigger { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "EnableReplicaTrigger", "name", &__self_0),
            AlterTableOperation::EnableRowLevelSecurity =>
                ::core::fmt::Formatter::write_str(f,
                    "EnableRowLevelSecurity"),
            AlterTableOperation::ForceRowLevelSecurity =>
                ::core::fmt::Formatter::write_str(f, "ForceRowLevelSecurity"),
            AlterTableOperation::NoForceRowLevelSecurity =>
                ::core::fmt::Formatter::write_str(f,
                    "NoForceRowLevelSecurity"),
            AlterTableOperation::EnableRule { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "EnableRule", "name", &__self_0),
            AlterTableOperation::EnableTrigger { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "EnableTrigger", "name", &__self_0),
            AlterTableOperation::RenamePartitions {
                old_partitions: __self_0, new_partitions: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "RenamePartitions", "old_partitions", __self_0,
                    "new_partitions", &__self_1),
            AlterTableOperation::ReplicaIdentity { identity: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "ReplicaIdentity", "identity", &__self_0),
            AlterTableOperation::AddPartitions {
                if_not_exists: __self_0, new_partitions: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "AddPartitions", "if_not_exists", __self_0,
                    "new_partitions", &__self_1),
            AlterTableOperation::DropPartitions {
                partitions: __self_0, if_exists: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "DropPartitions", "partitions", __self_0, "if_exists",
                    &__self_1),
            AlterTableOperation::RenameColumn {
                old_column_name: __self_0, new_column_name: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "RenameColumn", "old_column_name", __self_0,
                    "new_column_name", &__self_1),
            AlterTableOperation::RenameTable { table_name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "RenameTable", "table_name", &__self_0),
            AlterTableOperation::ChangeColumn {
                old_name: __self_0,
                new_name: __self_1,
                data_type: __self_2,
                options: __self_3,
                column_position: __self_4 } =>
                ::core::fmt::Formatter::debug_struct_field5_finish(f,
                    "ChangeColumn", "old_name", __self_0, "new_name", __self_1,
                    "data_type", __self_2, "options", __self_3,
                    "column_position", &__self_4),
            AlterTableOperation::ModifyColumn {
                col_name: __self_0,
                data_type: __self_1,
                options: __self_2,
                column_position: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "ModifyColumn", "col_name", __self_0, "data_type", __self_1,
                    "options", __self_2, "column_position", &__self_3),
            AlterTableOperation::RenameConstraint {
                old_name: __self_0, new_name: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "RenameConstraint", "old_name", __self_0, "new_name",
                    &__self_1),
            AlterTableOperation::AlterColumn {
                column_name: __self_0, op: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "AlterColumn", "column_name", __self_0, "op", &__self_1),
            AlterTableOperation::SwapWith { table_name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SwapWith", "table_name", &__self_0),
            AlterTableOperation::SetTblProperties { table_properties: __self_0
                } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetTblProperties", "table_properties", &__self_0),
            AlterTableOperation::OwnerTo { new_owner: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "OwnerTo", "new_owner", &__self_0),
            AlterTableOperation::ClusterBy { exprs: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "ClusterBy", "exprs", &__self_0),
            AlterTableOperation::DropClusteringKey =>
                ::core::fmt::Formatter::write_str(f, "DropClusteringKey"),
            AlterTableOperation::SuspendRecluster =>
                ::core::fmt::Formatter::write_str(f, "SuspendRecluster"),
            AlterTableOperation::ResumeRecluster =>
                ::core::fmt::Formatter::write_str(f, "ResumeRecluster"),
            AlterTableOperation::Refresh { subpath: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "Refresh", "subpath", &__self_0),
            AlterTableOperation::Suspend =>
                ::core::fmt::Formatter::write_str(f, "Suspend"),
            AlterTableOperation::Resume =>
                ::core::fmt::Formatter::write_str(f, "Resume"),
            AlterTableOperation::Algorithm {
                equals: __self_0, algorithm: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "Algorithm", "equals", __self_0, "algorithm", &__self_1),
            AlterTableOperation::Lock { equals: __self_0, lock: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f, "Lock",
                    "equals", __self_0, "lock", &__self_1),
            AlterTableOperation::AutoIncrement {
                equals: __self_0, value: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "AutoIncrement", "equals", __self_0, "value", &__self_1),
            AlterTableOperation::ValidateConstraint { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "ValidateConstraint", "name", &__self_0),
            AlterTableOperation::SetOptionsParens { options: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetOptionsParens", "options", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTableOperation {
    #[inline]
    fn clone(&self) -> AlterTableOperation {
        match self {
            AlterTableOperation::AddConstraint {
                constraint: __self_0, not_valid: __self_1 } =>
                AlterTableOperation::AddConstraint {
                    constraint: ::core::clone::Clone::clone(__self_0),
                    not_valid: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::AddColumn {
                column_keyword: __self_0,
                if_not_exists: __self_1,
                column_def: __self_2,
                column_position: __self_3 } =>
                AlterTableOperation::AddColumn {
                    column_keyword: ::core::clone::Clone::clone(__self_0),
                    if_not_exists: ::core::clone::Clone::clone(__self_1),
                    column_def: ::core::clone::Clone::clone(__self_2),
                    column_position: ::core::clone::Clone::clone(__self_3),
                },
            AlterTableOperation::AddProjection {
                if_not_exists: __self_0, name: __self_1, select: __self_2 } =>
                AlterTableOperation::AddProjection {
                    if_not_exists: ::core::clone::Clone::clone(__self_0),
                    name: ::core::clone::Clone::clone(__self_1),
                    select: ::core::clone::Clone::clone(__self_2),
                },
            AlterTableOperation::DropProjection {
                if_exists: __self_0, name: __self_1 } =>
                AlterTableOperation::DropProjection {
                    if_exists: ::core::clone::Clone::clone(__self_0),
                    name: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::MaterializeProjection {
                if_exists: __self_0, name: __self_1, partition: __self_2 } =>
                AlterTableOperation::MaterializeProjection {
                    if_exists: ::core::clone::Clone::clone(__self_0),
                    name: ::core::clone::Clone::clone(__self_1),
                    partition: ::core::clone::Clone::clone(__self_2),
                },
            AlterTableOperation::ClearProjection {
                if_exists: __self_0, name: __self_1, partition: __self_2 } =>
                AlterTableOperation::ClearProjection {
                    if_exists: ::core::clone::Clone::clone(__self_0),
                    name: ::core::clone::Clone::clone(__self_1),
                    partition: ::core::clone::Clone::clone(__self_2),
                },
            AlterTableOperation::DisableRowLevelSecurity =>
                AlterTableOperation::DisableRowLevelSecurity,
            AlterTableOperation::DisableRule { name: __self_0 } =>
                AlterTableOperation::DisableRule {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::DisableTrigger { name: __self_0 } =>
                AlterTableOperation::DisableTrigger {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::DropConstraint {
                if_exists: __self_0, name: __self_1, drop_behavior: __self_2 }
                =>
                AlterTableOperation::DropConstraint {
                    if_exists: ::core::clone::Clone::clone(__self_0),
                    name: ::core::clone::Clone::clone(__self_1),
                    drop_behavior: ::core::clone::Clone::clone(__self_2),
                },
            AlterTableOperation::DropColumn {
                has_column_keyword: __self_0,
                column_names: __self_1,
                if_exists: __self_2,
                drop_behavior: __self_3 } =>
                AlterTableOperation::DropColumn {
                    has_column_keyword: ::core::clone::Clone::clone(__self_0),
                    column_names: ::core::clone::Clone::clone(__self_1),
                    if_exists: ::core::clone::Clone::clone(__self_2),
                    drop_behavior: ::core::clone::Clone::clone(__self_3),
                },
            AlterTableOperation::AttachPartition { partition: __self_0 } =>
                AlterTableOperation::AttachPartition {
                    partition: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::DetachPartition { partition: __self_0 } =>
                AlterTableOperation::DetachPartition {
                    partition: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::FreezePartition {
                partition: __self_0, with_name: __self_1 } =>
                AlterTableOperation::FreezePartition {
                    partition: ::core::clone::Clone::clone(__self_0),
                    with_name: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::UnfreezePartition {
                partition: __self_0, with_name: __self_1 } =>
                AlterTableOperation::UnfreezePartition {
                    partition: ::core::clone::Clone::clone(__self_0),
                    with_name: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::DropPrimaryKey { drop_behavior: __self_0 } =>
                AlterTableOperation::DropPrimaryKey {
                    drop_behavior: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::DropForeignKey {
                name: __self_0, drop_behavior: __self_1 } =>
                AlterTableOperation::DropForeignKey {
                    name: ::core::clone::Clone::clone(__self_0),
                    drop_behavior: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::DropIndex { name: __self_0 } =>
                AlterTableOperation::DropIndex {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::EnableAlwaysRule { name: __self_0 } =>
                AlterTableOperation::EnableAlwaysRule {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::EnableAlwaysTrigger { name: __self_0 } =>
                AlterTableOperation::EnableAlwaysTrigger {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::EnableReplicaRule { name: __self_0 } =>
                AlterTableOperation::EnableReplicaRule {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::EnableReplicaTrigger { name: __self_0 } =>
                AlterTableOperation::EnableReplicaTrigger {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::EnableRowLevelSecurity =>
                AlterTableOperation::EnableRowLevelSecurity,
            AlterTableOperation::ForceRowLevelSecurity =>
                AlterTableOperation::ForceRowLevelSecurity,
            AlterTableOperation::NoForceRowLevelSecurity =>
                AlterTableOperation::NoForceRowLevelSecurity,
            AlterTableOperation::EnableRule { name: __self_0 } =>
                AlterTableOperation::EnableRule {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::EnableTrigger { name: __self_0 } =>
                AlterTableOperation::EnableTrigger {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::RenamePartitions {
                old_partitions: __self_0, new_partitions: __self_1 } =>
                AlterTableOperation::RenamePartitions {
                    old_partitions: ::core::clone::Clone::clone(__self_0),
                    new_partitions: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::ReplicaIdentity { identity: __self_0 } =>
                AlterTableOperation::ReplicaIdentity {
                    identity: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::AddPartitions {
                if_not_exists: __self_0, new_partitions: __self_1 } =>
                AlterTableOperation::AddPartitions {
                    if_not_exists: ::core::clone::Clone::clone(__self_0),
                    new_partitions: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::DropPartitions {
                partitions: __self_0, if_exists: __self_1 } =>
                AlterTableOperation::DropPartitions {
                    partitions: ::core::clone::Clone::clone(__self_0),
                    if_exists: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::RenameColumn {
                old_column_name: __self_0, new_column_name: __self_1 } =>
                AlterTableOperation::RenameColumn {
                    old_column_name: ::core::clone::Clone::clone(__self_0),
                    new_column_name: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::RenameTable { table_name: __self_0 } =>
                AlterTableOperation::RenameTable {
                    table_name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::ChangeColumn {
                old_name: __self_0,
                new_name: __self_1,
                data_type: __self_2,
                options: __self_3,
                column_position: __self_4 } =>
                AlterTableOperation::ChangeColumn {
                    old_name: ::core::clone::Clone::clone(__self_0),
                    new_name: ::core::clone::Clone::clone(__self_1),
                    data_type: ::core::clone::Clone::clone(__self_2),
                    options: ::core::clone::Clone::clone(__self_3),
                    column_position: ::core::clone::Clone::clone(__self_4),
                },
            AlterTableOperation::ModifyColumn {
                col_name: __self_0,
                data_type: __self_1,
                options: __self_2,
                column_position: __self_3 } =>
                AlterTableOperation::ModifyColumn {
                    col_name: ::core::clone::Clone::clone(__self_0),
                    data_type: ::core::clone::Clone::clone(__self_1),
                    options: ::core::clone::Clone::clone(__self_2),
                    column_position: ::core::clone::Clone::clone(__self_3),
                },
            AlterTableOperation::RenameConstraint {
                old_name: __self_0, new_name: __self_1 } =>
                AlterTableOperation::RenameConstraint {
                    old_name: ::core::clone::Clone::clone(__self_0),
                    new_name: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::AlterColumn {
                column_name: __self_0, op: __self_1 } =>
                AlterTableOperation::AlterColumn {
                    column_name: ::core::clone::Clone::clone(__self_0),
                    op: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::SwapWith { table_name: __self_0 } =>
                AlterTableOperation::SwapWith {
                    table_name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::SetTblProperties { table_properties: __self_0
                } =>
                AlterTableOperation::SetTblProperties {
                    table_properties: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::OwnerTo { new_owner: __self_0 } =>
                AlterTableOperation::OwnerTo {
                    new_owner: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::ClusterBy { exprs: __self_0 } =>
                AlterTableOperation::ClusterBy {
                    exprs: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::DropClusteringKey =>
                AlterTableOperation::DropClusteringKey,
            AlterTableOperation::SuspendRecluster =>
                AlterTableOperation::SuspendRecluster,
            AlterTableOperation::ResumeRecluster =>
                AlterTableOperation::ResumeRecluster,
            AlterTableOperation::Refresh { subpath: __self_0 } =>
                AlterTableOperation::Refresh {
                    subpath: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::Suspend => AlterTableOperation::Suspend,
            AlterTableOperation::Resume => AlterTableOperation::Resume,
            AlterTableOperation::Algorithm {
                equals: __self_0, algorithm: __self_1 } =>
                AlterTableOperation::Algorithm {
                    equals: ::core::clone::Clone::clone(__self_0),
                    algorithm: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::Lock { equals: __self_0, lock: __self_1 } =>
                AlterTableOperation::Lock {
                    equals: ::core::clone::Clone::clone(__self_0),
                    lock: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::AutoIncrement {
                equals: __self_0, value: __self_1 } =>
                AlterTableOperation::AutoIncrement {
                    equals: ::core::clone::Clone::clone(__self_0),
                    value: ::core::clone::Clone::clone(__self_1),
                },
            AlterTableOperation::ValidateConstraint { name: __self_0 } =>
                AlterTableOperation::ValidateConstraint {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterTableOperation::SetOptionsParens { options: __self_0 } =>
                AlterTableOperation::SetOptionsParens {
                    options: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTableOperation {
    #[inline]
    fn eq(&self, other: &AlterTableOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterTableOperation::AddConstraint {
                    constraint: __self_0, not_valid: __self_1 },
                    AlterTableOperation::AddConstraint {
                    constraint: __arg1_0, not_valid: __arg1_1 }) =>
                    __self_1 == __arg1_1 && __self_0 == __arg1_0,
                (AlterTableOperation::AddColumn {
                    column_keyword: __self_0,
                    if_not_exists: __self_1,
                    column_def: __self_2,
                    column_position: __self_3 },
                    AlterTableOperation::AddColumn {
                    column_keyword: __arg1_0,
                    if_not_exists: __arg1_1,
                    column_def: __arg1_2,
                    column_position: __arg1_3 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                            __self_2 == __arg1_2 && __self_3 == __arg1_3,
                (AlterTableOperation::AddProjection {
                    if_not_exists: __self_0, name: __self_1, select: __self_2 },
                    AlterTableOperation::AddProjection {
                    if_not_exists: __arg1_0, name: __arg1_1, select: __arg1_2 })
                    =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                        __self_2 == __arg1_2,
                (AlterTableOperation::DropProjection {
                    if_exists: __self_0, name: __self_1 },
                    AlterTableOperation::DropProjection {
                    if_exists: __arg1_0, name: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::MaterializeProjection {
                    if_exists: __self_0, name: __self_1, partition: __self_2 },
                    AlterTableOperation::MaterializeProjection {
                    if_exists: __arg1_0, name: __arg1_1, partition: __arg1_2 })
                    =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                        __self_2 == __arg1_2,
                (AlterTableOperation::ClearProjection {
                    if_exists: __self_0, name: __self_1, partition: __self_2 },
                    AlterTableOperation::ClearProjection {
                    if_exists: __arg1_0, name: __arg1_1, partition: __arg1_2 })
                    =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                        __self_2 == __arg1_2,
                (AlterTableOperation::DisableRule { name: __self_0 },
                    AlterTableOperation::DisableRule { name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::DisableTrigger { name: __self_0 },
                    AlterTableOperation::DisableTrigger { name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::DropConstraint {
                    if_exists: __self_0, name: __self_1, drop_behavior: __self_2
                    }, AlterTableOperation::DropConstraint {
                    if_exists: __arg1_0, name: __arg1_1, drop_behavior: __arg1_2
                    }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                        __self_2 == __arg1_2,
                (AlterTableOperation::DropColumn {
                    has_column_keyword: __self_0,
                    column_names: __self_1,
                    if_exists: __self_2,
                    drop_behavior: __self_3 }, AlterTableOperation::DropColumn {
                    has_column_keyword: __arg1_0,
                    column_names: __arg1_1,
                    if_exists: __arg1_2,
                    drop_behavior: __arg1_3 }) =>
                    __self_0 == __arg1_0 && __self_2 == __arg1_2 &&
                            __self_1 == __arg1_1 && __self_3 == __arg1_3,
                (AlterTableOperation::AttachPartition { partition: __self_0 },
                    AlterTableOperation::AttachPartition { partition: __arg1_0
                    }) => __self_0 == __arg1_0,
                (AlterTableOperation::DetachPartition { partition: __self_0 },
                    AlterTableOperation::DetachPartition { partition: __arg1_0
                    }) => __self_0 == __arg1_0,
                (AlterTableOperation::FreezePartition {
                    partition: __self_0, with_name: __self_1 },
                    AlterTableOperation::FreezePartition {
                    partition: __arg1_0, with_name: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::UnfreezePartition {
                    partition: __self_0, with_name: __self_1 },
                    AlterTableOperation::UnfreezePartition {
                    partition: __arg1_0, with_name: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::DropPrimaryKey { drop_behavior: __self_0
                    }, AlterTableOperation::DropPrimaryKey {
                    drop_behavior: __arg1_0 }) => __self_0 == __arg1_0,
                (AlterTableOperation::DropForeignKey {
                    name: __self_0, drop_behavior: __self_1 },
                    AlterTableOperation::DropForeignKey {
                    name: __arg1_0, drop_behavior: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::DropIndex { name: __self_0 },
                    AlterTableOperation::DropIndex { name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::EnableAlwaysRule { name: __self_0 },
                    AlterTableOperation::EnableAlwaysRule { name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::EnableAlwaysTrigger { name: __self_0 },
                    AlterTableOperation::EnableAlwaysTrigger { name: __arg1_0 })
                    => __self_0 == __arg1_0,
                (AlterTableOperation::EnableReplicaRule { name: __self_0 },
                    AlterTableOperation::EnableReplicaRule { name: __arg1_0 })
                    => __self_0 == __arg1_0,
                (AlterTableOperation::EnableReplicaTrigger { name: __self_0 },
                    AlterTableOperation::EnableReplicaTrigger { name: __arg1_0
                    }) => __self_0 == __arg1_0,
                (AlterTableOperation::EnableRule { name: __self_0 },
                    AlterTableOperation::EnableRule { name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::EnableTrigger { name: __self_0 },
                    AlterTableOperation::EnableTrigger { name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::RenamePartitions {
                    old_partitions: __self_0, new_partitions: __self_1 },
                    AlterTableOperation::RenamePartitions {
                    old_partitions: __arg1_0, new_partitions: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::ReplicaIdentity { identity: __self_0 },
                    AlterTableOperation::ReplicaIdentity { identity: __arg1_0 })
                    => __self_0 == __arg1_0,
                (AlterTableOperation::AddPartitions {
                    if_not_exists: __self_0, new_partitions: __self_1 },
                    AlterTableOperation::AddPartitions {
                    if_not_exists: __arg1_0, new_partitions: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::DropPartitions {
                    partitions: __self_0, if_exists: __self_1 },
                    AlterTableOperation::DropPartitions {
                    partitions: __arg1_0, if_exists: __arg1_1 }) =>
                    __self_1 == __arg1_1 && __self_0 == __arg1_0,
                (AlterTableOperation::RenameColumn {
                    old_column_name: __self_0, new_column_name: __self_1 },
                    AlterTableOperation::RenameColumn {
                    old_column_name: __arg1_0, new_column_name: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::RenameTable { table_name: __self_0 },
                    AlterTableOperation::RenameTable { table_name: __arg1_0 })
                    => __self_0 == __arg1_0,
                (AlterTableOperation::ChangeColumn {
                    old_name: __self_0,
                    new_name: __self_1,
                    data_type: __self_2,
                    options: __self_3,
                    column_position: __self_4 },
                    AlterTableOperation::ChangeColumn {
                    old_name: __arg1_0,
                    new_name: __arg1_1,
                    data_type: __arg1_2,
                    options: __arg1_3,
                    column_position: __arg1_4 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                                __self_2 == __arg1_2 && __self_3 == __arg1_3 &&
                        __self_4 == __arg1_4,
                (AlterTableOperation::ModifyColumn {
                    col_name: __self_0,
                    data_type: __self_1,
                    options: __self_2,
                    column_position: __self_3 },
                    AlterTableOperation::ModifyColumn {
                    col_name: __arg1_0,
                    data_type: __arg1_1,
                    options: __arg1_2,
                    column_position: __arg1_3 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                            __self_2 == __arg1_2 && __self_3 == __arg1_3,
                (AlterTableOperation::RenameConstraint {
                    old_name: __self_0, new_name: __self_1 },
                    AlterTableOperation::RenameConstraint {
                    old_name: __arg1_0, new_name: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::AlterColumn {
                    column_name: __self_0, op: __self_1 },
                    AlterTableOperation::AlterColumn {
                    column_name: __arg1_0, op: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::SwapWith { table_name: __self_0 },
                    AlterTableOperation::SwapWith { table_name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::SetTblProperties {
                    table_properties: __self_0 },
                    AlterTableOperation::SetTblProperties {
                    table_properties: __arg1_0 }) => __self_0 == __arg1_0,
                (AlterTableOperation::OwnerTo { new_owner: __self_0 },
                    AlterTableOperation::OwnerTo { new_owner: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::ClusterBy { exprs: __self_0 },
                    AlterTableOperation::ClusterBy { exprs: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::Refresh { subpath: __self_0 },
                    AlterTableOperation::Refresh { subpath: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterTableOperation::Algorithm {
                    equals: __self_0, algorithm: __self_1 },
                    AlterTableOperation::Algorithm {
                    equals: __arg1_0, algorithm: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::Lock { equals: __self_0, lock: __self_1
                    }, AlterTableOperation::Lock {
                    equals: __arg1_0, lock: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::AutoIncrement {
                    equals: __self_0, value: __self_1 },
                    AlterTableOperation::AutoIncrement {
                    equals: __arg1_0, value: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterTableOperation::ValidateConstraint { name: __self_0 },
                    AlterTableOperation::ValidateConstraint { name: __arg1_0 })
                    => __self_0 == __arg1_0,
                (AlterTableOperation::SetOptionsParens { options: __self_0 },
                    AlterTableOperation::SetOptionsParens { options: __arg1_0 })
                    => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTableOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterTableOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                &__arg1_discr) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match (self, other) {
                    (AlterTableOperation::AddConstraint {
                        constraint: __self_0, not_valid: __self_1 },
                        AlterTableOperation::AddConstraint {
                        constraint: __arg1_0, not_valid: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::AddColumn {
                        column_keyword: __self_0,
                        if_not_exists: __self_1,
                        column_def: __self_2,
                        column_position: __self_3 },
                        AlterTableOperation::AddColumn {
                        column_keyword: __arg1_0,
                        if_not_exists: __arg1_1,
                        column_def: __arg1_2,
                        column_position: __arg1_3 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                                __arg1_2) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                => ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::AddProjection {
                        if_not_exists: __self_0, name: __self_1, select: __self_2 },
                        AlterTableOperation::AddProjection {
                        if_not_exists: __arg1_0, name: __arg1_1, select: __arg1_2 })
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropProjection {
                        if_exists: __self_0, name: __self_1 },
                        AlterTableOperation::DropProjection {
                        if_exists: __arg1_0, name: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::MaterializeProjection {
                        if_exists: __self_0, name: __self_1, partition: __self_2 },
                        AlterTableOperation::MaterializeProjection {
                        if_exists: __arg1_0, name: __arg1_1, partition: __arg1_2 })
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::ClearProjection {
                        if_exists: __self_0, name: __self_1, partition: __self_2 },
                        AlterTableOperation::ClearProjection {
                        if_exists: __arg1_0, name: __arg1_1, partition: __arg1_2 })
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::DisableRule { name: __self_0 },
                        AlterTableOperation::DisableRule { name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DisableTrigger { name: __self_0 },
                        AlterTableOperation::DisableTrigger { name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DropConstraint {
                        if_exists: __self_0, name: __self_1, drop_behavior: __self_2
                        }, AlterTableOperation::DropConstraint {
                        if_exists: __arg1_0, name: __arg1_1, drop_behavior: __arg1_2
                        }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropColumn {
                        has_column_keyword: __self_0,
                        column_names: __self_1,
                        if_exists: __self_2,
                        drop_behavior: __self_3 }, AlterTableOperation::DropColumn {
                        has_column_keyword: __arg1_0,
                        column_names: __arg1_1,
                        if_exists: __arg1_2,
                        drop_behavior: __arg1_3 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                                __arg1_2) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                => ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::AttachPartition { partition: __self_0
                        }, AlterTableOperation::AttachPartition {
                        partition: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DetachPartition { partition: __self_0
                        }, AlterTableOperation::DetachPartition {
                        partition: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::FreezePartition {
                        partition: __self_0, with_name: __self_1 },
                        AlterTableOperation::FreezePartition {
                        partition: __arg1_0, with_name: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::UnfreezePartition {
                        partition: __self_0, with_name: __self_1 },
                        AlterTableOperation::UnfreezePartition {
                        partition: __arg1_0, with_name: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropPrimaryKey {
                        drop_behavior: __self_0 },
                        AlterTableOperation::DropPrimaryKey {
                        drop_behavior: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DropForeignKey {
                        name: __self_0, drop_behavior: __self_1 },
                        AlterTableOperation::DropForeignKey {
                        name: __arg1_0, drop_behavior: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropIndex { name: __self_0 },
                        AlterTableOperation::DropIndex { name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableAlwaysRule { name: __self_0 },
                        AlterTableOperation::EnableAlwaysRule { name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableAlwaysTrigger { name: __self_0
                        }, AlterTableOperation::EnableAlwaysTrigger { name: __arg1_0
                        }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableReplicaRule { name: __self_0 },
                        AlterTableOperation::EnableReplicaRule { name: __arg1_0 })
                        => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableReplicaTrigger { name: __self_0
                        }, AlterTableOperation::EnableReplicaTrigger {
                        name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableRule { name: __self_0 },
                        AlterTableOperation::EnableRule { name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableTrigger { name: __self_0 },
                        AlterTableOperation::EnableTrigger { name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::RenamePartitions {
                        old_partitions: __self_0, new_partitions: __self_1 },
                        AlterTableOperation::RenamePartitions {
                        old_partitions: __arg1_0, new_partitions: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::ReplicaIdentity { identity: __self_0
                        }, AlterTableOperation::ReplicaIdentity { identity: __arg1_0
                        }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::AddPartitions {
                        if_not_exists: __self_0, new_partitions: __self_1 },
                        AlterTableOperation::AddPartitions {
                        if_not_exists: __arg1_0, new_partitions: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropPartitions {
                        partitions: __self_0, if_exists: __self_1 },
                        AlterTableOperation::DropPartitions {
                        partitions: __arg1_0, if_exists: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::RenameColumn {
                        old_column_name: __self_0, new_column_name: __self_1 },
                        AlterTableOperation::RenameColumn {
                        old_column_name: __arg1_0, new_column_name: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::RenameTable { table_name: __self_0 },
                        AlterTableOperation::RenameTable { table_name: __arg1_0 })
                        => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::ChangeColumn {
                        old_name: __self_0,
                        new_name: __self_1,
                        data_type: __self_2,
                        options: __self_3,
                        column_position: __self_4 },
                        AlterTableOperation::ChangeColumn {
                        old_name: __arg1_0,
                        new_name: __arg1_1,
                        data_type: __arg1_2,
                        options: __arg1_3,
                        column_position: __arg1_4 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                                __arg1_2) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(__self_3,
                                                        __arg1_3) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        => ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::ModifyColumn {
                        col_name: __self_0,
                        data_type: __self_1,
                        options: __self_2,
                        column_position: __self_3 },
                        AlterTableOperation::ModifyColumn {
                        col_name: __arg1_0,
                        data_type: __arg1_1,
                        options: __arg1_2,
                        column_position: __arg1_3 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                        __arg1_1) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                                __arg1_2) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                => ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::RenameConstraint {
                        old_name: __self_0, new_name: __self_1 },
                        AlterTableOperation::RenameConstraint {
                        old_name: __arg1_0, new_name: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::AlterColumn {
                        column_name: __self_0, op: __self_1 },
                        AlterTableOperation::AlterColumn {
                        column_name: __arg1_0, op: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::SwapWith { table_name: __self_0 },
                        AlterTableOperation::SwapWith { table_name: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::SetTblProperties {
                        table_properties: __self_0 },
                        AlterTableOperation::SetTblProperties {
                        table_properties: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::OwnerTo { new_owner: __self_0 },
                        AlterTableOperation::OwnerTo { new_owner: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::ClusterBy { exprs: __self_0 },
                        AlterTableOperation::ClusterBy { exprs: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::Refresh { subpath: __self_0 },
                        AlterTableOperation::Refresh { subpath: __arg1_0 }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::Algorithm {
                        equals: __self_0, algorithm: __self_1 },
                        AlterTableOperation::Algorithm {
                        equals: __arg1_0, algorithm: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::Lock {
                        equals: __self_0, lock: __self_1 },
                        AlterTableOperation::Lock { equals: __arg1_0, lock: __arg1_1
                        }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::AutoIncrement {
                        equals: __self_0, value: __self_1 },
                        AlterTableOperation::AutoIncrement {
                        equals: __arg1_0, value: __arg1_1 }) =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_0,
                                __arg1_0) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::ValidateConstraint { name: __self_0 },
                        AlterTableOperation::ValidateConstraint { name: __arg1_0 })
                        => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    (AlterTableOperation::SetOptionsParens { options: __self_0
                        }, AlterTableOperation::SetOptionsParens { options: __arg1_0
                        }) =>
                        ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
                    _ =>
                        ::core::option::Option::Some(::core::cmp::Ordering::Equal),
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTableOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<TableConstraint>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<ColumnDef>;
        let _: ::core::cmp::AssertParamIsEq<Option<MySQLColumnPosition>>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<ProjectionSelect>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
        let _: ::core::cmp::AssertParamIsEq<Partition>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<ReplicaIdentity>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Partition>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<RenameTableNameKind>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ColumnOption>>;
        let _: ::core::cmp::AssertParamIsEq<Option<MySQLColumnPosition>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ColumnOption>>;
        let _: ::core::cmp::AssertParamIsEq<Option<MySQLColumnPosition>>;
        let _: ::core::cmp::AssertParamIsEq<AlterColumnOperation>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
        let _: ::core::cmp::AssertParamIsEq<Owner>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<AlterTableAlgorithm>;
        let _: ::core::cmp::AssertParamIsEq<AlterTableLock>;
        let _: ::core::cmp::AssertParamIsEq<ValueWithSpan>;
        let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTableOperation {
    #[inline]
    fn cmp(&self, other: &AlterTableOperation) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterTableOperation::AddConstraint {
                        constraint: __self_0, not_valid: __self_1 },
                        AlterTableOperation::AddConstraint {
                        constraint: __arg1_0, not_valid: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::AddColumn {
                        column_keyword: __self_0,
                        if_not_exists: __self_1,
                        column_def: __self_2,
                        column_position: __self_3 },
                        AlterTableOperation::AddColumn {
                        column_keyword: __arg1_0,
                        if_not_exists: __arg1_1,
                        column_def: __arg1_2,
                        column_position: __arg1_3 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::AddProjection {
                        if_not_exists: __self_0, name: __self_1, select: __self_2 },
                        AlterTableOperation::AddProjection {
                        if_not_exists: __arg1_0, name: __arg1_1, select: __arg1_2 })
                        =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropProjection {
                        if_exists: __self_0, name: __self_1 },
                        AlterTableOperation::DropProjection {
                        if_exists: __arg1_0, name: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::MaterializeProjection {
                        if_exists: __self_0, name: __self_1, partition: __self_2 },
                        AlterTableOperation::MaterializeProjection {
                        if_exists: __arg1_0, name: __arg1_1, partition: __arg1_2 })
                        =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::ClearProjection {
                        if_exists: __self_0, name: __self_1, partition: __self_2 },
                        AlterTableOperation::ClearProjection {
                        if_exists: __arg1_0, name: __arg1_1, partition: __arg1_2 })
                        =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::DisableRule { name: __self_0 },
                        AlterTableOperation::DisableRule { name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DisableTrigger { name: __self_0 },
                        AlterTableOperation::DisableTrigger { name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DropConstraint {
                        if_exists: __self_0, name: __self_1, drop_behavior: __self_2
                        }, AlterTableOperation::DropConstraint {
                        if_exists: __arg1_0, name: __arg1_1, drop_behavior: __arg1_2
                        }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropColumn {
                        has_column_keyword: __self_0,
                        column_names: __self_1,
                        if_exists: __self_2,
                        drop_behavior: __self_3 }, AlterTableOperation::DropColumn {
                        has_column_keyword: __arg1_0,
                        column_names: __arg1_1,
                        if_exists: __arg1_2,
                        drop_behavior: __arg1_3 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::AttachPartition { partition: __self_0
                        }, AlterTableOperation::AttachPartition {
                        partition: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DetachPartition { partition: __self_0
                        }, AlterTableOperation::DetachPartition {
                        partition: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::FreezePartition {
                        partition: __self_0, with_name: __self_1 },
                        AlterTableOperation::FreezePartition {
                        partition: __arg1_0, with_name: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::UnfreezePartition {
                        partition: __self_0, with_name: __self_1 },
                        AlterTableOperation::UnfreezePartition {
                        partition: __arg1_0, with_name: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropPrimaryKey {
                        drop_behavior: __self_0 },
                        AlterTableOperation::DropPrimaryKey {
                        drop_behavior: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::DropForeignKey {
                        name: __self_0, drop_behavior: __self_1 },
                        AlterTableOperation::DropForeignKey {
                        name: __arg1_0, drop_behavior: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropIndex { name: __self_0 },
                        AlterTableOperation::DropIndex { name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableAlwaysRule { name: __self_0 },
                        AlterTableOperation::EnableAlwaysRule { name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableAlwaysTrigger { name: __self_0
                        }, AlterTableOperation::EnableAlwaysTrigger { name: __arg1_0
                        }) => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableReplicaRule { name: __self_0 },
                        AlterTableOperation::EnableReplicaRule { name: __arg1_0 })
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableReplicaTrigger { name: __self_0
                        }, AlterTableOperation::EnableReplicaTrigger {
                        name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableRule { name: __self_0 },
                        AlterTableOperation::EnableRule { name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::EnableTrigger { name: __self_0 },
                        AlterTableOperation::EnableTrigger { name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::RenamePartitions {
                        old_partitions: __self_0, new_partitions: __self_1 },
                        AlterTableOperation::RenamePartitions {
                        old_partitions: __arg1_0, new_partitions: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::ReplicaIdentity { identity: __self_0
                        }, AlterTableOperation::ReplicaIdentity { identity: __arg1_0
                        }) => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::AddPartitions {
                        if_not_exists: __self_0, new_partitions: __self_1 },
                        AlterTableOperation::AddPartitions {
                        if_not_exists: __arg1_0, new_partitions: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::DropPartitions {
                        partitions: __self_0, if_exists: __self_1 },
                        AlterTableOperation::DropPartitions {
                        partitions: __arg1_0, if_exists: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::RenameColumn {
                        old_column_name: __self_0, new_column_name: __self_1 },
                        AlterTableOperation::RenameColumn {
                        old_column_name: __arg1_0, new_column_name: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::RenameTable { table_name: __self_0 },
                        AlterTableOperation::RenameTable { table_name: __arg1_0 })
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::ChangeColumn {
                        old_name: __self_0,
                        new_name: __self_1,
                        data_type: __self_2,
                        options: __self_3,
                        column_position: __self_4 },
                        AlterTableOperation::ChangeColumn {
                        old_name: __arg1_0,
                        new_name: __arg1_1,
                        data_type: __arg1_2,
                        options: __arg1_3,
                        column_position: __arg1_4 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        ::core::cmp::Ord::cmp(__self_4, __arg1_4),
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::ModifyColumn {
                        col_name: __self_0,
                        data_type: __self_1,
                        options: __self_2,
                        column_position: __self_3 },
                        AlterTableOperation::ModifyColumn {
                        col_name: __arg1_0,
                        data_type: __arg1_1,
                        options: __arg1_2,
                        column_position: __arg1_3 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterTableOperation::RenameConstraint {
                        old_name: __self_0, new_name: __self_1 },
                        AlterTableOperation::RenameConstraint {
                        old_name: __arg1_0, new_name: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::AlterColumn {
                        column_name: __self_0, op: __self_1 },
                        AlterTableOperation::AlterColumn {
                        column_name: __arg1_0, op: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::SwapWith { table_name: __self_0 },
                        AlterTableOperation::SwapWith { table_name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::SetTblProperties {
                        table_properties: __self_0 },
                        AlterTableOperation::SetTblProperties {
                        table_properties: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::OwnerTo { new_owner: __self_0 },
                        AlterTableOperation::OwnerTo { new_owner: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::ClusterBy { exprs: __self_0 },
                        AlterTableOperation::ClusterBy { exprs: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::Refresh { subpath: __self_0 },
                        AlterTableOperation::Refresh { subpath: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::Algorithm {
                        equals: __self_0, algorithm: __self_1 },
                        AlterTableOperation::Algorithm {
                        equals: __arg1_0, algorithm: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::Lock {
                        equals: __self_0, lock: __self_1 },
                        AlterTableOperation::Lock { equals: __arg1_0, lock: __arg1_1
                        }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::AutoIncrement {
                        equals: __self_0, value: __self_1 },
                        AlterTableOperation::AutoIncrement {
                        equals: __arg1_0, value: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterTableOperation::ValidateConstraint { name: __self_0 },
                        AlterTableOperation::ValidateConstraint { name: __arg1_0 })
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTableOperation::SetOptionsParens { options: __self_0
                        }, AlterTableOperation::SetOptionsParens { options: __arg1_0
                        }) => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTableOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterTableOperation::AddConstraint {
                constraint: __self_0, not_valid: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::AddColumn {
                column_keyword: __self_0,
                if_not_exists: __self_1,
                column_def: __self_2,
                column_position: __self_3 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state)
            }
            AlterTableOperation::AddProjection {
                if_not_exists: __self_0, name: __self_1, select: __self_2 } =>
                {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state)
            }
            AlterTableOperation::DropProjection {
                if_exists: __self_0, name: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::MaterializeProjection {
                if_exists: __self_0, name: __self_1, partition: __self_2 } =>
                {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state)
            }
            AlterTableOperation::ClearProjection {
                if_exists: __self_0, name: __self_1, partition: __self_2 } =>
                {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state)
            }
            AlterTableOperation::DisableRule { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::DisableTrigger { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::DropConstraint {
                if_exists: __self_0, name: __self_1, drop_behavior: __self_2 }
                => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state)
            }
            AlterTableOperation::DropColumn {
                has_column_keyword: __self_0,
                column_names: __self_1,
                if_exists: __self_2,
                drop_behavior: __self_3 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state)
            }
            AlterTableOperation::AttachPartition { partition: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::DetachPartition { partition: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::FreezePartition {
                partition: __self_0, with_name: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::UnfreezePartition {
                partition: __self_0, with_name: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::DropPrimaryKey { drop_behavior: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::DropForeignKey {
                name: __self_0, drop_behavior: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::DropIndex { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::EnableAlwaysRule { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::EnableAlwaysTrigger { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::EnableReplicaRule { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::EnableReplicaTrigger { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::EnableRule { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::EnableTrigger { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::RenamePartitions {
                old_partitions: __self_0, new_partitions: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::ReplicaIdentity { identity: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::AddPartitions {
                if_not_exists: __self_0, new_partitions: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::DropPartitions {
                partitions: __self_0, if_exists: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::RenameColumn {
                old_column_name: __self_0, new_column_name: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::RenameTable { table_name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::ChangeColumn {
                old_name: __self_0,
                new_name: __self_1,
                data_type: __self_2,
                options: __self_3,
                column_position: __self_4 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state);
                ::core::hash::Hash::hash(__self_4, state)
            }
            AlterTableOperation::ModifyColumn {
                col_name: __self_0,
                data_type: __self_1,
                options: __self_2,
                column_position: __self_3 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state)
            }
            AlterTableOperation::RenameConstraint {
                old_name: __self_0, new_name: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::AlterColumn {
                column_name: __self_0, op: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::SwapWith { table_name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::SetTblProperties { table_properties: __self_0
                } => ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::OwnerTo { new_owner: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::ClusterBy { exprs: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::Refresh { subpath: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::Algorithm {
                equals: __self_0, algorithm: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::Lock { equals: __self_0, lock: __self_1 } =>
                {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::AutoIncrement {
                equals: __self_0, value: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterTableOperation::ValidateConstraint { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTableOperation::SetOptionsParens { options: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
125#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
126#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTableOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::AddConstraint { constraint, not_valid } => {
                                sqlparser::ast::Visit::visit(constraint, visitor)?;
                                sqlparser::ast::Visit::visit(not_valid, visitor)?;
                            }
                            Self::AddColumn {
                                column_keyword, if_not_exists, column_def, column_position }
                                => {
                                sqlparser::ast::Visit::visit(column_keyword, visitor)?;
                                sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
                                sqlparser::ast::Visit::visit(column_def, visitor)?;
                                sqlparser::ast::Visit::visit(column_position, visitor)?;
                            }
                            Self::AddProjection { if_not_exists, name, select } => {
                                sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
                                sqlparser::ast::Visit::visit(name, visitor)?;
                                sqlparser::ast::Visit::visit(select, visitor)?;
                            }
                            Self::DropProjection { if_exists, name } => {
                                sqlparser::ast::Visit::visit(if_exists, visitor)?;
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::MaterializeProjection { if_exists, name, partition }
                                => {
                                sqlparser::ast::Visit::visit(if_exists, visitor)?;
                                sqlparser::ast::Visit::visit(name, visitor)?;
                                sqlparser::ast::Visit::visit(partition, visitor)?;
                            }
                            Self::ClearProjection { if_exists, name, partition } => {
                                sqlparser::ast::Visit::visit(if_exists, visitor)?;
                                sqlparser::ast::Visit::visit(name, visitor)?;
                                sqlparser::ast::Visit::visit(partition, visitor)?;
                            }
                            Self::DisableRowLevelSecurity => {}
                            Self::DisableRule { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::DisableTrigger { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::DropConstraint { if_exists, name, drop_behavior } => {
                                sqlparser::ast::Visit::visit(if_exists, visitor)?;
                                sqlparser::ast::Visit::visit(name, visitor)?;
                                sqlparser::ast::Visit::visit(drop_behavior, visitor)?;
                            }
                            Self::DropColumn {
                                has_column_keyword, column_names, if_exists, drop_behavior }
                                => {
                                sqlparser::ast::Visit::visit(has_column_keyword, visitor)?;
                                sqlparser::ast::Visit::visit(column_names, visitor)?;
                                sqlparser::ast::Visit::visit(if_exists, visitor)?;
                                sqlparser::ast::Visit::visit(drop_behavior, visitor)?;
                            }
                            Self::AttachPartition { partition } => {
                                sqlparser::ast::Visit::visit(partition, visitor)?;
                            }
                            Self::DetachPartition { partition } => {
                                sqlparser::ast::Visit::visit(partition, visitor)?;
                            }
                            Self::FreezePartition { partition, with_name } => {
                                sqlparser::ast::Visit::visit(partition, visitor)?;
                                sqlparser::ast::Visit::visit(with_name, visitor)?;
                            }
                            Self::UnfreezePartition { partition, with_name } => {
                                sqlparser::ast::Visit::visit(partition, visitor)?;
                                sqlparser::ast::Visit::visit(with_name, visitor)?;
                            }
                            Self::DropPrimaryKey { drop_behavior } => {
                                sqlparser::ast::Visit::visit(drop_behavior, visitor)?;
                            }
                            Self::DropForeignKey { name, drop_behavior } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                                sqlparser::ast::Visit::visit(drop_behavior, visitor)?;
                            }
                            Self::DropIndex { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::EnableAlwaysRule { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::EnableAlwaysTrigger { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::EnableReplicaRule { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::EnableReplicaTrigger { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::EnableRowLevelSecurity => {}
                            Self::ForceRowLevelSecurity => {}
                            Self::NoForceRowLevelSecurity => {}
                            Self::EnableRule { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::EnableTrigger { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::RenamePartitions { old_partitions, new_partitions } =>
                                {
                                sqlparser::ast::Visit::visit(old_partitions, visitor)?;
                                sqlparser::ast::Visit::visit(new_partitions, visitor)?;
                            }
                            Self::ReplicaIdentity { identity } => {
                                sqlparser::ast::Visit::visit(identity, visitor)?;
                            }
                            Self::AddPartitions { if_not_exists, new_partitions } => {
                                sqlparser::ast::Visit::visit(if_not_exists, visitor)?;
                                sqlparser::ast::Visit::visit(new_partitions, visitor)?;
                            }
                            Self::DropPartitions { partitions, if_exists } => {
                                sqlparser::ast::Visit::visit(partitions, visitor)?;
                                sqlparser::ast::Visit::visit(if_exists, visitor)?;
                            }
                            Self::RenameColumn { old_column_name, new_column_name } => {
                                sqlparser::ast::Visit::visit(old_column_name, visitor)?;
                                sqlparser::ast::Visit::visit(new_column_name, visitor)?;
                            }
                            Self::RenameTable { table_name } => {
                                sqlparser::ast::Visit::visit(table_name, visitor)?;
                            }
                            Self::ChangeColumn {
                                old_name, new_name, data_type, options, column_position } =>
                                {
                                sqlparser::ast::Visit::visit(old_name, visitor)?;
                                sqlparser::ast::Visit::visit(new_name, visitor)?;
                                sqlparser::ast::Visit::visit(data_type, visitor)?;
                                sqlparser::ast::Visit::visit(options, visitor)?;
                                sqlparser::ast::Visit::visit(column_position, visitor)?;
                            }
                            Self::ModifyColumn {
                                col_name, data_type, options, column_position } => {
                                sqlparser::ast::Visit::visit(col_name, visitor)?;
                                sqlparser::ast::Visit::visit(data_type, visitor)?;
                                sqlparser::ast::Visit::visit(options, visitor)?;
                                sqlparser::ast::Visit::visit(column_position, visitor)?;
                            }
                            Self::RenameConstraint { old_name, new_name } => {
                                sqlparser::ast::Visit::visit(old_name, visitor)?;
                                sqlparser::ast::Visit::visit(new_name, visitor)?;
                            }
                            Self::AlterColumn { column_name, op } => {
                                sqlparser::ast::Visit::visit(column_name, visitor)?;
                                sqlparser::ast::Visit::visit(op, visitor)?;
                            }
                            Self::SwapWith { table_name } => {
                                sqlparser::ast::Visit::visit(table_name, visitor)?;
                            }
                            Self::SetTblProperties { table_properties } => {
                                sqlparser::ast::Visit::visit(table_properties, visitor)?;
                            }
                            Self::OwnerTo { new_owner } => {
                                sqlparser::ast::Visit::visit(new_owner, visitor)?;
                            }
                            Self::ClusterBy { exprs } => {
                                sqlparser::ast::Visit::visit(exprs, visitor)?;
                            }
                            Self::DropClusteringKey => {}
                            Self::SuspendRecluster => {}
                            Self::ResumeRecluster => {}
                            Self::Refresh { subpath } => {
                                sqlparser::ast::Visit::visit(subpath, visitor)?;
                            }
                            Self::Suspend => {}
                            Self::Resume => {}
                            Self::Algorithm { equals, algorithm } => {
                                sqlparser::ast::Visit::visit(equals, visitor)?;
                                sqlparser::ast::Visit::visit(algorithm, visitor)?;
                            }
                            Self::Lock { equals, lock } => {
                                sqlparser::ast::Visit::visit(equals, visitor)?;
                                sqlparser::ast::Visit::visit(lock, visitor)?;
                            }
                            Self::AutoIncrement { equals, value } => {
                                sqlparser::ast::Visit::visit(equals, visitor)?;
                                sqlparser::ast::Visit::visit(value, visitor)?;
                            }
                            Self::ValidateConstraint { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::SetOptionsParens { options } => {
                                sqlparser::ast::Visit::visit(options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTableOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::AddConstraint { constraint, not_valid } => {
                                sqlparser::ast::VisitMut::visit(constraint, visitor)?;
                                sqlparser::ast::VisitMut::visit(not_valid, visitor)?;
                            }
                            Self::AddColumn {
                                column_keyword, if_not_exists, column_def, column_position }
                                => {
                                sqlparser::ast::VisitMut::visit(column_keyword, visitor)?;
                                sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(column_def, visitor)?;
                                sqlparser::ast::VisitMut::visit(column_position, visitor)?;
                            }
                            Self::AddProjection { if_not_exists, name, select } => {
                                sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                                sqlparser::ast::VisitMut::visit(select, visitor)?;
                            }
                            Self::DropProjection { if_exists, name } => {
                                sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::MaterializeProjection { if_exists, name, partition }
                                => {
                                sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                                sqlparser::ast::VisitMut::visit(partition, visitor)?;
                            }
                            Self::ClearProjection { if_exists, name, partition } => {
                                sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                                sqlparser::ast::VisitMut::visit(partition, visitor)?;
                            }
                            Self::DisableRowLevelSecurity => {}
                            Self::DisableRule { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::DisableTrigger { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::DropConstraint { if_exists, name, drop_behavior } => {
                                sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                                sqlparser::ast::VisitMut::visit(drop_behavior, visitor)?;
                            }
                            Self::DropColumn {
                                has_column_keyword, column_names, if_exists, drop_behavior }
                                => {
                                sqlparser::ast::VisitMut::visit(has_column_keyword,
                                        visitor)?;
                                sqlparser::ast::VisitMut::visit(column_names, visitor)?;
                                sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(drop_behavior, visitor)?;
                            }
                            Self::AttachPartition { partition } => {
                                sqlparser::ast::VisitMut::visit(partition, visitor)?;
                            }
                            Self::DetachPartition { partition } => {
                                sqlparser::ast::VisitMut::visit(partition, visitor)?;
                            }
                            Self::FreezePartition { partition, with_name } => {
                                sqlparser::ast::VisitMut::visit(partition, visitor)?;
                                sqlparser::ast::VisitMut::visit(with_name, visitor)?;
                            }
                            Self::UnfreezePartition { partition, with_name } => {
                                sqlparser::ast::VisitMut::visit(partition, visitor)?;
                                sqlparser::ast::VisitMut::visit(with_name, visitor)?;
                            }
                            Self::DropPrimaryKey { drop_behavior } => {
                                sqlparser::ast::VisitMut::visit(drop_behavior, visitor)?;
                            }
                            Self::DropForeignKey { name, drop_behavior } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                                sqlparser::ast::VisitMut::visit(drop_behavior, visitor)?;
                            }
                            Self::DropIndex { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::EnableAlwaysRule { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::EnableAlwaysTrigger { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::EnableReplicaRule { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::EnableReplicaTrigger { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::EnableRowLevelSecurity => {}
                            Self::ForceRowLevelSecurity => {}
                            Self::NoForceRowLevelSecurity => {}
                            Self::EnableRule { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::EnableTrigger { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::RenamePartitions { old_partitions, new_partitions } =>
                                {
                                sqlparser::ast::VisitMut::visit(old_partitions, visitor)?;
                                sqlparser::ast::VisitMut::visit(new_partitions, visitor)?;
                            }
                            Self::ReplicaIdentity { identity } => {
                                sqlparser::ast::VisitMut::visit(identity, visitor)?;
                            }
                            Self::AddPartitions { if_not_exists, new_partitions } => {
                                sqlparser::ast::VisitMut::visit(if_not_exists, visitor)?;
                                sqlparser::ast::VisitMut::visit(new_partitions, visitor)?;
                            }
                            Self::DropPartitions { partitions, if_exists } => {
                                sqlparser::ast::VisitMut::visit(partitions, visitor)?;
                                sqlparser::ast::VisitMut::visit(if_exists, visitor)?;
                            }
                            Self::RenameColumn { old_column_name, new_column_name } => {
                                sqlparser::ast::VisitMut::visit(old_column_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(new_column_name, visitor)?;
                            }
                            Self::RenameTable { table_name } => {
                                sqlparser::ast::VisitMut::visit(table_name, visitor)?;
                            }
                            Self::ChangeColumn {
                                old_name, new_name, data_type, options, column_position } =>
                                {
                                sqlparser::ast::VisitMut::visit(old_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(new_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(data_type, visitor)?;
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                                sqlparser::ast::VisitMut::visit(column_position, visitor)?;
                            }
                            Self::ModifyColumn {
                                col_name, data_type, options, column_position } => {
                                sqlparser::ast::VisitMut::visit(col_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(data_type, visitor)?;
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                                sqlparser::ast::VisitMut::visit(column_position, visitor)?;
                            }
                            Self::RenameConstraint { old_name, new_name } => {
                                sqlparser::ast::VisitMut::visit(old_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(new_name, visitor)?;
                            }
                            Self::AlterColumn { column_name, op } => {
                                sqlparser::ast::VisitMut::visit(column_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(op, visitor)?;
                            }
                            Self::SwapWith { table_name } => {
                                sqlparser::ast::VisitMut::visit(table_name, visitor)?;
                            }
                            Self::SetTblProperties { table_properties } => {
                                sqlparser::ast::VisitMut::visit(table_properties, visitor)?;
                            }
                            Self::OwnerTo { new_owner } => {
                                sqlparser::ast::VisitMut::visit(new_owner, visitor)?;
                            }
                            Self::ClusterBy { exprs } => {
                                sqlparser::ast::VisitMut::visit(exprs, visitor)?;
                            }
                            Self::DropClusteringKey => {}
                            Self::SuspendRecluster => {}
                            Self::ResumeRecluster => {}
                            Self::Refresh { subpath } => {
                                sqlparser::ast::VisitMut::visit(subpath, visitor)?;
                            }
                            Self::Suspend => {}
                            Self::Resume => {}
                            Self::Algorithm { equals, algorithm } => {
                                sqlparser::ast::VisitMut::visit(equals, visitor)?;
                                sqlparser::ast::VisitMut::visit(algorithm, visitor)?;
                            }
                            Self::Lock { equals, lock } => {
                                sqlparser::ast::VisitMut::visit(equals, visitor)?;
                                sqlparser::ast::VisitMut::visit(lock, visitor)?;
                            }
                            Self::AutoIncrement { equals, value } => {
                                sqlparser::ast::VisitMut::visit(equals, visitor)?;
                                sqlparser::ast::VisitMut::visit(value, visitor)?;
                            }
                            Self::ValidateConstraint { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::SetOptionsParens { options } => {
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
127pub enum AlterTableOperation {
128    /// `ADD <table_constraint> [NOT VALID]`
129    AddConstraint {
130        /// The table constraint to add.
131        constraint: TableConstraint,
132        /// Whether the constraint should be marked `NOT VALID`.
133        not_valid: bool,
134    },
135    /// `ADD [COLUMN] [IF NOT EXISTS] <column_def>`
136    AddColumn {
137        /// `[COLUMN]`.
138        column_keyword: bool,
139        /// `[IF NOT EXISTS]`
140        if_not_exists: bool,
141        /// <column_def>.
142        column_def: ColumnDef,
143        /// MySQL `ALTER TABLE` only  [FIRST | AFTER column_name]
144        column_position: Option<MySQLColumnPosition>,
145    },
146    /// `ADD PROJECTION [IF NOT EXISTS] name ( SELECT <COLUMN LIST EXPR> [GROUP BY] [ORDER BY])`
147    ///
148    /// Note: this is a ClickHouse-specific operation.
149    /// Please refer to [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/projection#add-projection)
150    AddProjection {
151        /// Whether `IF NOT EXISTS` was specified.
152        if_not_exists: bool,
153        /// Name of the projection to add.
154        name: Ident,
155        /// The projection's select clause.
156        select: ProjectionSelect,
157    },
158    /// `DROP PROJECTION [IF EXISTS] name`
159    ///
160    /// Note: this is a ClickHouse-specific operation.
161    /// Please refer to [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/projection#drop-projection)
162    DropProjection {
163        /// Whether `IF EXISTS` was specified.
164        if_exists: bool,
165        /// Name of the projection to drop.
166        name: Ident,
167    },
168    /// `MATERIALIZE PROJECTION [IF EXISTS] name [IN PARTITION partition_name]`
169    ///
170    ///  Note: this is a ClickHouse-specific operation.
171    /// Please refer to [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/projection#materialize-projection)
172    MaterializeProjection {
173        /// Whether `IF EXISTS` was specified.
174        if_exists: bool,
175        /// Name of the projection to materialize.
176        name: Ident,
177        /// Optional partition name to operate on.
178        partition: Option<Ident>,
179    },
180    /// `CLEAR PROJECTION [IF EXISTS] name [IN PARTITION partition_name]`
181    ///
182    /// Note: this is a ClickHouse-specific operation.
183    /// Please refer to [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/projection#clear-projection)
184    ClearProjection {
185        /// Whether `IF EXISTS` was specified.
186        if_exists: bool,
187        /// Name of the projection to clear.
188        name: Ident,
189        /// Optional partition name to operate on.
190        partition: Option<Ident>,
191    },
192    /// `DISABLE ROW LEVEL SECURITY`
193    ///
194    /// Note: this is a PostgreSQL-specific operation.
195    /// Please refer to [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-altertable.html)
196    DisableRowLevelSecurity,
197    /// `DISABLE RULE rewrite_rule_name`
198    ///
199    /// Note: this is a PostgreSQL-specific operation.
200    DisableRule {
201        /// Name of the rule to disable.
202        name: Ident,
203    },
204    /// `DISABLE TRIGGER [ trigger_name | ALL | USER ]`
205    ///
206    /// Note: this is a PostgreSQL-specific operation.
207    DisableTrigger {
208        /// Name of the trigger to disable (or ALL/USER).
209        name: Ident,
210    },
211    /// `DROP CONSTRAINT [ IF EXISTS ] <name>`
212    DropConstraint {
213        /// `IF EXISTS` flag for dropping the constraint.
214        if_exists: bool,
215        /// Name of the constraint to drop.
216        name: Ident,
217        /// Optional drop behavior (`CASCADE`/`RESTRICT`).
218        drop_behavior: Option<DropBehavior>,
219    },
220    /// `DROP [ COLUMN ] [ IF EXISTS ] <column_name> [ , <column_name>, ... ] [ CASCADE ]`
221    DropColumn {
222        /// Whether the `COLUMN` keyword was present.
223        has_column_keyword: bool,
224        /// Names of columns to drop.
225        column_names: Vec<Ident>,
226        /// Whether `IF EXISTS` was specified for the columns.
227        if_exists: bool,
228        /// Optional drop behavior for the column removal.
229        drop_behavior: Option<DropBehavior>,
230    },
231    /// `ATTACH PART|PARTITION <partition_expr>`
232    /// Note: this is a ClickHouse-specific operation, please refer to
233    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#attach-partitionpart)
234    AttachPartition {
235        // PART is not a short form of PARTITION, it's a separate keyword
236        // which represents a physical file on disk and partition is a logical entity.
237        /// Partition expression to attach.
238        partition: Partition,
239    },
240    /// `DETACH PART|PARTITION <partition_expr>`
241    /// Note: this is a ClickHouse-specific operation, please refer to
242    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#detach-partitionpart)
243    DetachPartition {
244        // See `AttachPartition` for more details
245        /// Partition expression to detach.
246        partition: Partition,
247    },
248    /// `FREEZE PARTITION <partition_expr>`
249    /// Note: this is a ClickHouse-specific operation, please refer to
250    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#freeze-partition)
251    FreezePartition {
252        /// Partition to freeze.
253        partition: Partition,
254        /// Optional name for the freeze operation.
255        with_name: Option<Ident>,
256    },
257    /// `UNFREEZE PARTITION <partition_expr>`
258    /// Note: this is a ClickHouse-specific operation, please refer to
259    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#unfreeze-partition)
260    UnfreezePartition {
261        /// Partition to unfreeze.
262        partition: Partition,
263        /// Optional name associated with the unfreeze operation.
264        with_name: Option<Ident>,
265    },
266    /// `DROP PRIMARY KEY`
267    ///
268    /// [MySQL](https://dev.mysql.com/doc/refman/8.4/en/alter-table.html)
269    /// [Snowflake](https://docs.snowflake.com/en/sql-reference/constraints-drop)
270    DropPrimaryKey {
271        /// Optional drop behavior for the primary key (`CASCADE`/`RESTRICT`).
272        drop_behavior: Option<DropBehavior>,
273    },
274    /// `DROP FOREIGN KEY <fk_symbol>`
275    ///
276    /// [MySQL](https://dev.mysql.com/doc/refman/8.4/en/alter-table.html)
277    /// [Snowflake](https://docs.snowflake.com/en/sql-reference/constraints-drop)
278    DropForeignKey {
279        /// Foreign key symbol/name to drop.
280        name: Ident,
281        /// Optional drop behavior for the foreign key.
282        drop_behavior: Option<DropBehavior>,
283    },
284    /// `DROP INDEX <index_name>`
285    ///
286    /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
287    DropIndex {
288        /// Name of the index to drop.
289        name: Ident,
290    },
291    /// `ENABLE ALWAYS RULE rewrite_rule_name`
292    ///
293    /// Note: this is a PostgreSQL-specific operation.
294    EnableAlwaysRule {
295        /// Name of the rule to enable.
296        name: Ident,
297    },
298    /// `ENABLE ALWAYS TRIGGER trigger_name`
299    ///
300    /// Note: this is a PostgreSQL-specific operation.
301    EnableAlwaysTrigger {
302        /// Name of the trigger to enable.
303        name: Ident,
304    },
305    /// `ENABLE REPLICA RULE rewrite_rule_name`
306    ///
307    /// Note: this is a PostgreSQL-specific operation.
308    EnableReplicaRule {
309        /// Name of the replica rule to enable.
310        name: Ident,
311    },
312    /// `ENABLE REPLICA TRIGGER trigger_name`
313    ///
314    /// Note: this is a PostgreSQL-specific operation.
315    EnableReplicaTrigger {
316        /// Name of the replica trigger to enable.
317        name: Ident,
318    },
319    /// `ENABLE ROW LEVEL SECURITY`
320    ///
321    /// Note: this is a PostgreSQL-specific operation.
322    /// Please refer to [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-altertable.html)
323    EnableRowLevelSecurity,
324    /// `FORCE ROW LEVEL SECURITY`
325    ///
326    /// Note: this is a PostgreSQL-specific operation.
327    /// Please refer to [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-altertable.html)
328    ForceRowLevelSecurity,
329    /// `NO FORCE ROW LEVEL SECURITY`
330    ///
331    /// Note: this is a PostgreSQL-specific operation.
332    /// Please refer to [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-altertable.html)
333    NoForceRowLevelSecurity,
334    /// `ENABLE RULE rewrite_rule_name`
335    ///
336    /// Note: this is a PostgreSQL-specific operation.
337    EnableRule {
338        /// Name of the rule to enable.
339        name: Ident,
340    },
341    /// `ENABLE TRIGGER [ trigger_name | ALL | USER ]`
342    ///
343    /// Note: this is a PostgreSQL-specific operation.
344    EnableTrigger {
345        /// Name of the trigger to enable (or ALL/USER).
346        name: Ident,
347    },
348    /// `RENAME TO PARTITION (partition=val)`
349    RenamePartitions {
350        /// Old partition expressions to be renamed.
351        old_partitions: Vec<Expr>,
352        /// New partition expressions corresponding to the old ones.
353        new_partitions: Vec<Expr>,
354    },
355    /// REPLICA IDENTITY { DEFAULT | USING INDEX index_name | FULL | NOTHING }
356    ///
357    /// Note: this is a PostgreSQL-specific operation.
358    /// Please refer to [PostgreSQL documentation](https://www.postgresql.org/docs/current/sql-altertable.html)
359    ReplicaIdentity {
360        /// Replica identity setting to apply.
361        identity: ReplicaIdentity,
362    },
363    /// Add Partitions
364    AddPartitions {
365        /// Whether `IF NOT EXISTS` was present when adding partitions.
366        if_not_exists: bool,
367        /// New partitions to add.
368        new_partitions: Vec<Partition>,
369    },
370    /// `DROP PARTITIONS ...` / drop partitions from the table.
371    DropPartitions {
372        /// Partitions to drop (expressions).
373        partitions: Vec<Expr>,
374        /// Whether `IF EXISTS` was specified for dropping partitions.
375        if_exists: bool,
376    },
377    /// `RENAME [ COLUMN ] <old_column_name> TO <new_column_name>`
378    RenameColumn {
379        /// Existing column name to rename.
380        old_column_name: Ident,
381        /// New column name.
382        new_column_name: Ident,
383    },
384    /// `RENAME TO <table_name>`
385    RenameTable {
386        /// The new table name or renaming kind.
387        table_name: RenameTableNameKind,
388    },
389    // CHANGE [ COLUMN ] <old_name> <new_name> <data_type> [ <options> ]
390    /// Change an existing column's name, type, and options.
391    ChangeColumn {
392        /// Old column name.
393        old_name: Ident,
394        /// New column name.
395        new_name: Ident,
396        /// New data type for the column.
397        data_type: DataType,
398        /// Column options to apply after the change.
399        options: Vec<ColumnOption>,
400        /// MySQL-specific column position (`FIRST`/`AFTER`).
401        column_position: Option<MySQLColumnPosition>,
402    },
403    // CHANGE [ COLUMN ] <col_name> <data_type> [ <options> ]
404    /// Modify an existing column's type and options.
405    ModifyColumn {
406        /// Column name to modify.
407        col_name: Ident,
408        /// New data type for the column.
409        data_type: DataType,
410        /// Column options to set.
411        options: Vec<ColumnOption>,
412        /// MySQL-specific column position (`FIRST`/`AFTER`).
413        column_position: Option<MySQLColumnPosition>,
414    },
415    /// `RENAME CONSTRAINT <old_constraint_name> TO <new_constraint_name>`
416    ///
417    /// Note: this is a PostgreSQL-specific operation.
418    /// Rename a constraint on the table.
419    RenameConstraint {
420        /// Existing constraint name.
421        old_name: Ident,
422        /// New constraint name.
423        new_name: Ident,
424    },
425    /// `ALTER [ COLUMN ]`
426    /// Alter a specific column with the provided operation.
427    AlterColumn {
428        /// The column to alter.
429        column_name: Ident,
430        /// Operation to apply to the column.
431        op: AlterColumnOperation,
432    },
433    /// 'SWAP WITH <table_name>'
434    ///
435    /// Note: this is Snowflake specific <https://docs.snowflake.com/en/sql-reference/sql/alter-table>
436    SwapWith {
437        /// Table name to swap with.
438        table_name: ObjectName,
439    },
440    /// 'SET TBLPROPERTIES ( { property_key [ = ] property_val } [, ...] )'
441    SetTblProperties {
442        /// Table properties specified as SQL options.
443        table_properties: Vec<SqlOption>,
444    },
445    /// `OWNER TO { <new_owner> | CURRENT_ROLE | CURRENT_USER | SESSION_USER }`
446    ///
447    /// Note: this is PostgreSQL-specific <https://www.postgresql.org/docs/current/sql-altertable.html>
448    OwnerTo {
449        /// The new owner to assign to the table.
450        new_owner: Owner,
451    },
452    /// Snowflake table clustering options
453    /// <https://docs.snowflake.com/en/sql-reference/sql/alter-table#clustering-actions-clusteringaction>
454    ClusterBy {
455        /// Expressions used for clustering the table.
456        exprs: Vec<Expr>,
457    },
458    /// Remove the clustering key from the table.
459    DropClusteringKey,
460    /// Suspend background reclustering operations.
461    SuspendRecluster,
462    /// Resume background reclustering operations.
463    ResumeRecluster,
464    /// `REFRESH [ '<subpath>' ]`
465    ///
466    /// Note: this is Snowflake specific for dynamic/external tables
467    /// <https://docs.snowflake.com/en/sql-reference/sql/alter-dynamic-table>
468    /// <https://docs.snowflake.com/en/sql-reference/sql/alter-external-table>
469    Refresh {
470        /// Optional subpath for external table refresh
471        subpath: Option<String>,
472    },
473    /// `SUSPEND`
474    ///
475    /// Note: this is Snowflake specific for dynamic tables <https://docs.snowflake.com/en/sql-reference/sql/alter-table>
476    Suspend,
477    /// `RESUME`
478    ///
479    /// Note: this is Snowflake specific for dynamic tables <https://docs.snowflake.com/en/sql-reference/sql/alter-table>
480    Resume,
481    /// `ALGORITHM [=] { DEFAULT | INSTANT | INPLACE | COPY }`
482    ///
483    /// [MySQL]-specific table alter algorithm.
484    ///
485    /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
486    Algorithm {
487        /// Whether the `=` sign was used (`ALGORITHM = ...`).
488        equals: bool,
489        /// The algorithm to use for the alter operation (MySQL-specific).
490        algorithm: AlterTableAlgorithm,
491    },
492
493    /// `LOCK [=] { DEFAULT | NONE | SHARED | EXCLUSIVE }`
494    ///
495    /// [MySQL]-specific table alter lock.
496    ///
497    /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
498    Lock {
499        /// Whether the `=` sign was used (`LOCK = ...`).
500        equals: bool,
501        /// The locking behavior to apply (MySQL-specific).
502        lock: AlterTableLock,
503    },
504    /// `AUTO_INCREMENT [=] <value>`
505    ///
506    /// [MySQL]-specific table option for raising current auto increment value.
507    ///
508    /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
509    AutoIncrement {
510        /// Whether the `=` sign was used (`AUTO_INCREMENT = ...`).
511        equals: bool,
512        /// Value to set for the auto-increment counter.
513        value: ValueWithSpan,
514    },
515    /// `VALIDATE CONSTRAINT <name>`
516    ValidateConstraint {
517        /// Name of the constraint to validate.
518        name: Ident,
519    },
520    /// Arbitrary parenthesized `SET` options.
521    ///
522    /// Example:
523    /// ```sql
524    /// SET (scale_factor = 0.01, threshold = 500)`
525    /// ```
526    /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-altertable.html)
527    SetOptionsParens {
528        /// Parenthesized options supplied to `SET (...)`.
529        options: Vec<SqlOption>,
530    },
531}
532
533/// An `ALTER Policy` (`Statement::AlterPolicy`) operation
534///
535/// [PostgreSQL Documentation](https://www.postgresql.org/docs/current/sql-altertable.html)
536#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterPolicyOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterPolicyOperation::Rename { new_name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "Rename", "new_name", &__self_0),
            AlterPolicyOperation::Apply {
                to: __self_0, using: __self_1, with_check: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f, "Apply",
                    "to", __self_0, "using", __self_1, "with_check", &__self_2),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterPolicyOperation {
    #[inline]
    fn clone(&self) -> AlterPolicyOperation {
        match self {
            AlterPolicyOperation::Rename { new_name: __self_0 } =>
                AlterPolicyOperation::Rename {
                    new_name: ::core::clone::Clone::clone(__self_0),
                },
            AlterPolicyOperation::Apply {
                to: __self_0, using: __self_1, with_check: __self_2 } =>
                AlterPolicyOperation::Apply {
                    to: ::core::clone::Clone::clone(__self_0),
                    using: ::core::clone::Clone::clone(__self_1),
                    with_check: ::core::clone::Clone::clone(__self_2),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterPolicyOperation {
    #[inline]
    fn eq(&self, other: &AlterPolicyOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterPolicyOperation::Rename { new_name: __self_0 },
                    AlterPolicyOperation::Rename { new_name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterPolicyOperation::Apply {
                    to: __self_0, using: __self_1, with_check: __self_2 },
                    AlterPolicyOperation::Apply {
                    to: __arg1_0, using: __arg1_1, with_check: __arg1_2 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                        __self_2 == __arg1_2,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterPolicyOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterPolicyOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterPolicyOperation::Rename { new_name: __self_0 },
                AlterPolicyOperation::Rename { new_name: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterPolicyOperation::Apply {
                to: __self_0, using: __self_1, with_check: __self_2 },
                AlterPolicyOperation::Apply {
                to: __arg1_0, using: __arg1_1, with_check: __arg1_2 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                __arg1_1) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterPolicyOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<Owner>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterPolicyOperation {
    #[inline]
    fn cmp(&self, other: &AlterPolicyOperation) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterPolicyOperation::Rename { new_name: __self_0 },
                        AlterPolicyOperation::Rename { new_name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterPolicyOperation::Apply {
                        to: __self_0, using: __self_1, with_check: __self_2 },
                        AlterPolicyOperation::Apply {
                        to: __arg1_0, using: __arg1_1, with_check: __arg1_2 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterPolicyOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterPolicyOperation::Rename { new_name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterPolicyOperation::Apply {
                to: __self_0, using: __self_1, with_check: __self_2 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state)
            }
        }
    }
}Hash)]
537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
538#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterPolicyOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Rename { new_name } => {
                                sqlparser::ast::Visit::visit(new_name, visitor)?;
                            }
                            Self::Apply { to, using, with_check } => {
                                sqlparser::ast::Visit::visit(to, visitor)?;
                                sqlparser::ast::Visit::visit(using, visitor)?;
                                sqlparser::ast::Visit::visit(with_check, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterPolicyOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Rename { new_name } => {
                                sqlparser::ast::VisitMut::visit(new_name, visitor)?;
                            }
                            Self::Apply { to, using, with_check } => {
                                sqlparser::ast::VisitMut::visit(to, visitor)?;
                                sqlparser::ast::VisitMut::visit(using, visitor)?;
                                sqlparser::ast::VisitMut::visit(with_check, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
539pub enum AlterPolicyOperation {
540    /// Rename the policy to `new_name`.
541    Rename {
542        /// The new identifier for the policy.
543        new_name: Ident,
544    },
545    /// Apply/modify policy properties.
546    Apply {
547        /// Optional list of owners the policy applies to.
548        to: Option<Vec<Owner>>,
549        /// Optional `USING` expression for the policy.
550        using: Option<Expr>,
551        /// Optional `WITH CHECK` expression for the policy.
552        with_check: Option<Expr>,
553    },
554}
555
556impl fmt::Display for AlterPolicyOperation {
557    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
558        match self {
559            AlterPolicyOperation::Rename { new_name } => {
560                f.write_fmt(format_args!(" RENAME TO {0}", new_name))write!(f, " RENAME TO {new_name}")
561            }
562            AlterPolicyOperation::Apply {
563                to,
564                using,
565                with_check,
566            } => {
567                if let Some(to) = to {
568                    f.write_fmt(format_args!(" TO {0}", display_comma_separated(to)))write!(f, " TO {}", display_comma_separated(to))?;
569                }
570                if let Some(using) = using {
571                    f.write_fmt(format_args!(" USING ({0})", using))write!(f, " USING ({using})")?;
572                }
573                if let Some(with_check) = with_check {
574                    f.write_fmt(format_args!(" WITH CHECK ({0})", with_check))write!(f, " WITH CHECK ({with_check})")?;
575                }
576                Ok(())
577            }
578        }
579    }
580}
581
582/// [MySQL] `ALTER TABLE` algorithm.
583///
584/// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
585#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTableAlgorithm {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                AlterTableAlgorithm::Default => "Default",
                AlterTableAlgorithm::Instant => "Instant",
                AlterTableAlgorithm::Inplace => "Inplace",
                AlterTableAlgorithm::Copy => "Copy",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTableAlgorithm {
    #[inline]
    fn clone(&self) -> AlterTableAlgorithm { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for AlterTableAlgorithm { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTableAlgorithm {
    #[inline]
    fn eq(&self, other: &AlterTableAlgorithm) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTableAlgorithm {
    #[inline]
    fn partial_cmp(&self, other: &AlterTableAlgorithm)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTableAlgorithm {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTableAlgorithm {
    #[inline]
    fn cmp(&self, other: &AlterTableAlgorithm) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTableAlgorithm {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
587#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTableAlgorithm {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Default => {}
                            Self::Instant => {}
                            Self::Inplace => {}
                            Self::Copy => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTableAlgorithm {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Default => {}
                            Self::Instant => {}
                            Self::Inplace => {}
                            Self::Copy => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
588/// Algorithm option for `ALTER TABLE` operations (MySQL-specific).
589pub enum AlterTableAlgorithm {
590    /// Default algorithm selection.
591    Default,
592    /// `INSTANT` algorithm.
593    Instant,
594    /// `INPLACE` algorithm.
595    Inplace,
596    /// `COPY` algorithm.
597    Copy,
598}
599
600impl fmt::Display for AlterTableAlgorithm {
601    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
602        f.write_str(match self {
603            Self::Default => "DEFAULT",
604            Self::Instant => "INSTANT",
605            Self::Inplace => "INPLACE",
606            Self::Copy => "COPY",
607        })
608    }
609}
610
611/// [MySQL] `ALTER TABLE` lock.
612///
613/// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
614#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTableLock {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                AlterTableLock::Default => "Default",
                AlterTableLock::None => "None",
                AlterTableLock::Shared => "Shared",
                AlterTableLock::Exclusive => "Exclusive",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTableLock {
    #[inline]
    fn clone(&self) -> AlterTableLock { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for AlterTableLock { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTableLock {
    #[inline]
    fn eq(&self, other: &AlterTableLock) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTableLock {
    #[inline]
    fn partial_cmp(&self, other: &AlterTableLock)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTableLock {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTableLock {
    #[inline]
    fn cmp(&self, other: &AlterTableLock) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTableLock {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
615#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
616#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTableLock {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Default => {}
                            Self::None => {}
                            Self::Shared => {}
                            Self::Exclusive => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTableLock {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Default => {}
                            Self::None => {}
                            Self::Shared => {}
                            Self::Exclusive => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
617/// Locking behavior for `ALTER TABLE` (MySQL-specific).
618pub enum AlterTableLock {
619    /// `DEFAULT` lock behavior.
620    Default,
621    /// `NONE` lock.
622    None,
623    /// `SHARED` lock.
624    Shared,
625    /// `EXCLUSIVE` lock.
626    Exclusive,
627}
628
629impl fmt::Display for AlterTableLock {
630    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
631        f.write_str(match self {
632            Self::Default => "DEFAULT",
633            Self::None => "NONE",
634            Self::Shared => "SHARED",
635            Self::Exclusive => "EXCLUSIVE",
636        })
637    }
638}
639
640#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Owner {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Owner::Ident(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Ident",
                    &__self_0),
            Owner::CurrentRole =>
                ::core::fmt::Formatter::write_str(f, "CurrentRole"),
            Owner::CurrentUser =>
                ::core::fmt::Formatter::write_str(f, "CurrentUser"),
            Owner::SessionUser =>
                ::core::fmt::Formatter::write_str(f, "SessionUser"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Owner {
    #[inline]
    fn clone(&self) -> Owner {
        match self {
            Owner::Ident(__self_0) =>
                Owner::Ident(::core::clone::Clone::clone(__self_0)),
            Owner::CurrentRole => Owner::CurrentRole,
            Owner::CurrentUser => Owner::CurrentUser,
            Owner::SessionUser => Owner::SessionUser,
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Owner {
    #[inline]
    fn eq(&self, other: &Owner) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (Owner::Ident(__self_0), Owner::Ident(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Owner {
    #[inline]
    fn partial_cmp(&self, other: &Owner)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (Owner::Ident(__self_0), Owner::Ident(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Owner {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Owner {
    #[inline]
    fn cmp(&self, other: &Owner) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (Owner::Ident(__self_0), Owner::Ident(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Owner {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            Owner::Ident(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
642#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Owner {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Ident(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::CurrentRole => {}
                            Self::CurrentUser => {}
                            Self::SessionUser => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for Owner {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Ident(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::CurrentRole => {}
                            Self::CurrentUser => {}
                            Self::SessionUser => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
643/// New owner specification for `ALTER TABLE ... OWNER TO ...`
644pub enum Owner {
645    /// A specific user/role identifier.
646    Ident(Ident),
647    /// `CURRENT_ROLE` keyword.
648    CurrentRole,
649    /// `CURRENT_USER` keyword.
650    CurrentUser,
651    /// `SESSION_USER` keyword.
652    SessionUser,
653}
654
655impl fmt::Display for Owner {
656    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
657        match self {
658            Owner::Ident(ident) => f.write_fmt(format_args!("{0}", ident))write!(f, "{ident}"),
659            Owner::CurrentRole => f.write_fmt(format_args!("CURRENT_ROLE"))write!(f, "CURRENT_ROLE"),
660            Owner::CurrentUser => f.write_fmt(format_args!("CURRENT_USER"))write!(f, "CURRENT_USER"),
661            Owner::SessionUser => f.write_fmt(format_args!("SESSION_USER"))write!(f, "SESSION_USER"),
662        }
663    }
664}
665
666#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterConnectorOwner {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterConnectorOwner::User(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "User",
                    &__self_0),
            AlterConnectorOwner::Role(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Role",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterConnectorOwner {
    #[inline]
    fn clone(&self) -> AlterConnectorOwner {
        match self {
            AlterConnectorOwner::User(__self_0) =>
                AlterConnectorOwner::User(::core::clone::Clone::clone(__self_0)),
            AlterConnectorOwner::Role(__self_0) =>
                AlterConnectorOwner::Role(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterConnectorOwner {
    #[inline]
    fn eq(&self, other: &AlterConnectorOwner) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterConnectorOwner::User(__self_0),
                    AlterConnectorOwner::User(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (AlterConnectorOwner::Role(__self_0),
                    AlterConnectorOwner::Role(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterConnectorOwner {
    #[inline]
    fn partial_cmp(&self, other: &AlterConnectorOwner)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterConnectorOwner::User(__self_0),
                AlterConnectorOwner::User(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterConnectorOwner::Role(__self_0),
                AlterConnectorOwner::Role(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterConnectorOwner {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterConnectorOwner {
    #[inline]
    fn cmp(&self, other: &AlterConnectorOwner) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterConnectorOwner::User(__self_0),
                        AlterConnectorOwner::User(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterConnectorOwner::Role(__self_0),
                        AlterConnectorOwner::Role(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterConnectorOwner {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterConnectorOwner::User(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterConnectorOwner::Role(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
668#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterConnectorOwner {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::User(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Role(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterConnectorOwner {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::User(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Role(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
669/// New connector owner specification for `ALTER CONNECTOR ... OWNER TO ...`
670pub enum AlterConnectorOwner {
671    /// `USER <ident>` connector owner.
672    User(Ident),
673    /// `ROLE <ident>` connector owner.
674    Role(Ident),
675}
676
677impl fmt::Display for AlterConnectorOwner {
678    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
679        match self {
680            AlterConnectorOwner::User(ident) => f.write_fmt(format_args!("USER {0}", ident))write!(f, "USER {ident}"),
681            AlterConnectorOwner::Role(ident) => f.write_fmt(format_args!("ROLE {0}", ident))write!(f, "ROLE {ident}"),
682        }
683    }
684}
685
686#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterIndexOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterIndexOperation::RenameIndex { index_name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "RenameIndex", "index_name", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterIndexOperation {
    #[inline]
    fn clone(&self) -> AlterIndexOperation {
        match self {
            AlterIndexOperation::RenameIndex { index_name: __self_0 } =>
                AlterIndexOperation::RenameIndex {
                    index_name: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterIndexOperation {
    #[inline]
    fn eq(&self, other: &AlterIndexOperation) -> bool {
        match (self, other) {
            (AlterIndexOperation::RenameIndex { index_name: __self_0 },
                AlterIndexOperation::RenameIndex { index_name: __arg1_0 }) =>
                __self_0 == __arg1_0,
        }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterIndexOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterIndexOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match (self, other) {
            (AlterIndexOperation::RenameIndex { index_name: __self_0 },
                AlterIndexOperation::RenameIndex { index_name: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterIndexOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterIndexOperation {
    #[inline]
    fn cmp(&self, other: &AlterIndexOperation) -> ::core::cmp::Ordering {
        match (self, other) {
            (AlterIndexOperation::RenameIndex { index_name: __self_0 },
                AlterIndexOperation::RenameIndex { index_name: __arg1_0 }) =>
                ::core::cmp::Ord::cmp(__self_0, __arg1_0),
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterIndexOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        match self {
            AlterIndexOperation::RenameIndex { index_name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
688#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterIndexOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::RenameIndex { index_name } => {
                                sqlparser::ast::Visit::visit(index_name, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterIndexOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::RenameIndex { index_name } => {
                                sqlparser::ast::VisitMut::visit(index_name, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
689/// Alterations that can be applied to an index.
690pub enum AlterIndexOperation {
691    /// Rename the index to `index_name`.
692    RenameIndex {
693        /// The new name for the index.
694        index_name: ObjectName,
695    },
696}
697
698impl fmt::Display for AlterTableOperation {
699    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
700        match self {
701            AlterTableOperation::AddPartitions {
702                if_not_exists,
703                new_partitions,
704            } => f.write_fmt(format_args!("ADD{1} {0}", display_separated(new_partitions, " "),
        if *if_not_exists { " IF NOT EXISTS" } else { "" }))write!(
705                f,
706                "ADD{ine} {}",
707                display_separated(new_partitions, " "),
708                ine = if *if_not_exists { " IF NOT EXISTS" } else { "" }
709            ),
710            AlterTableOperation::AddConstraint {
711                not_valid,
712                constraint,
713            } => {
714                f.write_fmt(format_args!("ADD {0}", constraint))write!(f, "ADD {constraint}")?;
715                if *not_valid {
716                    f.write_fmt(format_args!(" NOT VALID"))write!(f, " NOT VALID")?;
717                }
718                Ok(())
719            }
720            AlterTableOperation::AddColumn {
721                column_keyword,
722                if_not_exists,
723                column_def,
724                column_position,
725            } => {
726                f.write_fmt(format_args!("ADD"))write!(f, "ADD")?;
727                if *column_keyword {
728                    f.write_fmt(format_args!(" COLUMN"))write!(f, " COLUMN")?;
729                }
730                if *if_not_exists {
731                    f.write_fmt(format_args!(" IF NOT EXISTS"))write!(f, " IF NOT EXISTS")?;
732                }
733                f.write_fmt(format_args!(" {0}", column_def))write!(f, " {column_def}")?;
734
735                if let Some(position) = column_position {
736                    f.write_fmt(format_args!(" {0}", position))write!(f, " {position}")?;
737                }
738
739                Ok(())
740            }
741            AlterTableOperation::AddProjection {
742                if_not_exists,
743                name,
744                select: query,
745            } => {
746                f.write_fmt(format_args!("ADD PROJECTION"))write!(f, "ADD PROJECTION")?;
747                if *if_not_exists {
748                    f.write_fmt(format_args!(" IF NOT EXISTS"))write!(f, " IF NOT EXISTS")?;
749                }
750                f.write_fmt(format_args!(" {0} ({1})", name, query))write!(f, " {name} ({query})")
751            }
752            AlterTableOperation::Algorithm { equals, algorithm } => {
753                f.write_fmt(format_args!("ALGORITHM {0}{1}", if *equals { "= " } else { "" },
        algorithm))write!(
754                    f,
755                    "ALGORITHM {}{}",
756                    if *equals { "= " } else { "" },
757                    algorithm
758                )
759            }
760            AlterTableOperation::DropProjection { if_exists, name } => {
761                f.write_fmt(format_args!("DROP PROJECTION"))write!(f, "DROP PROJECTION")?;
762                if *if_exists {
763                    f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
764                }
765                f.write_fmt(format_args!(" {0}", name))write!(f, " {name}")
766            }
767            AlterTableOperation::MaterializeProjection {
768                if_exists,
769                name,
770                partition,
771            } => {
772                f.write_fmt(format_args!("MATERIALIZE PROJECTION"))write!(f, "MATERIALIZE PROJECTION")?;
773                if *if_exists {
774                    f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
775                }
776                f.write_fmt(format_args!(" {0}", name))write!(f, " {name}")?;
777                if let Some(partition) = partition {
778                    f.write_fmt(format_args!(" IN PARTITION {0}", partition))write!(f, " IN PARTITION {partition}")?;
779                }
780                Ok(())
781            }
782            AlterTableOperation::ClearProjection {
783                if_exists,
784                name,
785                partition,
786            } => {
787                f.write_fmt(format_args!("CLEAR PROJECTION"))write!(f, "CLEAR PROJECTION")?;
788                if *if_exists {
789                    f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
790                }
791                f.write_fmt(format_args!(" {0}", name))write!(f, " {name}")?;
792                if let Some(partition) = partition {
793                    f.write_fmt(format_args!(" IN PARTITION {0}", partition))write!(f, " IN PARTITION {partition}")?;
794                }
795                Ok(())
796            }
797            AlterTableOperation::AlterColumn { column_name, op } => {
798                f.write_fmt(format_args!("ALTER COLUMN {0} {1}", column_name, op))write!(f, "ALTER COLUMN {column_name} {op}")
799            }
800            AlterTableOperation::DisableRowLevelSecurity => {
801                f.write_fmt(format_args!("DISABLE ROW LEVEL SECURITY"))write!(f, "DISABLE ROW LEVEL SECURITY")
802            }
803            AlterTableOperation::DisableRule { name } => {
804                f.write_fmt(format_args!("DISABLE RULE {0}", name))write!(f, "DISABLE RULE {name}")
805            }
806            AlterTableOperation::DisableTrigger { name } => {
807                f.write_fmt(format_args!("DISABLE TRIGGER {0}", name))write!(f, "DISABLE TRIGGER {name}")
808            }
809            AlterTableOperation::DropPartitions {
810                partitions,
811                if_exists,
812            } => f.write_fmt(format_args!("DROP{1} PARTITION ({0})",
        display_comma_separated(partitions),
        if *if_exists { " IF EXISTS" } else { "" }))write!(
813                f,
814                "DROP{ie} PARTITION ({})",
815                display_comma_separated(partitions),
816                ie = if *if_exists { " IF EXISTS" } else { "" }
817            ),
818            AlterTableOperation::DropConstraint {
819                if_exists,
820                name,
821                drop_behavior,
822            } => {
823                f.write_fmt(format_args!("DROP CONSTRAINT {0}{1}",
        if *if_exists { "IF EXISTS " } else { "" }, name))write!(
824                    f,
825                    "DROP CONSTRAINT {}{}",
826                    if *if_exists { "IF EXISTS " } else { "" },
827                    name
828                )?;
829                if let Some(drop_behavior) = drop_behavior {
830                    f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {drop_behavior}")?;
831                }
832                Ok(())
833            }
834            AlterTableOperation::DropPrimaryKey { drop_behavior } => {
835                f.write_fmt(format_args!("DROP PRIMARY KEY"))write!(f, "DROP PRIMARY KEY")?;
836                if let Some(drop_behavior) = drop_behavior {
837                    f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {drop_behavior}")?;
838                }
839                Ok(())
840            }
841            AlterTableOperation::DropForeignKey {
842                name,
843                drop_behavior,
844            } => {
845                f.write_fmt(format_args!("DROP FOREIGN KEY {0}", name))write!(f, "DROP FOREIGN KEY {name}")?;
846                if let Some(drop_behavior) = drop_behavior {
847                    f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {drop_behavior}")?;
848                }
849                Ok(())
850            }
851            AlterTableOperation::DropIndex { name } => f.write_fmt(format_args!("DROP INDEX {0}", name))write!(f, "DROP INDEX {name}"),
852            AlterTableOperation::DropColumn {
853                has_column_keyword,
854                column_names: column_name,
855                if_exists,
856                drop_behavior,
857            } => {
858                f.write_fmt(format_args!("DROP {0}{1}{2}",
        if *has_column_keyword { "COLUMN " } else { "" },
        if *if_exists { "IF EXISTS " } else { "" },
        display_comma_separated(column_name)))write!(
859                    f,
860                    "DROP {}{}{}",
861                    if *has_column_keyword { "COLUMN " } else { "" },
862                    if *if_exists { "IF EXISTS " } else { "" },
863                    display_comma_separated(column_name),
864                )?;
865                if let Some(drop_behavior) = drop_behavior {
866                    f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {drop_behavior}")?;
867                }
868                Ok(())
869            }
870            AlterTableOperation::AttachPartition { partition } => {
871                f.write_fmt(format_args!("ATTACH {0}", partition))write!(f, "ATTACH {partition}")
872            }
873            AlterTableOperation::DetachPartition { partition } => {
874                f.write_fmt(format_args!("DETACH {0}", partition))write!(f, "DETACH {partition}")
875            }
876            AlterTableOperation::EnableAlwaysRule { name } => {
877                f.write_fmt(format_args!("ENABLE ALWAYS RULE {0}", name))write!(f, "ENABLE ALWAYS RULE {name}")
878            }
879            AlterTableOperation::EnableAlwaysTrigger { name } => {
880                f.write_fmt(format_args!("ENABLE ALWAYS TRIGGER {0}", name))write!(f, "ENABLE ALWAYS TRIGGER {name}")
881            }
882            AlterTableOperation::EnableReplicaRule { name } => {
883                f.write_fmt(format_args!("ENABLE REPLICA RULE {0}", name))write!(f, "ENABLE REPLICA RULE {name}")
884            }
885            AlterTableOperation::EnableReplicaTrigger { name } => {
886                f.write_fmt(format_args!("ENABLE REPLICA TRIGGER {0}", name))write!(f, "ENABLE REPLICA TRIGGER {name}")
887            }
888            AlterTableOperation::EnableRowLevelSecurity => {
889                f.write_fmt(format_args!("ENABLE ROW LEVEL SECURITY"))write!(f, "ENABLE ROW LEVEL SECURITY")
890            }
891            AlterTableOperation::ForceRowLevelSecurity => {
892                f.write_fmt(format_args!("FORCE ROW LEVEL SECURITY"))write!(f, "FORCE ROW LEVEL SECURITY")
893            }
894            AlterTableOperation::NoForceRowLevelSecurity => {
895                f.write_fmt(format_args!("NO FORCE ROW LEVEL SECURITY"))write!(f, "NO FORCE ROW LEVEL SECURITY")
896            }
897            AlterTableOperation::EnableRule { name } => {
898                f.write_fmt(format_args!("ENABLE RULE {0}", name))write!(f, "ENABLE RULE {name}")
899            }
900            AlterTableOperation::EnableTrigger { name } => {
901                f.write_fmt(format_args!("ENABLE TRIGGER {0}", name))write!(f, "ENABLE TRIGGER {name}")
902            }
903            AlterTableOperation::RenamePartitions {
904                old_partitions,
905                new_partitions,
906            } => f.write_fmt(format_args!("PARTITION ({0}) RENAME TO PARTITION ({1})",
        display_comma_separated(old_partitions),
        display_comma_separated(new_partitions)))write!(
907                f,
908                "PARTITION ({}) RENAME TO PARTITION ({})",
909                display_comma_separated(old_partitions),
910                display_comma_separated(new_partitions)
911            ),
912            AlterTableOperation::RenameColumn {
913                old_column_name,
914                new_column_name,
915            } => f.write_fmt(format_args!("RENAME COLUMN {0} TO {1}", old_column_name,
        new_column_name))write!(f, "RENAME COLUMN {old_column_name} TO {new_column_name}"),
916            AlterTableOperation::RenameTable { table_name } => {
917                f.write_fmt(format_args!("RENAME {0}", table_name))write!(f, "RENAME {table_name}")
918            }
919            AlterTableOperation::ChangeColumn {
920                old_name,
921                new_name,
922                data_type,
923                options,
924                column_position,
925            } => {
926                f.write_fmt(format_args!("CHANGE COLUMN {0} {1} {2}", old_name, new_name,
        data_type))write!(f, "CHANGE COLUMN {old_name} {new_name} {data_type}")?;
927                if !options.is_empty() {
928                    f.write_fmt(format_args!(" {0}", display_separated(options, " ")))write!(f, " {}", display_separated(options, " "))?;
929                }
930                if let Some(position) = column_position {
931                    f.write_fmt(format_args!(" {0}", position))write!(f, " {position}")?;
932                }
933
934                Ok(())
935            }
936            AlterTableOperation::ModifyColumn {
937                col_name,
938                data_type,
939                options,
940                column_position,
941            } => {
942                f.write_fmt(format_args!("MODIFY COLUMN {0} {1}", col_name, data_type))write!(f, "MODIFY COLUMN {col_name} {data_type}")?;
943                if !options.is_empty() {
944                    f.write_fmt(format_args!(" {0}", display_separated(options, " ")))write!(f, " {}", display_separated(options, " "))?;
945                }
946                if let Some(position) = column_position {
947                    f.write_fmt(format_args!(" {0}", position))write!(f, " {position}")?;
948                }
949
950                Ok(())
951            }
952            AlterTableOperation::RenameConstraint { old_name, new_name } => {
953                f.write_fmt(format_args!("RENAME CONSTRAINT {0} TO {1}", old_name, new_name))write!(f, "RENAME CONSTRAINT {old_name} TO {new_name}")
954            }
955            AlterTableOperation::SwapWith { table_name } => {
956                f.write_fmt(format_args!("SWAP WITH {0}", table_name))write!(f, "SWAP WITH {table_name}")
957            }
958            AlterTableOperation::OwnerTo { new_owner } => {
959                f.write_fmt(format_args!("OWNER TO {0}", new_owner))write!(f, "OWNER TO {new_owner}")
960            }
961            AlterTableOperation::SetTblProperties { table_properties } => {
962                f.write_fmt(format_args!("SET TBLPROPERTIES({0})",
        display_comma_separated(table_properties)))write!(
963                    f,
964                    "SET TBLPROPERTIES({})",
965                    display_comma_separated(table_properties)
966                )
967            }
968            AlterTableOperation::FreezePartition {
969                partition,
970                with_name,
971            } => {
972                f.write_fmt(format_args!("FREEZE {0}", partition))write!(f, "FREEZE {partition}")?;
973                if let Some(name) = with_name {
974                    f.write_fmt(format_args!(" WITH NAME {0}", name))write!(f, " WITH NAME {name}")?;
975                }
976                Ok(())
977            }
978            AlterTableOperation::UnfreezePartition {
979                partition,
980                with_name,
981            } => {
982                f.write_fmt(format_args!("UNFREEZE {0}", partition))write!(f, "UNFREEZE {partition}")?;
983                if let Some(name) = with_name {
984                    f.write_fmt(format_args!(" WITH NAME {0}", name))write!(f, " WITH NAME {name}")?;
985                }
986                Ok(())
987            }
988            AlterTableOperation::ClusterBy { exprs } => {
989                f.write_fmt(format_args!("CLUSTER BY ({0})", display_comma_separated(exprs)))write!(f, "CLUSTER BY ({})", display_comma_separated(exprs))?;
990                Ok(())
991            }
992            AlterTableOperation::DropClusteringKey => {
993                f.write_fmt(format_args!("DROP CLUSTERING KEY"))write!(f, "DROP CLUSTERING KEY")?;
994                Ok(())
995            }
996            AlterTableOperation::SuspendRecluster => {
997                f.write_fmt(format_args!("SUSPEND RECLUSTER"))write!(f, "SUSPEND RECLUSTER")?;
998                Ok(())
999            }
1000            AlterTableOperation::ResumeRecluster => {
1001                f.write_fmt(format_args!("RESUME RECLUSTER"))write!(f, "RESUME RECLUSTER")?;
1002                Ok(())
1003            }
1004            AlterTableOperation::Refresh { subpath } => {
1005                f.write_fmt(format_args!("REFRESH"))write!(f, "REFRESH")?;
1006                if let Some(path) = subpath {
1007                    f.write_fmt(format_args!(" \'{0}\'", path))write!(f, " '{path}'")?;
1008                }
1009                Ok(())
1010            }
1011            AlterTableOperation::Suspend => {
1012                f.write_fmt(format_args!("SUSPEND"))write!(f, "SUSPEND")
1013            }
1014            AlterTableOperation::Resume => {
1015                f.write_fmt(format_args!("RESUME"))write!(f, "RESUME")
1016            }
1017            AlterTableOperation::AutoIncrement { equals, value } => {
1018                f.write_fmt(format_args!("AUTO_INCREMENT {0}{1}",
        if *equals { "= " } else { "" }, value))write!(
1019                    f,
1020                    "AUTO_INCREMENT {}{}",
1021                    if *equals { "= " } else { "" },
1022                    value
1023                )
1024            }
1025            AlterTableOperation::Lock { equals, lock } => {
1026                f.write_fmt(format_args!("LOCK {0}{1}", if *equals { "= " } else { "" },
        lock))write!(f, "LOCK {}{}", if *equals { "= " } else { "" }, lock)
1027            }
1028            AlterTableOperation::ReplicaIdentity { identity } => {
1029                f.write_fmt(format_args!("REPLICA IDENTITY {0}", identity))write!(f, "REPLICA IDENTITY {identity}")
1030            }
1031            AlterTableOperation::ValidateConstraint { name } => {
1032                f.write_fmt(format_args!("VALIDATE CONSTRAINT {0}", name))write!(f, "VALIDATE CONSTRAINT {name}")
1033            }
1034            AlterTableOperation::SetOptionsParens { options } => {
1035                f.write_fmt(format_args!("SET ({0})", display_comma_separated(options)))write!(f, "SET ({})", display_comma_separated(options))
1036            }
1037        }
1038    }
1039}
1040
1041impl fmt::Display for AlterIndexOperation {
1042    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1043        match self {
1044            AlterIndexOperation::RenameIndex { index_name } => {
1045                f.write_fmt(format_args!("RENAME TO {0}", index_name))write!(f, "RENAME TO {index_name}")
1046            }
1047        }
1048    }
1049}
1050
1051/// An `ALTER TYPE` statement (`Statement::AlterType`)
1052#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterType {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f, "AlterType",
            "name", &self.name, "operation", &&self.operation)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterType {
    #[inline]
    fn clone(&self) -> AlterType {
        AlterType {
            name: ::core::clone::Clone::clone(&self.name),
            operation: ::core::clone::Clone::clone(&self.operation),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterType {
    #[inline]
    fn eq(&self, other: &AlterType) -> bool {
        self.name == other.name && self.operation == other.operation
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterType {
    #[inline]
    fn partial_cmp(&self, other: &AlterType)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.operation,
                    &other.operation),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterType {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<AlterTypeOperation>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterType {
    #[inline]
    fn cmp(&self, other: &AlterType) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.operation, &other.operation),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterType {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.operation, state)
    }
}Hash)]
1053#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1054#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterType {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operation, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterType {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operation,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1055pub struct AlterType {
1056    /// Name of the type being altered (may be schema-qualified).
1057    pub name: ObjectName,
1058    /// The specific alteration operation to perform.
1059    pub operation: AlterTypeOperation,
1060}
1061
1062/// An [AlterType] operation
1063#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTypeOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterTypeOperation::Rename(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Rename",
                    &__self_0),
            AlterTypeOperation::AddValue(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "AddValue", &__self_0),
            AlterTypeOperation::RenameValue(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "RenameValue", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTypeOperation {
    #[inline]
    fn clone(&self) -> AlterTypeOperation {
        match self {
            AlterTypeOperation::Rename(__self_0) =>
                AlterTypeOperation::Rename(::core::clone::Clone::clone(__self_0)),
            AlterTypeOperation::AddValue(__self_0) =>
                AlterTypeOperation::AddValue(::core::clone::Clone::clone(__self_0)),
            AlterTypeOperation::RenameValue(__self_0) =>
                AlterTypeOperation::RenameValue(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTypeOperation {
    #[inline]
    fn eq(&self, other: &AlterTypeOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterTypeOperation::Rename(__self_0),
                    AlterTypeOperation::Rename(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (AlterTypeOperation::AddValue(__self_0),
                    AlterTypeOperation::AddValue(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (AlterTypeOperation::RenameValue(__self_0),
                    AlterTypeOperation::RenameValue(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTypeOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterTypeOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterTypeOperation::Rename(__self_0),
                AlterTypeOperation::Rename(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterTypeOperation::AddValue(__self_0),
                AlterTypeOperation::AddValue(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterTypeOperation::RenameValue(__self_0),
                AlterTypeOperation::RenameValue(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTypeOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<AlterTypeRename>;
        let _: ::core::cmp::AssertParamIsEq<AlterTypeAddValue>;
        let _: ::core::cmp::AssertParamIsEq<AlterTypeRenameValue>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTypeOperation {
    #[inline]
    fn cmp(&self, other: &AlterTypeOperation) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterTypeOperation::Rename(__self_0),
                        AlterTypeOperation::Rename(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTypeOperation::AddValue(__self_0),
                        AlterTypeOperation::AddValue(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTypeOperation::RenameValue(__self_0),
                        AlterTypeOperation::RenameValue(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTypeOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterTypeOperation::Rename(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTypeOperation::AddValue(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTypeOperation::RenameValue(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1064#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1065#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTypeOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Rename(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::AddValue(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::RenameValue(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTypeOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Rename(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::AddValue(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::RenameValue(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1066pub enum AlterTypeOperation {
1067    /// Rename the type.
1068    Rename(AlterTypeRename),
1069    /// Add a new value to the type (for enum-like types).
1070    AddValue(AlterTypeAddValue),
1071    /// Rename an existing value of the type.
1072    RenameValue(AlterTypeRenameValue),
1073}
1074
1075/// See [AlterTypeOperation::Rename]
1076#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTypeRename {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field1_finish(f,
            "AlterTypeRename", "new_name", &&self.new_name)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTypeRename {
    #[inline]
    fn clone(&self) -> AlterTypeRename {
        AlterTypeRename {
            new_name: ::core::clone::Clone::clone(&self.new_name),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTypeRename {
    #[inline]
    fn eq(&self, other: &AlterTypeRename) -> bool {
        self.new_name == other.new_name
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTypeRename {
    #[inline]
    fn partial_cmp(&self, other: &AlterTypeRename)
        -> ::core::option::Option<::core::cmp::Ordering> {
        ::core::cmp::PartialOrd::partial_cmp(&self.new_name, &other.new_name)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTypeRename {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTypeRename {
    #[inline]
    fn cmp(&self, other: &AlterTypeRename) -> ::core::cmp::Ordering {
        ::core::cmp::Ord::cmp(&self.new_name, &other.new_name)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTypeRename {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.new_name, state)
    }
}Hash)]
1077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1078#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTypeRename {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.new_name, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTypeRename {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.new_name,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1079pub struct AlterTypeRename {
1080    /// The new name for the type.
1081    pub new_name: Ident,
1082}
1083
1084/// See [AlterTypeOperation::AddValue]
1085#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTypeAddValue {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "AlterTypeAddValue", "if_not_exists", &self.if_not_exists,
            "value", &self.value, "position", &&self.position)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTypeAddValue {
    #[inline]
    fn clone(&self) -> AlterTypeAddValue {
        AlterTypeAddValue {
            if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
            value: ::core::clone::Clone::clone(&self.value),
            position: ::core::clone::Clone::clone(&self.position),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTypeAddValue {
    #[inline]
    fn eq(&self, other: &AlterTypeAddValue) -> bool {
        self.if_not_exists == other.if_not_exists && self.value == other.value
            && self.position == other.position
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTypeAddValue {
    #[inline]
    fn partial_cmp(&self, other: &AlterTypeAddValue)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
                &other.if_not_exists) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.value,
                        &other.value) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.position,
                            &other.position),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTypeAddValue {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _:
                ::core::cmp::AssertParamIsEq<Option<AlterTypeAddValuePosition>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTypeAddValue {
    #[inline]
    fn cmp(&self, other: &AlterTypeAddValue) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.if_not_exists, &other.if_not_exists)
            {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.value, &other.value) {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.position, &other.position),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTypeAddValue {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.if_not_exists, state);
        ::core::hash::Hash::hash(&self.value, state);
        ::core::hash::Hash::hash(&self.position, state)
    }
}Hash)]
1086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1087#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTypeAddValue {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.value, visitor)?;
                        sqlparser::ast::Visit::visit(&self.position, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTypeAddValue {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.if_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.value, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.position,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1088pub struct AlterTypeAddValue {
1089    /// If true, do not error when the value already exists (`IF NOT EXISTS`).
1090    pub if_not_exists: bool,
1091    /// The identifier for the new value to add.
1092    pub value: Ident,
1093    /// Optional relative position for the new value (`BEFORE` / `AFTER`).
1094    pub position: Option<AlterTypeAddValuePosition>,
1095}
1096
1097/// See [AlterTypeAddValue]
1098#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTypeAddValuePosition {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterTypeAddValuePosition::Before(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Before",
                    &__self_0),
            AlterTypeAddValuePosition::After(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "After",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTypeAddValuePosition {
    #[inline]
    fn clone(&self) -> AlterTypeAddValuePosition {
        match self {
            AlterTypeAddValuePosition::Before(__self_0) =>
                AlterTypeAddValuePosition::Before(::core::clone::Clone::clone(__self_0)),
            AlterTypeAddValuePosition::After(__self_0) =>
                AlterTypeAddValuePosition::After(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTypeAddValuePosition {
    #[inline]
    fn eq(&self, other: &AlterTypeAddValuePosition) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterTypeAddValuePosition::Before(__self_0),
                    AlterTypeAddValuePosition::Before(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (AlterTypeAddValuePosition::After(__self_0),
                    AlterTypeAddValuePosition::After(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTypeAddValuePosition {
    #[inline]
    fn partial_cmp(&self, other: &AlterTypeAddValuePosition)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterTypeAddValuePosition::Before(__self_0),
                AlterTypeAddValuePosition::Before(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterTypeAddValuePosition::After(__self_0),
                AlterTypeAddValuePosition::After(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTypeAddValuePosition {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTypeAddValuePosition {
    #[inline]
    fn cmp(&self, other: &AlterTypeAddValuePosition)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterTypeAddValuePosition::Before(__self_0),
                        AlterTypeAddValuePosition::Before(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterTypeAddValuePosition::After(__self_0),
                        AlterTypeAddValuePosition::After(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTypeAddValuePosition {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterTypeAddValuePosition::Before(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterTypeAddValuePosition::After(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1100#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTypeAddValuePosition {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Before(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::After(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTypeAddValuePosition {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Before(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::After(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1101pub enum AlterTypeAddValuePosition {
1102    /// Place the new value before the given neighbor value.
1103    Before(Ident),
1104    /// Place the new value after the given neighbor value.
1105    After(Ident),
1106}
1107
1108/// See [AlterTypeOperation::RenameValue]
1109#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTypeRenameValue {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "AlterTypeRenameValue", "from", &self.from, "to", &&self.to)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTypeRenameValue {
    #[inline]
    fn clone(&self) -> AlterTypeRenameValue {
        AlterTypeRenameValue {
            from: ::core::clone::Clone::clone(&self.from),
            to: ::core::clone::Clone::clone(&self.to),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTypeRenameValue {
    #[inline]
    fn eq(&self, other: &AlterTypeRenameValue) -> bool {
        self.from == other.from && self.to == other.to
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTypeRenameValue {
    #[inline]
    fn partial_cmp(&self, other: &AlterTypeRenameValue)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.from, &other.from) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.to, &other.to),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTypeRenameValue {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTypeRenameValue {
    #[inline]
    fn cmp(&self, other: &AlterTypeRenameValue) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.from, &other.from) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.to, &other.to),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTypeRenameValue {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.from, state);
        ::core::hash::Hash::hash(&self.to, state)
    }
}Hash)]
1110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1111#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTypeRenameValue {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.from, visitor)?;
                        sqlparser::ast::Visit::visit(&self.to, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTypeRenameValue {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.from, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.to, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1112pub struct AlterTypeRenameValue {
1113    /// Existing value identifier to rename.
1114    pub from: Ident,
1115    /// New identifier for the value.
1116    pub to: Ident,
1117}
1118
1119impl fmt::Display for AlterTypeOperation {
1120    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1121        match self {
1122            Self::Rename(AlterTypeRename { new_name }) => {
1123                f.write_fmt(format_args!("RENAME TO {0}", new_name))write!(f, "RENAME TO {new_name}")
1124            }
1125            Self::AddValue(AlterTypeAddValue {
1126                if_not_exists,
1127                value,
1128                position,
1129            }) => {
1130                f.write_fmt(format_args!("ADD VALUE"))write!(f, "ADD VALUE")?;
1131                if *if_not_exists {
1132                    f.write_fmt(format_args!(" IF NOT EXISTS"))write!(f, " IF NOT EXISTS")?;
1133                }
1134                f.write_fmt(format_args!(" {0}", value))write!(f, " {value}")?;
1135                match position {
1136                    Some(AlterTypeAddValuePosition::Before(neighbor_value)) => {
1137                        f.write_fmt(format_args!(" BEFORE {0}", neighbor_value))write!(f, " BEFORE {neighbor_value}")?;
1138                    }
1139                    Some(AlterTypeAddValuePosition::After(neighbor_value)) => {
1140                        f.write_fmt(format_args!(" AFTER {0}", neighbor_value))write!(f, " AFTER {neighbor_value}")?;
1141                    }
1142                    None => {}
1143                };
1144                Ok(())
1145            }
1146            Self::RenameValue(AlterTypeRenameValue { from, to }) => {
1147                f.write_fmt(format_args!("RENAME VALUE {0} TO {1}", from, to))write!(f, "RENAME VALUE {from} TO {to}")
1148            }
1149        }
1150    }
1151}
1152
1153/// `ALTER OPERATOR` statement
1154/// See <https://www.postgresql.org/docs/current/sql-alteroperator.html>
1155#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterOperator {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "AlterOperator",
            "name", &self.name, "left_type", &self.left_type, "right_type",
            &self.right_type, "operation", &&self.operation)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterOperator {
    #[inline]
    fn clone(&self) -> AlterOperator {
        AlterOperator {
            name: ::core::clone::Clone::clone(&self.name),
            left_type: ::core::clone::Clone::clone(&self.left_type),
            right_type: ::core::clone::Clone::clone(&self.right_type),
            operation: ::core::clone::Clone::clone(&self.operation),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterOperator {
    #[inline]
    fn eq(&self, other: &AlterOperator) -> bool {
        self.name == other.name && self.left_type == other.left_type &&
                self.right_type == other.right_type &&
            self.operation == other.operation
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterOperator {
    #[inline]
    fn partial_cmp(&self, other: &AlterOperator)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.left_type,
                        &other.left_type) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.right_type,
                                &other.right_type) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                ::core::cmp::PartialOrd::partial_cmp(&self.operation,
                                    &other.operation),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterOperator {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<AlterOperatorOperation>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterOperator {
    #[inline]
    fn cmp(&self, other: &AlterOperator) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.left_type, &other.left_type)
                    {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.right_type,
                                &other.right_type) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(&self.operation, &other.operation),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterOperator {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.left_type, state);
        ::core::hash::Hash::hash(&self.right_type, state);
        ::core::hash::Hash::hash(&self.operation, state)
    }
}Hash)]
1156#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1157#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterOperator {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.left_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.right_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operation, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterOperator {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.left_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.right_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operation,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1158pub struct AlterOperator {
1159    /// Operator name (can be schema-qualified)
1160    pub name: ObjectName,
1161    /// Left operand type (`None` if no left operand)
1162    pub left_type: Option<DataType>,
1163    /// Right operand type
1164    pub right_type: DataType,
1165    /// The operation to perform
1166    pub operation: AlterOperatorOperation,
1167}
1168
1169/// An [AlterOperator] operation
1170#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterOperatorOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterOperatorOperation::OwnerTo(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "OwnerTo", &__self_0),
            AlterOperatorOperation::SetSchema { schema_name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetSchema", "schema_name", &__self_0),
            AlterOperatorOperation::Set { options: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Set",
                    "options", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterOperatorOperation {
    #[inline]
    fn clone(&self) -> AlterOperatorOperation {
        match self {
            AlterOperatorOperation::OwnerTo(__self_0) =>
                AlterOperatorOperation::OwnerTo(::core::clone::Clone::clone(__self_0)),
            AlterOperatorOperation::SetSchema { schema_name: __self_0 } =>
                AlterOperatorOperation::SetSchema {
                    schema_name: ::core::clone::Clone::clone(__self_0),
                },
            AlterOperatorOperation::Set { options: __self_0 } =>
                AlterOperatorOperation::Set {
                    options: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterOperatorOperation {
    #[inline]
    fn eq(&self, other: &AlterOperatorOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterOperatorOperation::OwnerTo(__self_0),
                    AlterOperatorOperation::OwnerTo(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (AlterOperatorOperation::SetSchema { schema_name: __self_0 },
                    AlterOperatorOperation::SetSchema { schema_name: __arg1_0 })
                    => __self_0 == __arg1_0,
                (AlterOperatorOperation::Set { options: __self_0 },
                    AlterOperatorOperation::Set { options: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterOperatorOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterOperatorOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterOperatorOperation::OwnerTo(__self_0),
                AlterOperatorOperation::OwnerTo(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorOperation::SetSchema { schema_name: __self_0 },
                AlterOperatorOperation::SetSchema { schema_name: __arg1_0 })
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorOperation::Set { options: __self_0 },
                AlterOperatorOperation::Set { options: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterOperatorOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Owner>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Vec<OperatorOption>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterOperatorOperation {
    #[inline]
    fn cmp(&self, other: &AlterOperatorOperation) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterOperatorOperation::OwnerTo(__self_0),
                        AlterOperatorOperation::OwnerTo(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorOperation::SetSchema { schema_name: __self_0
                        }, AlterOperatorOperation::SetSchema { schema_name: __arg1_0
                        }) => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorOperation::Set { options: __self_0 },
                        AlterOperatorOperation::Set { options: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterOperatorOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterOperatorOperation::OwnerTo(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorOperation::SetSchema { schema_name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorOperation::Set { options: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1171#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1172#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterOperatorOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::OwnerTo(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::SetSchema { schema_name } => {
                                sqlparser::ast::Visit::visit(schema_name, visitor)?;
                            }
                            Self::Set { options } => {
                                sqlparser::ast::Visit::visit(options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterOperatorOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::OwnerTo(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::SetSchema { schema_name } => {
                                sqlparser::ast::VisitMut::visit(schema_name, visitor)?;
                            }
                            Self::Set { options } => {
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1173pub enum AlterOperatorOperation {
1174    /// `OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }`
1175    OwnerTo(Owner),
1176    /// `SET SCHEMA new_schema`
1177    /// Set the operator's schema name.
1178    SetSchema {
1179        /// New schema name for the operator
1180        schema_name: ObjectName,
1181    },
1182    /// `SET ( options )`
1183    Set {
1184        /// List of operator options to set
1185        options: Vec<OperatorOption>,
1186    },
1187}
1188
1189/// Option for `ALTER OPERATOR SET` operation
1190#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OperatorOption {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            OperatorOption::Restrict(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Restrict", &__self_0),
            OperatorOption::Join(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Join",
                    &__self_0),
            OperatorOption::Commutator(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Commutator", &__self_0),
            OperatorOption::Negator(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Negator", &__self_0),
            OperatorOption::Hashes =>
                ::core::fmt::Formatter::write_str(f, "Hashes"),
            OperatorOption::Merges =>
                ::core::fmt::Formatter::write_str(f, "Merges"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OperatorOption {
    #[inline]
    fn clone(&self) -> OperatorOption {
        match self {
            OperatorOption::Restrict(__self_0) =>
                OperatorOption::Restrict(::core::clone::Clone::clone(__self_0)),
            OperatorOption::Join(__self_0) =>
                OperatorOption::Join(::core::clone::Clone::clone(__self_0)),
            OperatorOption::Commutator(__self_0) =>
                OperatorOption::Commutator(::core::clone::Clone::clone(__self_0)),
            OperatorOption::Negator(__self_0) =>
                OperatorOption::Negator(::core::clone::Clone::clone(__self_0)),
            OperatorOption::Hashes => OperatorOption::Hashes,
            OperatorOption::Merges => OperatorOption::Merges,
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OperatorOption {
    #[inline]
    fn eq(&self, other: &OperatorOption) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (OperatorOption::Restrict(__self_0),
                    OperatorOption::Restrict(__arg1_0)) => __self_0 == __arg1_0,
                (OperatorOption::Join(__self_0),
                    OperatorOption::Join(__arg1_0)) => __self_0 == __arg1_0,
                (OperatorOption::Commutator(__self_0),
                    OperatorOption::Commutator(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (OperatorOption::Negator(__self_0),
                    OperatorOption::Negator(__arg1_0)) => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OperatorOption {
    #[inline]
    fn partial_cmp(&self, other: &OperatorOption)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (OperatorOption::Restrict(__self_0),
                OperatorOption::Restrict(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (OperatorOption::Join(__self_0), OperatorOption::Join(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (OperatorOption::Commutator(__self_0),
                OperatorOption::Commutator(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (OperatorOption::Negator(__self_0),
                OperatorOption::Negator(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OperatorOption {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OperatorOption {
    #[inline]
    fn cmp(&self, other: &OperatorOption) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (OperatorOption::Restrict(__self_0),
                        OperatorOption::Restrict(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (OperatorOption::Join(__self_0),
                        OperatorOption::Join(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (OperatorOption::Commutator(__self_0),
                        OperatorOption::Commutator(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (OperatorOption::Negator(__self_0),
                        OperatorOption::Negator(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OperatorOption {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            OperatorOption::Restrict(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            OperatorOption::Join(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            OperatorOption::Commutator(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            OperatorOption::Negator(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
1191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1192#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OperatorOption {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Restrict(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Join(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Commutator(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Negator(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Hashes => {}
                            Self::Merges => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for OperatorOption {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Restrict(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Join(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Commutator(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Negator(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Hashes => {}
                            Self::Merges => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1193pub enum OperatorOption {
1194    /// `RESTRICT = { res_proc | NONE }`
1195    Restrict(Option<ObjectName>),
1196    /// `JOIN = { join_proc | NONE }`
1197    Join(Option<ObjectName>),
1198    /// `COMMUTATOR = com_op`
1199    Commutator(ObjectName),
1200    /// `NEGATOR = neg_op`
1201    Negator(ObjectName),
1202    /// `HASHES`
1203    Hashes,
1204    /// `MERGES`
1205    Merges,
1206}
1207
1208impl fmt::Display for AlterOperator {
1209    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1210        f.write_fmt(format_args!("ALTER OPERATOR {0} (", self.name))write!(f, "ALTER OPERATOR {} (", self.name)?;
1211        if let Some(left_type) = &self.left_type {
1212            f.write_fmt(format_args!("{0}", left_type))write!(f, "{}", left_type)?;
1213        } else {
1214            f.write_fmt(format_args!("NONE"))write!(f, "NONE")?;
1215        }
1216        f.write_fmt(format_args!(", {0}) {1}", self.right_type, self.operation))write!(f, ", {}) {}", self.right_type, self.operation)
1217    }
1218}
1219
1220impl fmt::Display for AlterOperatorOperation {
1221    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1222        match self {
1223            Self::OwnerTo(owner) => f.write_fmt(format_args!("OWNER TO {0}", owner))write!(f, "OWNER TO {}", owner),
1224            Self::SetSchema { schema_name } => f.write_fmt(format_args!("SET SCHEMA {0}", schema_name))write!(f, "SET SCHEMA {}", schema_name),
1225            Self::Set { options } => {
1226                f.write_fmt(format_args!("SET ("))write!(f, "SET (")?;
1227                for (i, option) in options.iter().enumerate() {
1228                    if i > 0 {
1229                        f.write_fmt(format_args!(", "))write!(f, ", ")?;
1230                    }
1231                    f.write_fmt(format_args!("{0}", option))write!(f, "{}", option)?;
1232                }
1233                f.write_fmt(format_args!(")"))write!(f, ")")
1234            }
1235        }
1236    }
1237}
1238
1239impl fmt::Display for OperatorOption {
1240    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1241        match self {
1242            Self::Restrict(Some(proc_name)) => f.write_fmt(format_args!("RESTRICT = {0}", proc_name))write!(f, "RESTRICT = {}", proc_name),
1243            Self::Restrict(None) => f.write_fmt(format_args!("RESTRICT = NONE"))write!(f, "RESTRICT = NONE"),
1244            Self::Join(Some(proc_name)) => f.write_fmt(format_args!("JOIN = {0}", proc_name))write!(f, "JOIN = {}", proc_name),
1245            Self::Join(None) => f.write_fmt(format_args!("JOIN = NONE"))write!(f, "JOIN = NONE"),
1246            Self::Commutator(op_name) => f.write_fmt(format_args!("COMMUTATOR = {0}", op_name))write!(f, "COMMUTATOR = {}", op_name),
1247            Self::Negator(op_name) => f.write_fmt(format_args!("NEGATOR = {0}", op_name))write!(f, "NEGATOR = {}", op_name),
1248            Self::Hashes => f.write_fmt(format_args!("HASHES"))write!(f, "HASHES"),
1249            Self::Merges => f.write_fmt(format_args!("MERGES"))write!(f, "MERGES"),
1250        }
1251    }
1252}
1253
1254/// An `ALTER COLUMN` (`Statement::AlterTable`) operation
1255#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterColumnOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterColumnOperation::SetNotNull =>
                ::core::fmt::Formatter::write_str(f, "SetNotNull"),
            AlterColumnOperation::DropNotNull =>
                ::core::fmt::Formatter::write_str(f, "DropNotNull"),
            AlterColumnOperation::SetDefault { value: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetDefault", "value", &__self_0),
            AlterColumnOperation::DropDefault =>
                ::core::fmt::Formatter::write_str(f, "DropDefault"),
            AlterColumnOperation::SetDataType {
                data_type: __self_0, using: __self_1, had_set: __self_2 } =>
                ::core::fmt::Formatter::debug_struct_field3_finish(f,
                    "SetDataType", "data_type", __self_0, "using", __self_1,
                    "had_set", &__self_2),
            AlterColumnOperation::AddGenerated {
                generated_as: __self_0, sequence_options: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "AddGenerated", "generated_as", __self_0,
                    "sequence_options", &__self_1),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterColumnOperation {
    #[inline]
    fn clone(&self) -> AlterColumnOperation {
        match self {
            AlterColumnOperation::SetNotNull =>
                AlterColumnOperation::SetNotNull,
            AlterColumnOperation::DropNotNull =>
                AlterColumnOperation::DropNotNull,
            AlterColumnOperation::SetDefault { value: __self_0 } =>
                AlterColumnOperation::SetDefault {
                    value: ::core::clone::Clone::clone(__self_0),
                },
            AlterColumnOperation::DropDefault =>
                AlterColumnOperation::DropDefault,
            AlterColumnOperation::SetDataType {
                data_type: __self_0, using: __self_1, had_set: __self_2 } =>
                AlterColumnOperation::SetDataType {
                    data_type: ::core::clone::Clone::clone(__self_0),
                    using: ::core::clone::Clone::clone(__self_1),
                    had_set: ::core::clone::Clone::clone(__self_2),
                },
            AlterColumnOperation::AddGenerated {
                generated_as: __self_0, sequence_options: __self_1 } =>
                AlterColumnOperation::AddGenerated {
                    generated_as: ::core::clone::Clone::clone(__self_0),
                    sequence_options: ::core::clone::Clone::clone(__self_1),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterColumnOperation {
    #[inline]
    fn eq(&self, other: &AlterColumnOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterColumnOperation::SetDefault { value: __self_0 },
                    AlterColumnOperation::SetDefault { value: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterColumnOperation::SetDataType {
                    data_type: __self_0, using: __self_1, had_set: __self_2 },
                    AlterColumnOperation::SetDataType {
                    data_type: __arg1_0, using: __arg1_1, had_set: __arg1_2 })
                    =>
                    __self_2 == __arg1_2 && __self_0 == __arg1_0 &&
                        __self_1 == __arg1_1,
                (AlterColumnOperation::AddGenerated {
                    generated_as: __self_0, sequence_options: __self_1 },
                    AlterColumnOperation::AddGenerated {
                    generated_as: __arg1_0, sequence_options: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterColumnOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterColumnOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterColumnOperation::SetDefault { value: __self_0 },
                AlterColumnOperation::SetDefault { value: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterColumnOperation::SetDataType {
                data_type: __self_0, using: __self_1, had_set: __self_2 },
                AlterColumnOperation::SetDataType {
                data_type: __arg1_0, using: __arg1_1, had_set: __arg1_2 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                __arg1_1) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                => ::core::cmp::PartialOrd::partial_cmp(__self_2, __arg1_2),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            (AlterColumnOperation::AddGenerated {
                generated_as: __self_0, sequence_options: __self_1 },
                AlterColumnOperation::AddGenerated {
                generated_as: __arg1_0, sequence_options: __arg1_1 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                    cmp => cmp,
                },
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterColumnOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Expr>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Option<GeneratedAs>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<SequenceOptions>>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterColumnOperation {
    #[inline]
    fn cmp(&self, other: &AlterColumnOperation) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterColumnOperation::SetDefault { value: __self_0 },
                        AlterColumnOperation::SetDefault { value: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterColumnOperation::SetDataType {
                        data_type: __self_0, using: __self_1, had_set: __self_2 },
                        AlterColumnOperation::SetDataType {
                        data_type: __arg1_0, using: __arg1_1, had_set: __arg1_2 })
                        =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(__self_2, __arg1_2),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (AlterColumnOperation::AddGenerated {
                        generated_as: __self_0, sequence_options: __self_1 },
                        AlterColumnOperation::AddGenerated {
                        generated_as: __arg1_0, sequence_options: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterColumnOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterColumnOperation::SetDefault { value: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterColumnOperation::SetDataType {
                data_type: __self_0, using: __self_1, had_set: __self_2 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state)
            }
            AlterColumnOperation::AddGenerated {
                generated_as: __self_0, sequence_options: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            _ => {}
        }
    }
}Hash)]
1256#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1257#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterColumnOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::SetNotNull => {}
                            Self::DropNotNull => {}
                            Self::SetDefault { value } => {
                                sqlparser::ast::Visit::visit(value, visitor)?;
                            }
                            Self::DropDefault => {}
                            Self::SetDataType { data_type, using, had_set } => {
                                sqlparser::ast::Visit::visit(data_type, visitor)?;
                                sqlparser::ast::Visit::visit(using, visitor)?;
                                sqlparser::ast::Visit::visit(had_set, visitor)?;
                            }
                            Self::AddGenerated { generated_as, sequence_options } => {
                                sqlparser::ast::Visit::visit(generated_as, visitor)?;
                                sqlparser::ast::Visit::visit(sequence_options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterColumnOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::SetNotNull => {}
                            Self::DropNotNull => {}
                            Self::SetDefault { value } => {
                                sqlparser::ast::VisitMut::visit(value, visitor)?;
                            }
                            Self::DropDefault => {}
                            Self::SetDataType { data_type, using, had_set } => {
                                sqlparser::ast::VisitMut::visit(data_type, visitor)?;
                                sqlparser::ast::VisitMut::visit(using, visitor)?;
                                sqlparser::ast::VisitMut::visit(had_set, visitor)?;
                            }
                            Self::AddGenerated { generated_as, sequence_options } => {
                                sqlparser::ast::VisitMut::visit(generated_as, visitor)?;
                                sqlparser::ast::VisitMut::visit(sequence_options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1258pub enum AlterColumnOperation {
1259    /// `SET NOT NULL`
1260    SetNotNull,
1261    /// `DROP NOT NULL`
1262    DropNotNull,
1263    /// `SET DEFAULT <expr>`
1264    /// Set the column default value.
1265    SetDefault {
1266        /// Expression representing the new default value.
1267        value: Expr,
1268    },
1269    /// `DROP DEFAULT`
1270    DropDefault,
1271    /// `[SET DATA] TYPE <data_type> [USING <expr>]`
1272    SetDataType {
1273        /// Target data type for the column.
1274        data_type: DataType,
1275        /// PostgreSQL-specific `USING <expr>` expression for conversion.
1276        using: Option<Expr>,
1277        /// Set to true if the statement includes the `SET DATA TYPE` keywords.
1278        had_set: bool,
1279    },
1280
1281    /// `ADD GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]`
1282    ///
1283    /// Note: this is a PostgreSQL-specific operation.
1284    AddGenerated {
1285        /// Optional `GENERATED AS` specifier (e.g. `ALWAYS` or `BY DEFAULT`).
1286        generated_as: Option<GeneratedAs>,
1287        /// Optional sequence options for identity generation.
1288        sequence_options: Option<Vec<SequenceOptions>>,
1289    },
1290}
1291
1292impl fmt::Display for AlterColumnOperation {
1293    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1294        match self {
1295            AlterColumnOperation::SetNotNull => f.write_fmt(format_args!("SET NOT NULL"))write!(f, "SET NOT NULL",),
1296            AlterColumnOperation::DropNotNull => f.write_fmt(format_args!("DROP NOT NULL"))write!(f, "DROP NOT NULL",),
1297            AlterColumnOperation::SetDefault { value } => {
1298                f.write_fmt(format_args!("SET DEFAULT {0}", value))write!(f, "SET DEFAULT {value}")
1299            }
1300            AlterColumnOperation::DropDefault => {
1301                f.write_fmt(format_args!("DROP DEFAULT"))write!(f, "DROP DEFAULT")
1302            }
1303            AlterColumnOperation::SetDataType {
1304                data_type,
1305                using,
1306                had_set,
1307            } => {
1308                if *had_set {
1309                    f.write_fmt(format_args!("SET DATA "))write!(f, "SET DATA ")?;
1310                }
1311                f.write_fmt(format_args!("TYPE {0}", data_type))write!(f, "TYPE {data_type}")?;
1312                if let Some(expr) = using {
1313                    f.write_fmt(format_args!(" USING {0}", expr))write!(f, " USING {expr}")?;
1314                }
1315                Ok(())
1316            }
1317            AlterColumnOperation::AddGenerated {
1318                generated_as,
1319                sequence_options,
1320            } => {
1321                let generated_as = match generated_as {
1322                    Some(GeneratedAs::Always) => " ALWAYS",
1323                    Some(GeneratedAs::ByDefault) => " BY DEFAULT",
1324                    _ => "",
1325                };
1326
1327                f.write_fmt(format_args!("ADD GENERATED{0} AS IDENTITY", generated_as))write!(f, "ADD GENERATED{generated_as} AS IDENTITY",)?;
1328                if let Some(options) = sequence_options {
1329                    f.write_fmt(format_args!(" ("))write!(f, " (")?;
1330
1331                    for sequence_option in options {
1332                        f.write_fmt(format_args!("{0}", sequence_option))write!(f, "{sequence_option}")?;
1333                    }
1334
1335                    f.write_fmt(format_args!(" )"))write!(f, " )")?;
1336                }
1337                Ok(())
1338            }
1339        }
1340    }
1341}
1342
1343/// Representation whether a definition can can contains the KEY or INDEX keywords with the same
1344/// meaning.
1345///
1346/// This enum initially is directed to `FULLTEXT`,`SPATIAL`, and `UNIQUE` indexes on create table
1347/// statements of `MySQL` [(1)].
1348///
1349/// [1]: https://dev.mysql.com/doc/refman/8.0/en/create-table.html
1350#[derive(#[automatically_derived]
impl ::core::fmt::Debug for KeyOrIndexDisplay {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                KeyOrIndexDisplay::None => "None",
                KeyOrIndexDisplay::Key => "Key",
                KeyOrIndexDisplay::Index => "Index",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for KeyOrIndexDisplay { }Copy, #[automatically_derived]
impl ::core::clone::Clone for KeyOrIndexDisplay {
    #[inline]
    fn clone(&self) -> KeyOrIndexDisplay { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for KeyOrIndexDisplay {
    #[inline]
    fn eq(&self, other: &KeyOrIndexDisplay) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for KeyOrIndexDisplay {
    #[inline]
    fn partial_cmp(&self, other: &KeyOrIndexDisplay)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for KeyOrIndexDisplay {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for KeyOrIndexDisplay {
    #[inline]
    fn cmp(&self, other: &KeyOrIndexDisplay) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for KeyOrIndexDisplay {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
1351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1352#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for KeyOrIndexDisplay {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::None => {}
                            Self::Key => {}
                            Self::Index => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for KeyOrIndexDisplay {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::None => {}
                            Self::Key => {}
                            Self::Index => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1353pub enum KeyOrIndexDisplay {
1354    /// Nothing to display
1355    None,
1356    /// Display the KEY keyword
1357    Key,
1358    /// Display the INDEX keyword
1359    Index,
1360}
1361
1362impl KeyOrIndexDisplay {
1363    /// Check if this is the `None` variant.
1364    pub fn is_none(self) -> bool {
1365        #[allow(non_exhaustive_omitted_patterns)] match self {
    Self::None => true,
    _ => false,
}matches!(self, Self::None)
1366    }
1367}
1368
1369impl fmt::Display for KeyOrIndexDisplay {
1370    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1371        let left_space = #[allow(non_exhaustive_omitted_patterns)] match f.align() {
    Some(fmt::Alignment::Right) => true,
    _ => false,
}matches!(f.align(), Some(fmt::Alignment::Right));
1372
1373        if left_space && !self.is_none() {
1374            f.write_char(' ')?
1375        }
1376
1377        match self {
1378            KeyOrIndexDisplay::None => {
1379                f.write_fmt(format_args!(""))write!(f, "")
1380            }
1381            KeyOrIndexDisplay::Key => {
1382                f.write_fmt(format_args!("KEY"))write!(f, "KEY")
1383            }
1384            KeyOrIndexDisplay::Index => {
1385                f.write_fmt(format_args!("INDEX"))write!(f, "INDEX")
1386            }
1387        }
1388    }
1389}
1390
1391/// Indexing method used by that index.
1392///
1393/// This structure isn't present on ANSI, but is found at least in [`MySQL` CREATE TABLE][1],
1394/// [`MySQL` CREATE INDEX][2], and [Postgresql CREATE INDEX][3] statements.
1395///
1396/// [1]: https://dev.mysql.com/doc/refman/8.0/en/create-table.html
1397/// [2]: https://dev.mysql.com/doc/refman/8.0/en/create-index.html
1398/// [3]: https://www.postgresql.org/docs/14/sql-createindex.html
1399#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IndexType {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            IndexType::BTree => ::core::fmt::Formatter::write_str(f, "BTree"),
            IndexType::Hash => ::core::fmt::Formatter::write_str(f, "Hash"),
            IndexType::GIN => ::core::fmt::Formatter::write_str(f, "GIN"),
            IndexType::GiST => ::core::fmt::Formatter::write_str(f, "GiST"),
            IndexType::SPGiST =>
                ::core::fmt::Formatter::write_str(f, "SPGiST"),
            IndexType::BRIN => ::core::fmt::Formatter::write_str(f, "BRIN"),
            IndexType::Bloom => ::core::fmt::Formatter::write_str(f, "Bloom"),
            IndexType::Custom(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Custom",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IndexType {
    #[inline]
    fn clone(&self) -> IndexType {
        match self {
            IndexType::BTree => IndexType::BTree,
            IndexType::Hash => IndexType::Hash,
            IndexType::GIN => IndexType::GIN,
            IndexType::GiST => IndexType::GiST,
            IndexType::SPGiST => IndexType::SPGiST,
            IndexType::BRIN => IndexType::BRIN,
            IndexType::Bloom => IndexType::Bloom,
            IndexType::Custom(__self_0) =>
                IndexType::Custom(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IndexType {
    #[inline]
    fn eq(&self, other: &IndexType) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (IndexType::Custom(__self_0), IndexType::Custom(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IndexType {
    #[inline]
    fn partial_cmp(&self, other: &IndexType)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (IndexType::Custom(__self_0), IndexType::Custom(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IndexType {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IndexType {
    #[inline]
    fn cmp(&self, other: &IndexType) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (IndexType::Custom(__self_0), IndexType::Custom(__arg1_0))
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IndexType {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            IndexType::Custom(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
1400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1401#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IndexType {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::BTree => {}
                            Self::Hash => {}
                            Self::GIN => {}
                            Self::GiST => {}
                            Self::SPGiST => {}
                            Self::BRIN => {}
                            Self::Bloom => {}
                            Self::Custom(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IndexType {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::BTree => {}
                            Self::Hash => {}
                            Self::GIN => {}
                            Self::GiST => {}
                            Self::SPGiST => {}
                            Self::BRIN => {}
                            Self::Bloom => {}
                            Self::Custom(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1402pub enum IndexType {
1403    /// B-Tree index (commonly default for many databases).
1404    BTree,
1405    /// Hash index.
1406    Hash,
1407    /// Generalized Inverted Index (GIN).
1408    GIN,
1409    /// Generalized Search Tree (GiST) index.
1410    GiST,
1411    /// Space-partitioned GiST (SPGiST) index.
1412    SPGiST,
1413    /// Block Range Index (BRIN).
1414    BRIN,
1415    /// Bloom filter based index.
1416    Bloom,
1417    /// Users may define their own index types, which would
1418    /// not be covered by the above variants.
1419    Custom(Ident),
1420}
1421
1422impl fmt::Display for IndexType {
1423    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1424        match self {
1425            Self::BTree => f.write_fmt(format_args!("BTREE"))write!(f, "BTREE"),
1426            Self::Hash => f.write_fmt(format_args!("HASH"))write!(f, "HASH"),
1427            Self::GIN => f.write_fmt(format_args!("GIN"))write!(f, "GIN"),
1428            Self::GiST => f.write_fmt(format_args!("GIST"))write!(f, "GIST"),
1429            Self::SPGiST => f.write_fmt(format_args!("SPGIST"))write!(f, "SPGIST"),
1430            Self::BRIN => f.write_fmt(format_args!("BRIN"))write!(f, "BRIN"),
1431            Self::Bloom => f.write_fmt(format_args!("BLOOM"))write!(f, "BLOOM"),
1432            Self::Custom(name) => f.write_fmt(format_args!("{0}", name))write!(f, "{name}"),
1433        }
1434    }
1435}
1436
1437/// MySQL index option, used in [`CREATE TABLE`], [`CREATE INDEX`], and [`ALTER TABLE`].
1438///
1439/// [`CREATE TABLE`]: https://dev.mysql.com/doc/refman/8.4/en/create-table.html
1440/// [`CREATE INDEX`]: https://dev.mysql.com/doc/refman/8.4/en/create-index.html
1441/// [`ALTER TABLE`]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
1442#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IndexOption {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            IndexOption::Using(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Using",
                    &__self_0),
            IndexOption::Comment(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Comment", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IndexOption {
    #[inline]
    fn clone(&self) -> IndexOption {
        match self {
            IndexOption::Using(__self_0) =>
                IndexOption::Using(::core::clone::Clone::clone(__self_0)),
            IndexOption::Comment(__self_0) =>
                IndexOption::Comment(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IndexOption {
    #[inline]
    fn eq(&self, other: &IndexOption) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (IndexOption::Using(__self_0), IndexOption::Using(__arg1_0))
                    => __self_0 == __arg1_0,
                (IndexOption::Comment(__self_0),
                    IndexOption::Comment(__arg1_0)) => __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IndexOption {
    #[inline]
    fn partial_cmp(&self, other: &IndexOption)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (IndexOption::Using(__self_0), IndexOption::Using(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (IndexOption::Comment(__self_0), IndexOption::Comment(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IndexOption {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<IndexType>;
        let _: ::core::cmp::AssertParamIsEq<String>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IndexOption {
    #[inline]
    fn cmp(&self, other: &IndexOption) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (IndexOption::Using(__self_0), IndexOption::Using(__arg1_0))
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (IndexOption::Comment(__self_0),
                        IndexOption::Comment(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IndexOption {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            IndexOption::Using(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            IndexOption::Comment(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1443#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1444#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IndexOption {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Using(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Comment(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IndexOption {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Using(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Comment(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1445pub enum IndexOption {
1446    /// `USING { BTREE | HASH }`: Index type to use for the index.
1447    ///
1448    /// Note that we permissively parse non-MySQL index types, like `GIN`.
1449    Using(IndexType),
1450    /// `COMMENT 'string'`: Specifies a comment for the index.
1451    Comment(String),
1452}
1453
1454impl fmt::Display for IndexOption {
1455    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1456        match self {
1457            Self::Using(index_type) => f.write_fmt(format_args!("USING {0}", index_type))write!(f, "USING {index_type}"),
1458            Self::Comment(s) => f.write_fmt(format_args!("COMMENT \'{0}\'", s))write!(f, "COMMENT '{s}'"),
1459        }
1460    }
1461}
1462
1463/// [PostgreSQL] unique index nulls handling option: `[ NULLS [ NOT ] DISTINCT ]`
1464///
1465/// [PostgreSQL]: https://www.postgresql.org/docs/17/sql-altertable.html
1466#[derive(#[automatically_derived]
impl ::core::fmt::Debug for NullsDistinctOption {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                NullsDistinctOption::None => "None",
                NullsDistinctOption::Distinct => "Distinct",
                NullsDistinctOption::NotDistinct => "NotDistinct",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for NullsDistinctOption {
    #[inline]
    fn clone(&self) -> NullsDistinctOption { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for NullsDistinctOption { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for NullsDistinctOption {
    #[inline]
    fn eq(&self, other: &NullsDistinctOption) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for NullsDistinctOption {
    #[inline]
    fn partial_cmp(&self, other: &NullsDistinctOption)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for NullsDistinctOption {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for NullsDistinctOption {
    #[inline]
    fn cmp(&self, other: &NullsDistinctOption) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for NullsDistinctOption {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
1467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1468#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for NullsDistinctOption {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::None => {}
                            Self::Distinct => {}
                            Self::NotDistinct => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for NullsDistinctOption {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::None => {}
                            Self::Distinct => {}
                            Self::NotDistinct => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1469pub enum NullsDistinctOption {
1470    /// Not specified
1471    None,
1472    /// NULLS DISTINCT
1473    Distinct,
1474    /// NULLS NOT DISTINCT
1475    NotDistinct,
1476}
1477
1478impl fmt::Display for NullsDistinctOption {
1479    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1480        match self {
1481            Self::None => Ok(()),
1482            Self::Distinct => f.write_fmt(format_args!(" NULLS DISTINCT"))write!(f, " NULLS DISTINCT"),
1483            Self::NotDistinct => f.write_fmt(format_args!(" NULLS NOT DISTINCT"))write!(f, " NULLS NOT DISTINCT"),
1484        }
1485    }
1486}
1487
1488#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ProcedureParam {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "ProcedureParam", "name", &self.name, "data_type",
            &self.data_type, "mode", &self.mode, "default", &&self.default)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ProcedureParam {
    #[inline]
    fn clone(&self) -> ProcedureParam {
        ProcedureParam {
            name: ::core::clone::Clone::clone(&self.name),
            data_type: ::core::clone::Clone::clone(&self.data_type),
            mode: ::core::clone::Clone::clone(&self.mode),
            default: ::core::clone::Clone::clone(&self.default),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ProcedureParam {
    #[inline]
    fn eq(&self, other: &ProcedureParam) -> bool {
        self.name == other.name && self.data_type == other.data_type &&
                self.mode == other.mode && self.default == other.default
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ProcedureParam {
    #[inline]
    fn partial_cmp(&self, other: &ProcedureParam)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
                        &other.data_type) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.mode,
                                &other.mode) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                ::core::cmp::PartialOrd::partial_cmp(&self.default,
                                    &other.default),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ProcedureParam {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<Option<ArgMode>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ProcedureParam {
    #[inline]
    fn cmp(&self, other: &ProcedureParam) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.data_type, &other.data_type)
                    {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.mode, &other.mode) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(&self.default, &other.default),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ProcedureParam {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.data_type, state);
        ::core::hash::Hash::hash(&self.mode, state);
        ::core::hash::Hash::hash(&self.default, state)
    }
}Hash)]
1489#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1490#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ProcedureParam {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.mode, visitor)?;
                        sqlparser::ast::Visit::visit(&self.default, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ProcedureParam {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.data_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.mode, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.default,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1491/// A parameter of a stored procedure or function declaration.
1492pub struct ProcedureParam {
1493    /// Parameter name.
1494    pub name: Ident,
1495    /// Parameter data type.
1496    pub data_type: DataType,
1497    /// Optional mode (`IN`, `OUT`, `INOUT`, etc.).
1498    pub mode: Option<ArgMode>,
1499    /// Optional default expression for the parameter.
1500    pub default: Option<Expr>,
1501}
1502
1503impl fmt::Display for ProcedureParam {
1504    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1505        if let Some(mode) = &self.mode {
1506            if let Some(default) = &self.default {
1507                f.write_fmt(format_args!("{3} {0} {1} = {2}", self.name, self.data_type,
        default, mode))write!(f, "{mode} {} {} = {}", self.name, self.data_type, default)
1508            } else {
1509                f.write_fmt(format_args!("{2} {0} {1}", self.name, self.data_type, mode))write!(f, "{mode} {} {}", self.name, self.data_type)
1510            }
1511        } else if let Some(default) = &self.default {
1512            f.write_fmt(format_args!("{0} {1} = {2}", self.name, self.data_type, default))write!(f, "{} {} = {}", self.name, self.data_type, default)
1513        } else {
1514            f.write_fmt(format_args!("{0} {1}", self.name, self.data_type))write!(f, "{} {}", self.name, self.data_type)
1515        }
1516    }
1517}
1518
1519/// SQL column definition
1520#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ColumnDef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "ColumnDef",
            "name", &self.name, "data_type", &self.data_type, "options",
            &&self.options)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ColumnDef {
    #[inline]
    fn clone(&self) -> ColumnDef {
        ColumnDef {
            name: ::core::clone::Clone::clone(&self.name),
            data_type: ::core::clone::Clone::clone(&self.data_type),
            options: ::core::clone::Clone::clone(&self.options),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ColumnDef {
    #[inline]
    fn eq(&self, other: &ColumnDef) -> bool {
        self.name == other.name && self.data_type == other.data_type &&
            self.options == other.options
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ColumnDef {
    #[inline]
    fn partial_cmp(&self, other: &ColumnDef)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
                        &other.data_type) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.options,
                            &other.options),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ColumnDef {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ColumnOptionDef>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ColumnDef {
    #[inline]
    fn cmp(&self, other: &ColumnDef) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.data_type, &other.data_type)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.options, &other.options),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ColumnDef {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.data_type, state);
        ::core::hash::Hash::hash(&self.options, state)
    }
}Hash)]
1521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1522#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ColumnDef {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.options, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ColumnDef {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.data_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.options,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1523pub struct ColumnDef {
1524    /// Column name.
1525    pub name: Ident,
1526    /// Column data type.
1527    pub data_type: DataType,
1528    /// Column options (defaults, constraints, generated, etc.).
1529    pub options: Vec<ColumnOptionDef>,
1530}
1531
1532impl fmt::Display for ColumnDef {
1533    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1534        if self.data_type == DataType::Unspecified {
1535            f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)?;
1536        } else {
1537            f.write_fmt(format_args!("{0} {1}", self.name, self.data_type))write!(f, "{} {}", self.name, self.data_type)?;
1538        }
1539        for option in &self.options {
1540            f.write_fmt(format_args!(" {0}", option))write!(f, " {option}")?;
1541        }
1542        Ok(())
1543    }
1544}
1545
1546/// Column definition specified in a `CREATE VIEW` statement.
1547///
1548/// Syntax
1549/// ```markdown
1550/// <name> [data_type][OPTIONS(option, ...)]
1551///
1552/// option: <name> = <value>
1553/// ```
1554///
1555/// Examples:
1556/// ```sql
1557/// name
1558/// age OPTIONS(description = "age column", tag = "prod")
1559/// amount COMMENT 'The total amount for the order line'
1560/// created_at DateTime64
1561/// ```
1562#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ViewColumnDef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "ViewColumnDef",
            "name", &self.name, "data_type", &self.data_type, "options",
            &&self.options)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ViewColumnDef {
    #[inline]
    fn clone(&self) -> ViewColumnDef {
        ViewColumnDef {
            name: ::core::clone::Clone::clone(&self.name),
            data_type: ::core::clone::Clone::clone(&self.data_type),
            options: ::core::clone::Clone::clone(&self.options),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ViewColumnDef {
    #[inline]
    fn eq(&self, other: &ViewColumnDef) -> bool {
        self.name == other.name && self.data_type == other.data_type &&
            self.options == other.options
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ViewColumnDef {
    #[inline]
    fn partial_cmp(&self, other: &ViewColumnDef)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
                        &other.data_type) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.options,
                            &other.options),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ViewColumnDef {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ColumnOptions>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ViewColumnDef {
    #[inline]
    fn cmp(&self, other: &ViewColumnDef) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.data_type, &other.data_type)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.options, &other.options),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ViewColumnDef {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.data_type, state);
        ::core::hash::Hash::hash(&self.options, state)
    }
}Hash)]
1563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1564#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ViewColumnDef {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.options, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ViewColumnDef {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.data_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.options,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1565pub struct ViewColumnDef {
1566    /// Column identifier.
1567    pub name: Ident,
1568    /// Optional data type for the column.
1569    pub data_type: Option<DataType>,
1570    /// Optional column options (defaults, comments, etc.).
1571    pub options: Option<ColumnOptions>,
1572}
1573
1574#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ColumnOptions {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ColumnOptions::CommaSeparated(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "CommaSeparated", &__self_0),
            ColumnOptions::SpaceSeparated(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "SpaceSeparated", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ColumnOptions {
    #[inline]
    fn clone(&self) -> ColumnOptions {
        match self {
            ColumnOptions::CommaSeparated(__self_0) =>
                ColumnOptions::CommaSeparated(::core::clone::Clone::clone(__self_0)),
            ColumnOptions::SpaceSeparated(__self_0) =>
                ColumnOptions::SpaceSeparated(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ColumnOptions {
    #[inline]
    fn eq(&self, other: &ColumnOptions) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (ColumnOptions::CommaSeparated(__self_0),
                    ColumnOptions::CommaSeparated(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (ColumnOptions::SpaceSeparated(__self_0),
                    ColumnOptions::SpaceSeparated(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ColumnOptions {
    #[inline]
    fn partial_cmp(&self, other: &ColumnOptions)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (ColumnOptions::CommaSeparated(__self_0),
                ColumnOptions::CommaSeparated(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOptions::SpaceSeparated(__self_0),
                ColumnOptions::SpaceSeparated(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ColumnOptions {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Vec<ColumnOption>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ColumnOption>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ColumnOptions {
    #[inline]
    fn cmp(&self, other: &ColumnOptions) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (ColumnOptions::CommaSeparated(__self_0),
                        ColumnOptions::CommaSeparated(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOptions::SpaceSeparated(__self_0),
                        ColumnOptions::SpaceSeparated(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ColumnOptions {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            ColumnOptions::CommaSeparated(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOptions::SpaceSeparated(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1575#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1576#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ColumnOptions {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::CommaSeparated(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::SpaceSeparated(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ColumnOptions {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::CommaSeparated(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::SpaceSeparated(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1577/// Representation of how multiple `ColumnOption`s are grouped for a column.
1578pub enum ColumnOptions {
1579    /// Options separated by comma: `OPTIONS(a, b, c)`.
1580    CommaSeparated(Vec<ColumnOption>),
1581    /// Options separated by spaces: `OPTION_A OPTION_B`.
1582    SpaceSeparated(Vec<ColumnOption>),
1583}
1584
1585impl ColumnOptions {
1586    /// Get the column options as a slice.
1587    pub fn as_slice(&self) -> &[ColumnOption] {
1588        match self {
1589            ColumnOptions::CommaSeparated(options) => options.as_slice(),
1590            ColumnOptions::SpaceSeparated(options) => options.as_slice(),
1591        }
1592    }
1593}
1594
1595impl fmt::Display for ViewColumnDef {
1596    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1597        f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)?;
1598        if let Some(data_type) = self.data_type.as_ref() {
1599            f.write_fmt(format_args!(" {0}", data_type))write!(f, " {data_type}")?;
1600        }
1601        if let Some(options) = self.options.as_ref() {
1602            match options {
1603                ColumnOptions::CommaSeparated(column_options) => {
1604                    f.write_fmt(format_args!(" {0}",
        display_comma_separated(column_options.as_slice())))write!(f, " {}", display_comma_separated(column_options.as_slice()))?;
1605                }
1606                ColumnOptions::SpaceSeparated(column_options) => {
1607                    f.write_fmt(format_args!(" {0}",
        display_separated(column_options.as_slice(), " ")))write!(f, " {}", display_separated(column_options.as_slice(), " "))?
1608                }
1609            }
1610        }
1611        Ok(())
1612    }
1613}
1614
1615/// An optionally-named `ColumnOption`: `[ CONSTRAINT <name> ] <column-option>`.
1616///
1617/// Note that implementations are substantially more permissive than the ANSI
1618/// specification on what order column options can be presented in, and whether
1619/// they are allowed to be named. The specification distinguishes between
1620/// constraints (NOT NULL, UNIQUE, PRIMARY KEY, and CHECK), which can be named
1621/// and can appear in any order, and other options (DEFAULT, GENERATED), which
1622/// cannot be named and must appear in a fixed order. `PostgreSQL`, however,
1623/// allows preceding any option with `CONSTRAINT <name>`, even those that are
1624/// not really constraints, like NULL and DEFAULT. MSSQL is less permissive,
1625/// allowing DEFAULT, UNIQUE, PRIMARY KEY and CHECK to be named, but not NULL or
1626/// NOT NULL constraints (the last of which is in violation of the spec).
1627///
1628/// For maximum flexibility, we don't distinguish between constraint and
1629/// non-constraint options, lumping them all together under the umbrella of
1630/// "column options," and we allow any column option to be named.
1631#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ColumnOptionDef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "ColumnOptionDef", "name", &self.name, "option", &&self.option)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ColumnOptionDef {
    #[inline]
    fn clone(&self) -> ColumnOptionDef {
        ColumnOptionDef {
            name: ::core::clone::Clone::clone(&self.name),
            option: ::core::clone::Clone::clone(&self.option),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ColumnOptionDef {
    #[inline]
    fn eq(&self, other: &ColumnOptionDef) -> bool {
        self.name == other.name && self.option == other.option
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ColumnOptionDef {
    #[inline]
    fn partial_cmp(&self, other: &ColumnOptionDef)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.option,
                    &other.option),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ColumnOptionDef {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<ColumnOption>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ColumnOptionDef {
    #[inline]
    fn cmp(&self, other: &ColumnOptionDef) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.option, &other.option),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ColumnOptionDef {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.option, state)
    }
}Hash)]
1632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1633#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ColumnOptionDef {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.option, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ColumnOptionDef {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.option, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1634pub struct ColumnOptionDef {
1635    /// Optional name of the constraint.
1636    pub name: Option<Ident>,
1637    /// The actual column option (e.g. `NOT NULL`, `DEFAULT`, `GENERATED`, ...).
1638    pub option: ColumnOption,
1639}
1640
1641impl fmt::Display for ColumnOptionDef {
1642    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1643        f.write_fmt(format_args!("{0}{1}", display_constraint_name(&self.name),
        self.option))write!(f, "{}{}", display_constraint_name(&self.name), self.option)
1644    }
1645}
1646
1647/// Identity is a column option for defining an identity or autoincrement column in a `CREATE TABLE` statement.
1648/// Syntax
1649/// ```sql
1650/// { IDENTITY | AUTOINCREMENT } [ (seed , increment) | START num INCREMENT num ] [ ORDER | NOORDER ]
1651/// ```
1652/// [MS SQL Server]: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property
1653/// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1654#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IdentityPropertyKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            IdentityPropertyKind::Autoincrement(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Autoincrement", &__self_0),
            IdentityPropertyKind::Identity(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Identity", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IdentityPropertyKind {
    #[inline]
    fn clone(&self) -> IdentityPropertyKind {
        match self {
            IdentityPropertyKind::Autoincrement(__self_0) =>
                IdentityPropertyKind::Autoincrement(::core::clone::Clone::clone(__self_0)),
            IdentityPropertyKind::Identity(__self_0) =>
                IdentityPropertyKind::Identity(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IdentityPropertyKind {
    #[inline]
    fn eq(&self, other: &IdentityPropertyKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (IdentityPropertyKind::Autoincrement(__self_0),
                    IdentityPropertyKind::Autoincrement(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (IdentityPropertyKind::Identity(__self_0),
                    IdentityPropertyKind::Identity(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IdentityPropertyKind {
    #[inline]
    fn partial_cmp(&self, other: &IdentityPropertyKind)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (IdentityPropertyKind::Autoincrement(__self_0),
                IdentityPropertyKind::Autoincrement(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (IdentityPropertyKind::Identity(__self_0),
                IdentityPropertyKind::Identity(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IdentityPropertyKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<IdentityProperty>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IdentityPropertyKind {
    #[inline]
    fn cmp(&self, other: &IdentityPropertyKind) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (IdentityPropertyKind::Autoincrement(__self_0),
                        IdentityPropertyKind::Autoincrement(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (IdentityPropertyKind::Identity(__self_0),
                        IdentityPropertyKind::Identity(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IdentityPropertyKind {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            IdentityPropertyKind::Autoincrement(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            IdentityPropertyKind::Identity(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1656#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IdentityPropertyKind {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Autoincrement(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Identity(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IdentityPropertyKind {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Autoincrement(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Identity(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1657pub enum IdentityPropertyKind {
1658    /// An identity property declared via the `AUTOINCREMENT` key word
1659    /// Example:
1660    /// ```sql
1661    ///  AUTOINCREMENT(100, 1) NOORDER
1662    ///  AUTOINCREMENT START 100 INCREMENT 1 ORDER
1663    /// ```
1664    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1665    Autoincrement(IdentityProperty),
1666    /// An identity property declared via the `IDENTITY` key word
1667    /// Example, [MS SQL Server] or [Snowflake]:
1668    /// ```sql
1669    ///  IDENTITY(100, 1)
1670    /// ```
1671    /// [Snowflake]
1672    /// ```sql
1673    ///  IDENTITY(100, 1) ORDER
1674    ///  IDENTITY START 100 INCREMENT 1 NOORDER
1675    /// ```
1676    /// [MS SQL Server]: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property
1677    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1678    Identity(IdentityProperty),
1679}
1680
1681impl fmt::Display for IdentityPropertyKind {
1682    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1683        let (command, property) = match self {
1684            IdentityPropertyKind::Identity(property) => ("IDENTITY", property),
1685            IdentityPropertyKind::Autoincrement(property) => ("AUTOINCREMENT", property),
1686        };
1687        f.write_fmt(format_args!("{0}", command))write!(f, "{command}")?;
1688        if let Some(parameters) = &property.parameters {
1689            f.write_fmt(format_args!("{0}", parameters))write!(f, "{parameters}")?;
1690        }
1691        if let Some(order) = &property.order {
1692            f.write_fmt(format_args!("{0}", order))write!(f, "{order}")?;
1693        }
1694        Ok(())
1695    }
1696}
1697
1698/// Properties for the `IDENTITY` / `AUTOINCREMENT` column option.
1699#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IdentityProperty {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "IdentityProperty", "parameters", &self.parameters, "order",
            &&self.order)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IdentityProperty {
    #[inline]
    fn clone(&self) -> IdentityProperty {
        IdentityProperty {
            parameters: ::core::clone::Clone::clone(&self.parameters),
            order: ::core::clone::Clone::clone(&self.order),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IdentityProperty {
    #[inline]
    fn eq(&self, other: &IdentityProperty) -> bool {
        self.parameters == other.parameters && self.order == other.order
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IdentityProperty {
    #[inline]
    fn partial_cmp(&self, other: &IdentityProperty)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.parameters,
                &other.parameters) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.order,
                    &other.order),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IdentityProperty {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _:
                ::core::cmp::AssertParamIsEq<Option<IdentityPropertyFormatKind>>;
        let _: ::core::cmp::AssertParamIsEq<Option<IdentityPropertyOrder>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IdentityProperty {
    #[inline]
    fn cmp(&self, other: &IdentityProperty) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.parameters, &other.parameters) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.order, &other.order),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IdentityProperty {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.parameters, state);
        ::core::hash::Hash::hash(&self.order, state)
    }
}Hash)]
1700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1701#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IdentityProperty {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.parameters, visitor)?;
                        sqlparser::ast::Visit::visit(&self.order, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IdentityProperty {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.parameters,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.order, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1702pub struct IdentityProperty {
1703    /// Optional parameters specifying seed/increment for the identity column.
1704    pub parameters: Option<IdentityPropertyFormatKind>,
1705    /// Optional ordering specifier (`ORDER` / `NOORDER`).
1706    pub order: Option<IdentityPropertyOrder>,
1707}
1708
1709/// A format of parameters of identity column.
1710///
1711/// It is [Snowflake] specific.
1712/// Syntax
1713/// ```sql
1714/// (seed , increment) | START num INCREMENT num
1715/// ```
1716/// [MS SQL Server] uses one way of representing these parameters.
1717/// Syntax
1718/// ```sql
1719/// (seed , increment)
1720/// ```
1721/// [MS SQL Server]: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property
1722/// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1723#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IdentityPropertyFormatKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            IdentityPropertyFormatKind::FunctionCall(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "FunctionCall", &__self_0),
            IdentityPropertyFormatKind::StartAndIncrement(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "StartAndIncrement", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IdentityPropertyFormatKind {
    #[inline]
    fn clone(&self) -> IdentityPropertyFormatKind {
        match self {
            IdentityPropertyFormatKind::FunctionCall(__self_0) =>
                IdentityPropertyFormatKind::FunctionCall(::core::clone::Clone::clone(__self_0)),
            IdentityPropertyFormatKind::StartAndIncrement(__self_0) =>
                IdentityPropertyFormatKind::StartAndIncrement(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IdentityPropertyFormatKind {
    #[inline]
    fn eq(&self, other: &IdentityPropertyFormatKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (IdentityPropertyFormatKind::FunctionCall(__self_0),
                    IdentityPropertyFormatKind::FunctionCall(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (IdentityPropertyFormatKind::StartAndIncrement(__self_0),
                    IdentityPropertyFormatKind::StartAndIncrement(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IdentityPropertyFormatKind {
    #[inline]
    fn partial_cmp(&self, other: &IdentityPropertyFormatKind)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (IdentityPropertyFormatKind::FunctionCall(__self_0),
                IdentityPropertyFormatKind::FunctionCall(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (IdentityPropertyFormatKind::StartAndIncrement(__self_0),
                IdentityPropertyFormatKind::StartAndIncrement(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IdentityPropertyFormatKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<IdentityParameters>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IdentityPropertyFormatKind {
    #[inline]
    fn cmp(&self, other: &IdentityPropertyFormatKind)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (IdentityPropertyFormatKind::FunctionCall(__self_0),
                        IdentityPropertyFormatKind::FunctionCall(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (IdentityPropertyFormatKind::StartAndIncrement(__self_0),
                        IdentityPropertyFormatKind::StartAndIncrement(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IdentityPropertyFormatKind {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            IdentityPropertyFormatKind::FunctionCall(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            IdentityPropertyFormatKind::StartAndIncrement(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1725#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IdentityPropertyFormatKind {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::FunctionCall(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::StartAndIncrement(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IdentityPropertyFormatKind {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::FunctionCall(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::StartAndIncrement(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1726pub enum IdentityPropertyFormatKind {
1727    /// A parameters of identity column declared like parameters of function call
1728    /// Example:
1729    /// ```sql
1730    ///  (100, 1)
1731    /// ```
1732    /// [MS SQL Server]: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property
1733    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1734    FunctionCall(IdentityParameters),
1735    /// A parameters of identity column declared with keywords `START` and `INCREMENT`
1736    /// Example:
1737    /// ```sql
1738    ///  START 100 INCREMENT 1
1739    /// ```
1740    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1741    StartAndIncrement(IdentityParameters),
1742}
1743
1744impl fmt::Display for IdentityPropertyFormatKind {
1745    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1746        match self {
1747            IdentityPropertyFormatKind::FunctionCall(parameters) => {
1748                f.write_fmt(format_args!("({0}, {1})", parameters.seed, parameters.increment))write!(f, "({}, {})", parameters.seed, parameters.increment)
1749            }
1750            IdentityPropertyFormatKind::StartAndIncrement(parameters) => {
1751                f.write_fmt(format_args!(" START {0} INCREMENT {1}", parameters.seed,
        parameters.increment))write!(
1752                    f,
1753                    " START {} INCREMENT {}",
1754                    parameters.seed, parameters.increment
1755                )
1756            }
1757        }
1758    }
1759}
1760/// Parameters specifying seed and increment for identity columns.
1761#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IdentityParameters {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "IdentityParameters", "seed", &self.seed, "increment",
            &&self.increment)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IdentityParameters {
    #[inline]
    fn clone(&self) -> IdentityParameters {
        IdentityParameters {
            seed: ::core::clone::Clone::clone(&self.seed),
            increment: ::core::clone::Clone::clone(&self.increment),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for IdentityParameters {
    #[inline]
    fn eq(&self, other: &IdentityParameters) -> bool {
        self.seed == other.seed && self.increment == other.increment
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IdentityParameters {
    #[inline]
    fn partial_cmp(&self, other: &IdentityParameters)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.seed, &other.seed) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.increment,
                    &other.increment),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IdentityParameters {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Expr>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IdentityParameters {
    #[inline]
    fn cmp(&self, other: &IdentityParameters) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.seed, &other.seed) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.increment, &other.increment),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IdentityParameters {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.seed, state);
        ::core::hash::Hash::hash(&self.increment, state)
    }
}Hash)]
1762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1763#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IdentityParameters {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.seed, visitor)?;
                        sqlparser::ast::Visit::visit(&self.increment, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IdentityParameters {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.seed, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.increment,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1764pub struct IdentityParameters {
1765    /// The initial seed expression for the identity column.
1766    pub seed: Expr,
1767    /// The increment expression for the identity column.
1768    pub increment: Expr,
1769}
1770
1771/// The identity column option specifies how values are generated for the auto-incremented column, either in increasing or decreasing order.
1772/// Syntax
1773/// ```sql
1774/// ORDER | NOORDER
1775/// ```
1776/// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1777#[derive(#[automatically_derived]
impl ::core::fmt::Debug for IdentityPropertyOrder {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                IdentityPropertyOrder::Order => "Order",
                IdentityPropertyOrder::NoOrder => "NoOrder",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for IdentityPropertyOrder {
    #[inline]
    fn clone(&self) -> IdentityPropertyOrder { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for IdentityPropertyOrder { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for IdentityPropertyOrder {
    #[inline]
    fn eq(&self, other: &IdentityPropertyOrder) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for IdentityPropertyOrder {
    #[inline]
    fn partial_cmp(&self, other: &IdentityPropertyOrder)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for IdentityPropertyOrder {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for IdentityPropertyOrder {
    #[inline]
    fn cmp(&self, other: &IdentityPropertyOrder) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for IdentityPropertyOrder {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
1778#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1779#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for IdentityPropertyOrder {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Order => {} Self::NoOrder => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for IdentityPropertyOrder {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Order => {} Self::NoOrder => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1780pub enum IdentityPropertyOrder {
1781    /// `ORDER` - preserve ordering for generated values (where supported).
1782    Order,
1783    /// `NOORDER` - do not enforce ordering for generated values.
1784    NoOrder,
1785}
1786
1787impl fmt::Display for IdentityPropertyOrder {
1788    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1789        match self {
1790            IdentityPropertyOrder::Order => f.write_fmt(format_args!(" ORDER"))write!(f, " ORDER"),
1791            IdentityPropertyOrder::NoOrder => f.write_fmt(format_args!(" NOORDER"))write!(f, " NOORDER"),
1792        }
1793    }
1794}
1795
1796/// Column policy that identify a security policy of access to a column.
1797/// Syntax
1798/// ```sql
1799/// [ WITH ] MASKING POLICY <policy_name> [ USING ( <col_name> , <cond_col1> , ... ) ]
1800/// [ WITH ] PROJECTION POLICY <policy_name>
1801/// ```
1802/// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1803#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ColumnPolicy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ColumnPolicy::MaskingPolicy(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MaskingPolicy", &__self_0),
            ColumnPolicy::ProjectionPolicy(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ProjectionPolicy", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ColumnPolicy {
    #[inline]
    fn clone(&self) -> ColumnPolicy {
        match self {
            ColumnPolicy::MaskingPolicy(__self_0) =>
                ColumnPolicy::MaskingPolicy(::core::clone::Clone::clone(__self_0)),
            ColumnPolicy::ProjectionPolicy(__self_0) =>
                ColumnPolicy::ProjectionPolicy(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ColumnPolicy {
    #[inline]
    fn eq(&self, other: &ColumnPolicy) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (ColumnPolicy::MaskingPolicy(__self_0),
                    ColumnPolicy::MaskingPolicy(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (ColumnPolicy::ProjectionPolicy(__self_0),
                    ColumnPolicy::ProjectionPolicy(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ColumnPolicy {
    #[inline]
    fn partial_cmp(&self, other: &ColumnPolicy)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (ColumnPolicy::MaskingPolicy(__self_0),
                ColumnPolicy::MaskingPolicy(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnPolicy::ProjectionPolicy(__self_0),
                ColumnPolicy::ProjectionPolicy(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ColumnPolicy {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ColumnPolicyProperty>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ColumnPolicy {
    #[inline]
    fn cmp(&self, other: &ColumnPolicy) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (ColumnPolicy::MaskingPolicy(__self_0),
                        ColumnPolicy::MaskingPolicy(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnPolicy::ProjectionPolicy(__self_0),
                        ColumnPolicy::ProjectionPolicy(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ColumnPolicy {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            ColumnPolicy::MaskingPolicy(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnPolicy::ProjectionPolicy(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
1804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1805#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ColumnPolicy {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::MaskingPolicy(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::ProjectionPolicy(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ColumnPolicy {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::MaskingPolicy(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::ProjectionPolicy(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1806pub enum ColumnPolicy {
1807    /// `MASKING POLICY (<property>)`
1808    MaskingPolicy(ColumnPolicyProperty),
1809    /// `PROJECTION POLICY (<property>)`
1810    ProjectionPolicy(ColumnPolicyProperty),
1811}
1812
1813impl fmt::Display for ColumnPolicy {
1814    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1815        let (command, property) = match self {
1816            ColumnPolicy::MaskingPolicy(property) => ("MASKING POLICY", property),
1817            ColumnPolicy::ProjectionPolicy(property) => ("PROJECTION POLICY", property),
1818        };
1819        if property.with {
1820            f.write_fmt(format_args!("WITH "))write!(f, "WITH ")?;
1821        }
1822        f.write_fmt(format_args!("{1} {0}", property.policy_name, command))write!(f, "{command} {}", property.policy_name)?;
1823        if let Some(using_columns) = &property.using_columns {
1824            f.write_fmt(format_args!(" USING ({0})",
        display_comma_separated(using_columns)))write!(f, " USING ({})", display_comma_separated(using_columns))?;
1825        }
1826        Ok(())
1827    }
1828}
1829
1830#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ColumnPolicyProperty {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ColumnPolicyProperty", "with", &self.with, "policy_name",
            &self.policy_name, "using_columns", &&self.using_columns)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ColumnPolicyProperty {
    #[inline]
    fn clone(&self) -> ColumnPolicyProperty {
        ColumnPolicyProperty {
            with: ::core::clone::Clone::clone(&self.with),
            policy_name: ::core::clone::Clone::clone(&self.policy_name),
            using_columns: ::core::clone::Clone::clone(&self.using_columns),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ColumnPolicyProperty {
    #[inline]
    fn eq(&self, other: &ColumnPolicyProperty) -> bool {
        self.with == other.with && self.policy_name == other.policy_name &&
            self.using_columns == other.using_columns
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ColumnPolicyProperty {
    #[inline]
    fn partial_cmp(&self, other: &ColumnPolicyProperty)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.with, &other.with) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.policy_name,
                        &other.policy_name) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.using_columns,
                            &other.using_columns),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ColumnPolicyProperty {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<Ident>>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ColumnPolicyProperty {
    #[inline]
    fn cmp(&self, other: &ColumnPolicyProperty) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.with, &other.with) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.policy_name,
                        &other.policy_name) {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.using_columns,
                            &other.using_columns),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ColumnPolicyProperty {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.with, state);
        ::core::hash::Hash::hash(&self.policy_name, state);
        ::core::hash::Hash::hash(&self.using_columns, state)
    }
}Hash)]
1831#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1832#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ColumnPolicyProperty {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.with, visitor)?;
                        sqlparser::ast::Visit::visit(&self.policy_name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using_columns, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ColumnPolicyProperty {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.with, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.policy_name,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using_columns,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1833/// Properties describing a column policy (masking or projection).
1834pub struct ColumnPolicyProperty {
1835    /// This flag indicates that the column policy option is declared using the `WITH` prefix.
1836    /// Example
1837    /// ```sql
1838    /// WITH PROJECTION POLICY sample_policy
1839    /// ```
1840    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1841    pub with: bool,
1842    /// The name of the policy to apply to the column.
1843    pub policy_name: ObjectName,
1844    /// Optional list of column identifiers referenced by the policy.
1845    pub using_columns: Option<Vec<Ident>>,
1846}
1847
1848/// Tags option of column
1849/// Syntax
1850/// ```sql
1851/// [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] )
1852/// ```
1853/// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1854#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TagsColumnOption {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "TagsColumnOption", "with", &self.with, "tags", &&self.tags)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TagsColumnOption {
    #[inline]
    fn clone(&self) -> TagsColumnOption {
        TagsColumnOption {
            with: ::core::clone::Clone::clone(&self.with),
            tags: ::core::clone::Clone::clone(&self.tags),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for TagsColumnOption {
    #[inline]
    fn eq(&self, other: &TagsColumnOption) -> bool {
        self.with == other.with && self.tags == other.tags
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TagsColumnOption {
    #[inline]
    fn partial_cmp(&self, other: &TagsColumnOption)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.with, &other.with) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.tags, &other.tags),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TagsColumnOption {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Tag>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TagsColumnOption {
    #[inline]
    fn cmp(&self, other: &TagsColumnOption) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.with, &other.with) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.tags, &other.tags),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TagsColumnOption {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.with, state);
        ::core::hash::Hash::hash(&self.tags, state)
    }
}Hash)]
1855#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1856#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TagsColumnOption {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.with, visitor)?;
                        sqlparser::ast::Visit::visit(&self.tags, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for TagsColumnOption {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.with, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.tags, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1857pub struct TagsColumnOption {
1858    /// This flag indicates that the tags option is declared using the `WITH` prefix.
1859    /// Example:
1860    /// ```sql
1861    /// WITH TAG (A = 'Tag A')
1862    /// ```
1863    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1864    pub with: bool,
1865    /// List of tags to attach to the column.
1866    pub tags: Vec<Tag>,
1867}
1868
1869impl fmt::Display for TagsColumnOption {
1870    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1871        if self.with {
1872            f.write_fmt(format_args!("WITH "))write!(f, "WITH ")?;
1873        }
1874        f.write_fmt(format_args!("TAG ({0})", display_comma_separated(&self.tags)))write!(f, "TAG ({})", display_comma_separated(&self.tags))?;
1875        Ok(())
1876    }
1877}
1878
1879/// `ColumnOption`s are modifiers that follow a column definition in a `CREATE
1880/// TABLE` statement.
1881#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ColumnOption {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ColumnOption::Null =>
                ::core::fmt::Formatter::write_str(f, "Null"),
            ColumnOption::NotNull =>
                ::core::fmt::Formatter::write_str(f, "NotNull"),
            ColumnOption::Default(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Default", &__self_0),
            ColumnOption::Materialized(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Materialized", &__self_0),
            ColumnOption::Ephemeral(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Ephemeral", &__self_0),
            ColumnOption::Alias(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Alias",
                    &__self_0),
            ColumnOption::PrimaryKey(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "PrimaryKey", &__self_0),
            ColumnOption::Unique(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Unique",
                    &__self_0),
            ColumnOption::ForeignKey(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ForeignKey", &__self_0),
            ColumnOption::Check(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Check",
                    &__self_0),
            ColumnOption::DialectSpecific(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "DialectSpecific", &__self_0),
            ColumnOption::CharacterSet(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "CharacterSet", &__self_0),
            ColumnOption::Collation(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Collation", &__self_0),
            ColumnOption::Comment(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Comment", &__self_0),
            ColumnOption::OnUpdate(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "OnUpdate", &__self_0),
            ColumnOption::Generated {
                generated_as: __self_0,
                sequence_options: __self_1,
                generation_expr: __self_2,
                generation_expr_mode: __self_3,
                generated_keyword: __self_4 } =>
                ::core::fmt::Formatter::debug_struct_field5_finish(f,
                    "Generated", "generated_as", __self_0, "sequence_options",
                    __self_1, "generation_expr", __self_2,
                    "generation_expr_mode", __self_3, "generated_keyword",
                    &__self_4),
            ColumnOption::Options(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Options", &__self_0),
            ColumnOption::Identity(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Identity", &__self_0),
            ColumnOption::OnConflict(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "OnConflict", &__self_0),
            ColumnOption::Policy(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Policy",
                    &__self_0),
            ColumnOption::Tags(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Tags",
                    &__self_0),
            ColumnOption::Srid(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Srid",
                    &__self_0),
            ColumnOption::Invisible =>
                ::core::fmt::Formatter::write_str(f, "Invisible"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ColumnOption {
    #[inline]
    fn clone(&self) -> ColumnOption {
        match self {
            ColumnOption::Null => ColumnOption::Null,
            ColumnOption::NotNull => ColumnOption::NotNull,
            ColumnOption::Default(__self_0) =>
                ColumnOption::Default(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Materialized(__self_0) =>
                ColumnOption::Materialized(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Ephemeral(__self_0) =>
                ColumnOption::Ephemeral(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Alias(__self_0) =>
                ColumnOption::Alias(::core::clone::Clone::clone(__self_0)),
            ColumnOption::PrimaryKey(__self_0) =>
                ColumnOption::PrimaryKey(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Unique(__self_0) =>
                ColumnOption::Unique(::core::clone::Clone::clone(__self_0)),
            ColumnOption::ForeignKey(__self_0) =>
                ColumnOption::ForeignKey(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Check(__self_0) =>
                ColumnOption::Check(::core::clone::Clone::clone(__self_0)),
            ColumnOption::DialectSpecific(__self_0) =>
                ColumnOption::DialectSpecific(::core::clone::Clone::clone(__self_0)),
            ColumnOption::CharacterSet(__self_0) =>
                ColumnOption::CharacterSet(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Collation(__self_0) =>
                ColumnOption::Collation(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Comment(__self_0) =>
                ColumnOption::Comment(::core::clone::Clone::clone(__self_0)),
            ColumnOption::OnUpdate(__self_0) =>
                ColumnOption::OnUpdate(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Generated {
                generated_as: __self_0,
                sequence_options: __self_1,
                generation_expr: __self_2,
                generation_expr_mode: __self_3,
                generated_keyword: __self_4 } =>
                ColumnOption::Generated {
                    generated_as: ::core::clone::Clone::clone(__self_0),
                    sequence_options: ::core::clone::Clone::clone(__self_1),
                    generation_expr: ::core::clone::Clone::clone(__self_2),
                    generation_expr_mode: ::core::clone::Clone::clone(__self_3),
                    generated_keyword: ::core::clone::Clone::clone(__self_4),
                },
            ColumnOption::Options(__self_0) =>
                ColumnOption::Options(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Identity(__self_0) =>
                ColumnOption::Identity(::core::clone::Clone::clone(__self_0)),
            ColumnOption::OnConflict(__self_0) =>
                ColumnOption::OnConflict(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Policy(__self_0) =>
                ColumnOption::Policy(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Tags(__self_0) =>
                ColumnOption::Tags(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Srid(__self_0) =>
                ColumnOption::Srid(::core::clone::Clone::clone(__self_0)),
            ColumnOption::Invisible => ColumnOption::Invisible,
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ColumnOption {
    #[inline]
    fn eq(&self, other: &ColumnOption) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (ColumnOption::Default(__self_0),
                    ColumnOption::Default(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Materialized(__self_0),
                    ColumnOption::Materialized(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (ColumnOption::Ephemeral(__self_0),
                    ColumnOption::Ephemeral(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Alias(__self_0), ColumnOption::Alias(__arg1_0))
                    => __self_0 == __arg1_0,
                (ColumnOption::PrimaryKey(__self_0),
                    ColumnOption::PrimaryKey(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Unique(__self_0),
                    ColumnOption::Unique(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::ForeignKey(__self_0),
                    ColumnOption::ForeignKey(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Check(__self_0), ColumnOption::Check(__arg1_0))
                    => __self_0 == __arg1_0,
                (ColumnOption::DialectSpecific(__self_0),
                    ColumnOption::DialectSpecific(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (ColumnOption::CharacterSet(__self_0),
                    ColumnOption::CharacterSet(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (ColumnOption::Collation(__self_0),
                    ColumnOption::Collation(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Comment(__self_0),
                    ColumnOption::Comment(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::OnUpdate(__self_0),
                    ColumnOption::OnUpdate(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Generated {
                    generated_as: __self_0,
                    sequence_options: __self_1,
                    generation_expr: __self_2,
                    generation_expr_mode: __self_3,
                    generated_keyword: __self_4 }, ColumnOption::Generated {
                    generated_as: __arg1_0,
                    sequence_options: __arg1_1,
                    generation_expr: __arg1_2,
                    generation_expr_mode: __arg1_3,
                    generated_keyword: __arg1_4 }) =>
                    __self_4 == __arg1_4 && __self_0 == __arg1_0 &&
                                __self_1 == __arg1_1 && __self_2 == __arg1_2 &&
                        __self_3 == __arg1_3,
                (ColumnOption::Options(__self_0),
                    ColumnOption::Options(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Identity(__self_0),
                    ColumnOption::Identity(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::OnConflict(__self_0),
                    ColumnOption::OnConflict(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Policy(__self_0),
                    ColumnOption::Policy(__arg1_0)) => __self_0 == __arg1_0,
                (ColumnOption::Tags(__self_0), ColumnOption::Tags(__arg1_0))
                    => __self_0 == __arg1_0,
                (ColumnOption::Srid(__self_0), ColumnOption::Srid(__arg1_0))
                    => __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ColumnOption {
    #[inline]
    fn partial_cmp(&self, other: &ColumnOption)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (ColumnOption::Default(__self_0), ColumnOption::Default(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Materialized(__self_0),
                ColumnOption::Materialized(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Ephemeral(__self_0),
                ColumnOption::Ephemeral(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Alias(__self_0), ColumnOption::Alias(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::PrimaryKey(__self_0),
                ColumnOption::PrimaryKey(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Unique(__self_0), ColumnOption::Unique(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::ForeignKey(__self_0),
                ColumnOption::ForeignKey(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Check(__self_0), ColumnOption::Check(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::DialectSpecific(__self_0),
                ColumnOption::DialectSpecific(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::CharacterSet(__self_0),
                ColumnOption::CharacterSet(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Collation(__self_0),
                ColumnOption::Collation(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Comment(__self_0), ColumnOption::Comment(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::OnUpdate(__self_0),
                ColumnOption::OnUpdate(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Generated {
                generated_as: __self_0,
                sequence_options: __self_1,
                generation_expr: __self_2,
                generation_expr_mode: __self_3,
                generated_keyword: __self_4 }, ColumnOption::Generated {
                generated_as: __arg1_0,
                sequence_options: __arg1_1,
                generation_expr: __arg1_2,
                generation_expr_mode: __arg1_3,
                generated_keyword: __arg1_4 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                __arg1_1) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                        __arg1_2) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(__self_3,
                                                __arg1_3) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                => ::core::cmp::PartialOrd::partial_cmp(__self_4, __arg1_4),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            (ColumnOption::Options(__self_0), ColumnOption::Options(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Identity(__self_0),
                ColumnOption::Identity(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::OnConflict(__self_0),
                ColumnOption::OnConflict(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Policy(__self_0), ColumnOption::Policy(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Tags(__self_0), ColumnOption::Tags(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ColumnOption::Srid(__self_0), ColumnOption::Srid(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ColumnOption {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Expr>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<PrimaryKeyConstraint>;
        let _: ::core::cmp::AssertParamIsEq<UniqueConstraint>;
        let _: ::core::cmp::AssertParamIsEq<ForeignKeyConstraint>;
        let _: ::core::cmp::AssertParamIsEq<CheckConstraint>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Token>>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<String>;
        let _: ::core::cmp::AssertParamIsEq<GeneratedAs>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<SequenceOptions>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Option<GeneratedExpressionMode>>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
        let _: ::core::cmp::AssertParamIsEq<IdentityPropertyKind>;
        let _: ::core::cmp::AssertParamIsEq<Keyword>;
        let _: ::core::cmp::AssertParamIsEq<ColumnPolicy>;
        let _: ::core::cmp::AssertParamIsEq<TagsColumnOption>;
        let _: ::core::cmp::AssertParamIsEq<Box<Expr>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ColumnOption {
    #[inline]
    fn cmp(&self, other: &ColumnOption) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (ColumnOption::Default(__self_0),
                        ColumnOption::Default(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Materialized(__self_0),
                        ColumnOption::Materialized(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Ephemeral(__self_0),
                        ColumnOption::Ephemeral(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Alias(__self_0),
                        ColumnOption::Alias(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::PrimaryKey(__self_0),
                        ColumnOption::PrimaryKey(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Unique(__self_0),
                        ColumnOption::Unique(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::ForeignKey(__self_0),
                        ColumnOption::ForeignKey(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Check(__self_0),
                        ColumnOption::Check(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::DialectSpecific(__self_0),
                        ColumnOption::DialectSpecific(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::CharacterSet(__self_0),
                        ColumnOption::CharacterSet(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Collation(__self_0),
                        ColumnOption::Collation(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Comment(__self_0),
                        ColumnOption::Comment(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::OnUpdate(__self_0),
                        ColumnOption::OnUpdate(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Generated {
                        generated_as: __self_0,
                        sequence_options: __self_1,
                        generation_expr: __self_2,
                        generation_expr_mode: __self_3,
                        generated_keyword: __self_4 }, ColumnOption::Generated {
                        generated_as: __arg1_0,
                        sequence_options: __arg1_1,
                        generation_expr: __arg1_2,
                        generation_expr_mode: __arg1_3,
                        generated_keyword: __arg1_4 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(__self_3, __arg1_3) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        ::core::cmp::Ord::cmp(__self_4, __arg1_4),
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (ColumnOption::Options(__self_0),
                        ColumnOption::Options(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Identity(__self_0),
                        ColumnOption::Identity(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::OnConflict(__self_0),
                        ColumnOption::OnConflict(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Policy(__self_0),
                        ColumnOption::Policy(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Tags(__self_0), ColumnOption::Tags(__arg1_0))
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ColumnOption::Srid(__self_0), ColumnOption::Srid(__arg1_0))
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ColumnOption {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            ColumnOption::Default(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Materialized(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Ephemeral(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Alias(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::PrimaryKey(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Unique(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::ForeignKey(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Check(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::DialectSpecific(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::CharacterSet(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Collation(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Comment(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::OnUpdate(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Generated {
                generated_as: __self_0,
                sequence_options: __self_1,
                generation_expr: __self_2,
                generation_expr_mode: __self_3,
                generated_keyword: __self_4 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state);
                ::core::hash::Hash::hash(__self_4, state)
            }
            ColumnOption::Options(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Identity(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::OnConflict(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Policy(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Tags(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ColumnOption::Srid(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
1882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1883#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ColumnOption {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Null => {}
                            Self::NotNull => {}
                            Self::Default(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Materialized(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Ephemeral(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Alias(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::PrimaryKey(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Unique(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::ForeignKey(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Check(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::DialectSpecific(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::CharacterSet(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Collation(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Comment(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::OnUpdate(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Generated {
                                generated_as,
                                sequence_options,
                                generation_expr,
                                generation_expr_mode,
                                generated_keyword } => {
                                sqlparser::ast::Visit::visit(generated_as, visitor)?;
                                sqlparser::ast::Visit::visit(sequence_options, visitor)?;
                                sqlparser::ast::Visit::visit(generation_expr, visitor)?;
                                sqlparser::ast::Visit::visit(generation_expr_mode,
                                        visitor)?;
                                sqlparser::ast::Visit::visit(generated_keyword, visitor)?;
                            }
                            Self::Options(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Identity(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::OnConflict(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Policy(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Tags(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Srid(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Invisible => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ColumnOption {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Null => {}
                            Self::NotNull => {}
                            Self::Default(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Materialized(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Ephemeral(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Alias(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::PrimaryKey(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Unique(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::ForeignKey(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Check(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::DialectSpecific(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::CharacterSet(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Collation(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Comment(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::OnUpdate(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Generated {
                                generated_as,
                                sequence_options,
                                generation_expr,
                                generation_expr_mode,
                                generated_keyword } => {
                                sqlparser::ast::VisitMut::visit(generated_as, visitor)?;
                                sqlparser::ast::VisitMut::visit(sequence_options, visitor)?;
                                sqlparser::ast::VisitMut::visit(generation_expr, visitor)?;
                                sqlparser::ast::VisitMut::visit(generation_expr_mode,
                                        visitor)?;
                                sqlparser::ast::VisitMut::visit(generated_keyword,
                                        visitor)?;
                            }
                            Self::Options(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Identity(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::OnConflict(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Policy(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Tags(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Srid(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Invisible => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
1884pub enum ColumnOption {
1885    /// `NULL`
1886    Null,
1887    /// `NOT NULL`
1888    NotNull,
1889    /// `DEFAULT <restricted-expr>`
1890    Default(Expr),
1891
1892    /// `MATERIALIZE <expr>`
1893    /// Syntax: `b INT MATERIALIZE (a + 1)`
1894    ///
1895    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/create/table#default_values)
1896    Materialized(Expr),
1897    /// `EPHEMERAL [<expr>]`
1898    ///
1899    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/create/table#default_values)
1900    Ephemeral(Option<Expr>),
1901    /// `ALIAS <expr>`
1902    ///
1903    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/create/table#default_values)
1904    Alias(Expr),
1905
1906    /// `PRIMARY KEY [<constraint_characteristics>]`
1907    PrimaryKey(PrimaryKeyConstraint),
1908    /// `UNIQUE [<constraint_characteristics>]`
1909    Unique(UniqueConstraint),
1910    /// A referential integrity constraint (`REFERENCES <foreign_table> (<referred_columns>)
1911    /// [ MATCH { FULL | PARTIAL | SIMPLE } ]
1912    /// { [ON DELETE <referential_action>] [ON UPDATE <referential_action>] |
1913    ///   [ON UPDATE <referential_action>] [ON DELETE <referential_action>]
1914    /// }
1915    /// [<constraint_characteristics>]
1916    /// `).
1917    ForeignKey(ForeignKeyConstraint),
1918    /// `CHECK (<expr>)`
1919    Check(CheckConstraint),
1920    /// Dialect-specific options, such as:
1921    /// - MySQL's `AUTO_INCREMENT` or SQLite's `AUTOINCREMENT`
1922    /// - ...
1923    DialectSpecific(Vec<Token>),
1924    /// `CHARACTER SET <name>` column option
1925    CharacterSet(ObjectName),
1926    /// `COLLATE <name>` column option
1927    Collation(ObjectName),
1928    /// `COMMENT '<text>'` column option
1929    Comment(String),
1930    /// `ON UPDATE <expr>` column option
1931    OnUpdate(Expr),
1932    /// `Generated`s are modifiers that follow a column definition in a `CREATE
1933    /// TABLE` statement.
1934    Generated {
1935        /// How the column is generated (e.g. `GENERATED ALWAYS`, `BY DEFAULT`, or expression-stored).
1936        generated_as: GeneratedAs,
1937        /// Sequence/identity options when generation is backed by a sequence.
1938        sequence_options: Option<Vec<SequenceOptions>>,
1939        /// Optional expression used to generate the column value.
1940        generation_expr: Option<Expr>,
1941        /// Mode of the generated expression (`VIRTUAL` or `STORED`) when `generation_expr` is present.
1942        generation_expr_mode: Option<GeneratedExpressionMode>,
1943        /// false if 'GENERATED ALWAYS' is skipped (option starts with AS)
1944        generated_keyword: bool,
1945    },
1946    /// BigQuery specific: Explicit column options in a view [1] or table [2]
1947    /// Syntax
1948    /// ```sql
1949    /// OPTIONS(description="field desc")
1950    /// ```
1951    /// [1]: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#view_column_option_list
1952    /// [2]: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#column_option_list
1953    Options(Vec<SqlOption>),
1954    /// Creates an identity or an autoincrement column in a table.
1955    /// Syntax
1956    /// ```sql
1957    /// { IDENTITY | AUTOINCREMENT } [ (seed , increment) | START num INCREMENT num ] [ ORDER | NOORDER ]
1958    /// ```
1959    /// [MS SQL Server]: https://learn.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql-identity-property
1960    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1961    Identity(IdentityPropertyKind),
1962    /// SQLite specific: ON CONFLICT option on column definition
1963    /// <https://www.sqlite.org/lang_conflict.html>
1964    OnConflict(Keyword),
1965    /// Snowflake specific: an option of specifying security masking or projection policy to set on a column.
1966    /// Syntax:
1967    /// ```sql
1968    /// [ WITH ] MASKING POLICY <policy_name> [ USING ( <col_name> , <cond_col1> , ... ) ]
1969    /// [ WITH ] PROJECTION POLICY <policy_name>
1970    /// ```
1971    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1972    Policy(ColumnPolicy),
1973    /// Snowflake specific: Specifies the tag name and the tag string value.
1974    /// Syntax:
1975    /// ```sql
1976    /// [ WITH ] TAG ( <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' , ... ] )
1977    /// ```
1978    /// [Snowflake]: https://docs.snowflake.com/en/sql-reference/sql/create-table
1979    Tags(TagsColumnOption),
1980    /// MySQL specific: Spatial reference identifier
1981    /// Syntax:
1982    /// ```sql
1983    /// CREATE TABLE geom (g GEOMETRY NOT NULL SRID 4326);
1984    /// ```
1985    /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/creating-spatial-indexes.html
1986    Srid(Box<Expr>),
1987    /// MySQL specific: Column is invisible via SELECT *
1988    /// Syntax:
1989    /// ```sql
1990    /// CREATE TABLE t (foo INT, bar INT INVISIBLE);
1991    /// ```
1992    /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/invisible-columns.html
1993    Invisible,
1994}
1995
1996impl From<UniqueConstraint> for ColumnOption {
1997    fn from(c: UniqueConstraint) -> Self {
1998        ColumnOption::Unique(c)
1999    }
2000}
2001
2002impl From<PrimaryKeyConstraint> for ColumnOption {
2003    fn from(c: PrimaryKeyConstraint) -> Self {
2004        ColumnOption::PrimaryKey(c)
2005    }
2006}
2007
2008impl From<CheckConstraint> for ColumnOption {
2009    fn from(c: CheckConstraint) -> Self {
2010        ColumnOption::Check(c)
2011    }
2012}
2013impl From<ForeignKeyConstraint> for ColumnOption {
2014    fn from(fk: ForeignKeyConstraint) -> Self {
2015        ColumnOption::ForeignKey(fk)
2016    }
2017}
2018
2019impl fmt::Display for ColumnOption {
2020    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2021        use ColumnOption::*;
2022        match self {
2023            Null => f.write_fmt(format_args!("NULL"))write!(f, "NULL"),
2024            NotNull => f.write_fmt(format_args!("NOT NULL"))write!(f, "NOT NULL"),
2025            Default(expr) => f.write_fmt(format_args!("DEFAULT {0}", expr))write!(f, "DEFAULT {expr}"),
2026            Materialized(expr) => f.write_fmt(format_args!("MATERIALIZED {0}", expr))write!(f, "MATERIALIZED {expr}"),
2027            Ephemeral(expr) => {
2028                if let Some(e) = expr {
2029                    f.write_fmt(format_args!("EPHEMERAL {0}", e))write!(f, "EPHEMERAL {e}")
2030                } else {
2031                    f.write_fmt(format_args!("EPHEMERAL"))write!(f, "EPHEMERAL")
2032                }
2033            }
2034            Alias(expr) => f.write_fmt(format_args!("ALIAS {0}", expr))write!(f, "ALIAS {expr}"),
2035            PrimaryKey(constraint) => {
2036                f.write_fmt(format_args!("PRIMARY KEY"))write!(f, "PRIMARY KEY")?;
2037                if let Some(characteristics) = &constraint.characteristics {
2038                    f.write_fmt(format_args!(" {0}", characteristics))write!(f, " {characteristics}")?;
2039                }
2040                Ok(())
2041            }
2042            Unique(constraint) => {
2043                f.write_fmt(format_args!("UNIQUE"))write!(f, "UNIQUE")?;
2044                if let Some(characteristics) = &constraint.characteristics {
2045                    f.write_fmt(format_args!(" {0}", characteristics))write!(f, " {characteristics}")?;
2046                }
2047                Ok(())
2048            }
2049            ForeignKey(constraint) => {
2050                f.write_fmt(format_args!("REFERENCES {0}", constraint.foreign_table))write!(f, "REFERENCES {}", constraint.foreign_table)?;
2051                if !constraint.referred_columns.is_empty() {
2052                    f.write_fmt(format_args!(" ({0})",
        display_comma_separated(&constraint.referred_columns)))write!(
2053                        f,
2054                        " ({})",
2055                        display_comma_separated(&constraint.referred_columns)
2056                    )?;
2057                }
2058                if let Some(match_kind) = &constraint.match_kind {
2059                    f.write_fmt(format_args!(" {0}", match_kind))write!(f, " {match_kind}")?;
2060                }
2061                if let Some(action) = &constraint.on_delete {
2062                    f.write_fmt(format_args!(" ON DELETE {0}", action))write!(f, " ON DELETE {action}")?;
2063                }
2064                if let Some(action) = &constraint.on_update {
2065                    f.write_fmt(format_args!(" ON UPDATE {0}", action))write!(f, " ON UPDATE {action}")?;
2066                }
2067                if let Some(characteristics) = &constraint.characteristics {
2068                    f.write_fmt(format_args!(" {0}", characteristics))write!(f, " {characteristics}")?;
2069                }
2070                Ok(())
2071            }
2072            Check(constraint) => f.write_fmt(format_args!("{0}", constraint))write!(f, "{constraint}"),
2073            DialectSpecific(val) => f.write_fmt(format_args!("{0}", display_separated(val, " ")))write!(f, "{}", display_separated(val, " ")),
2074            CharacterSet(n) => f.write_fmt(format_args!("CHARACTER SET {0}", n))write!(f, "CHARACTER SET {n}"),
2075            Collation(n) => f.write_fmt(format_args!("COLLATE {0}", n))write!(f, "COLLATE {n}"),
2076            Comment(v) => f.write_fmt(format_args!("COMMENT \'{0}\'", escape_single_quote_string(v)))write!(f, "COMMENT '{}'", escape_single_quote_string(v)),
2077            OnUpdate(expr) => f.write_fmt(format_args!("ON UPDATE {0}", expr))write!(f, "ON UPDATE {expr}"),
2078            Generated {
2079                generated_as,
2080                sequence_options,
2081                generation_expr,
2082                generation_expr_mode,
2083                generated_keyword,
2084            } => {
2085                if let Some(expr) = generation_expr {
2086                    let modifier = match generation_expr_mode {
2087                        None => "",
2088                        Some(GeneratedExpressionMode::Virtual) => " VIRTUAL",
2089                        Some(GeneratedExpressionMode::Stored) => " STORED",
2090                    };
2091                    if *generated_keyword {
2092                        f.write_fmt(format_args!("GENERATED ALWAYS AS ({0}){1}", expr, modifier))write!(f, "GENERATED ALWAYS AS ({expr}){modifier}")?;
2093                    } else {
2094                        f.write_fmt(format_args!("AS ({0}){1}", expr, modifier))write!(f, "AS ({expr}){modifier}")?;
2095                    }
2096                    Ok(())
2097                } else {
2098                    // Like Postgres - generated from sequence
2099                    let when = match generated_as {
2100                        GeneratedAs::Always => "ALWAYS",
2101                        GeneratedAs::ByDefault => "BY DEFAULT",
2102                        // ExpStored goes with an expression, handled above
2103                        GeneratedAs::ExpStored => "",
2104                    };
2105                    f.write_fmt(format_args!("GENERATED {0} AS IDENTITY", when))write!(f, "GENERATED {when} AS IDENTITY")?;
2106                    if sequence_options.is_some() {
2107                        let so = sequence_options.as_ref().unwrap();
2108                        if !so.is_empty() {
2109                            f.write_fmt(format_args!(" ("))write!(f, " (")?;
2110                        }
2111                        for sequence_option in so {
2112                            f.write_fmt(format_args!("{0}", sequence_option))write!(f, "{sequence_option}")?;
2113                        }
2114                        if !so.is_empty() {
2115                            f.write_fmt(format_args!(" )"))write!(f, " )")?;
2116                        }
2117                    }
2118                    Ok(())
2119                }
2120            }
2121            Options(options) => {
2122                f.write_fmt(format_args!("OPTIONS({0})", display_comma_separated(options)))write!(f, "OPTIONS({})", display_comma_separated(options))
2123            }
2124            Identity(parameters) => {
2125                f.write_fmt(format_args!("{0}", parameters))write!(f, "{parameters}")
2126            }
2127            OnConflict(keyword) => {
2128                f.write_fmt(format_args!("ON CONFLICT {0:?}", keyword))write!(f, "ON CONFLICT {keyword:?}")?;
2129                Ok(())
2130            }
2131            Policy(parameters) => {
2132                f.write_fmt(format_args!("{0}", parameters))write!(f, "{parameters}")
2133            }
2134            Tags(tags) => {
2135                f.write_fmt(format_args!("{0}", tags))write!(f, "{tags}")
2136            }
2137            Srid(srid) => {
2138                f.write_fmt(format_args!("SRID {0}", srid))write!(f, "SRID {srid}")
2139            }
2140            Invisible => {
2141                f.write_fmt(format_args!("INVISIBLE"))write!(f, "INVISIBLE")
2142            }
2143        }
2144    }
2145}
2146
2147/// `GeneratedAs`s are modifiers that follow a column option in a `generated`.
2148/// 'ExpStored' is used for a column generated from an expression and stored.
2149#[derive(#[automatically_derived]
impl ::core::fmt::Debug for GeneratedAs {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                GeneratedAs::Always => "Always",
                GeneratedAs::ByDefault => "ByDefault",
                GeneratedAs::ExpStored => "ExpStored",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for GeneratedAs {
    #[inline]
    fn clone(&self) -> GeneratedAs { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for GeneratedAs { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for GeneratedAs {
    #[inline]
    fn eq(&self, other: &GeneratedAs) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for GeneratedAs {
    #[inline]
    fn partial_cmp(&self, other: &GeneratedAs)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for GeneratedAs {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for GeneratedAs {
    #[inline]
    fn cmp(&self, other: &GeneratedAs) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for GeneratedAs {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
2150#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2151#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for GeneratedAs {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Always => {}
                            Self::ByDefault => {}
                            Self::ExpStored => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for GeneratedAs {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Always => {}
                            Self::ByDefault => {}
                            Self::ExpStored => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2152pub enum GeneratedAs {
2153    /// `GENERATED ALWAYS`
2154    Always,
2155    /// `GENERATED BY DEFAULT`
2156    ByDefault,
2157    /// Expression-based generated column that is stored (used internally for expression-stored columns)
2158    ExpStored,
2159}
2160
2161/// `GeneratedExpressionMode`s are modifiers that follow an expression in a `generated`.
2162/// No modifier is typically the same as Virtual.
2163#[derive(#[automatically_derived]
impl ::core::fmt::Debug for GeneratedExpressionMode {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                GeneratedExpressionMode::Virtual => "Virtual",
                GeneratedExpressionMode::Stored => "Stored",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for GeneratedExpressionMode {
    #[inline]
    fn clone(&self) -> GeneratedExpressionMode { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for GeneratedExpressionMode { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for GeneratedExpressionMode {
    #[inline]
    fn eq(&self, other: &GeneratedExpressionMode) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for GeneratedExpressionMode {
    #[inline]
    fn partial_cmp(&self, other: &GeneratedExpressionMode)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for GeneratedExpressionMode {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for GeneratedExpressionMode {
    #[inline]
    fn cmp(&self, other: &GeneratedExpressionMode) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for GeneratedExpressionMode {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
2164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2165#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for GeneratedExpressionMode {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Virtual => {} Self::Stored => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for GeneratedExpressionMode {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Virtual => {} Self::Stored => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2166pub enum GeneratedExpressionMode {
2167    /// `VIRTUAL` generated expression
2168    Virtual,
2169    /// `STORED` generated expression
2170    Stored,
2171}
2172
2173#[must_use]
2174pub(crate) fn display_constraint_name(name: &'_ Option<Ident>) -> impl fmt::Display + '_ {
2175    struct ConstraintName<'a>(&'a Option<Ident>);
2176    impl fmt::Display for ConstraintName<'_> {
2177        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2178            if let Some(name) = self.0 {
2179                f.write_fmt(format_args!("CONSTRAINT {0} ", name))write!(f, "CONSTRAINT {name} ")?;
2180            }
2181            Ok(())
2182        }
2183    }
2184    ConstraintName(name)
2185}
2186
2187/// If `option` is
2188/// * `Some(inner)` => create display struct for `"{prefix}{inner}{postfix}"`
2189/// * `_` => do nothing
2190#[must_use]
2191pub(crate) fn display_option<'a, T: fmt::Display>(
2192    prefix: &'a str,
2193    postfix: &'a str,
2194    option: &'a Option<T>,
2195) -> impl fmt::Display + 'a {
2196    struct OptionDisplay<'a, T>(&'a str, &'a str, &'a Option<T>);
2197    impl<T: fmt::Display> fmt::Display for OptionDisplay<'_, T> {
2198        fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2199            if let Some(inner) = self.2 {
2200                let (prefix, postfix) = (self.0, self.1);
2201                f.write_fmt(format_args!("{0}{1}{2}", prefix, inner, postfix))write!(f, "{prefix}{inner}{postfix}")?;
2202            }
2203            Ok(())
2204        }
2205    }
2206    OptionDisplay(prefix, postfix, option)
2207}
2208
2209/// If `option` is
2210/// * `Some(inner)` => create display struct for `" {inner}"`
2211/// * `_` => do nothing
2212#[must_use]
2213pub(crate) fn display_option_spaced<T: fmt::Display>(option: &Option<T>) -> impl fmt::Display + '_ {
2214    display_option(" ", "", option)
2215}
2216
2217/// `<constraint_characteristics> = [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ] [ ENFORCED | NOT ENFORCED ]`
2218///
2219/// Used in UNIQUE and foreign key constraints. The individual settings may occur in any order.
2220#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ConstraintCharacteristics {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "ConstraintCharacteristics", "deferrable", &self.deferrable,
            "initially", &self.initially, "enforced", &&self.enforced)
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for ConstraintCharacteristics { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ConstraintCharacteristics {
    #[inline]
    fn clone(&self) -> ConstraintCharacteristics {
        let _: ::core::clone::AssertParamIsClone<Option<bool>>;
        let _: ::core::clone::AssertParamIsClone<Option<DeferrableInitial>>;
        let _: ::core::clone::AssertParamIsClone<Option<bool>>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ConstraintCharacteristics {
    #[inline]
    fn eq(&self, other: &ConstraintCharacteristics) -> bool {
        self.deferrable == other.deferrable &&
                self.initially == other.initially &&
            self.enforced == other.enforced
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ConstraintCharacteristics {
    #[inline]
    fn partial_cmp(&self, other: &ConstraintCharacteristics)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.deferrable,
                &other.deferrable) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.initially,
                        &other.initially) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.enforced,
                            &other.enforced),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::default::Default for ConstraintCharacteristics {
    #[inline]
    fn default() -> ConstraintCharacteristics {
        ConstraintCharacteristics {
            deferrable: ::core::default::Default::default(),
            initially: ::core::default::Default::default(),
            enforced: ::core::default::Default::default(),
        }
    }
}Default, #[automatically_derived]
impl ::core::cmp::Eq for ConstraintCharacteristics {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DeferrableInitial>>;
        let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ConstraintCharacteristics {
    #[inline]
    fn cmp(&self, other: &ConstraintCharacteristics)
        -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.deferrable, &other.deferrable) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.initially, &other.initially)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.enforced, &other.enforced),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ConstraintCharacteristics {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.deferrable, state);
        ::core::hash::Hash::hash(&self.initially, state);
        ::core::hash::Hash::hash(&self.enforced, state)
    }
}Hash)]
2221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2222#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ConstraintCharacteristics {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.deferrable, visitor)?;
                        sqlparser::ast::Visit::visit(&self.initially, visitor)?;
                        sqlparser::ast::Visit::visit(&self.enforced, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ConstraintCharacteristics {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.deferrable,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.initially,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.enforced,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2223pub struct ConstraintCharacteristics {
2224    /// `[ DEFERRABLE | NOT DEFERRABLE ]`
2225    pub deferrable: Option<bool>,
2226    /// `[ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]`
2227    pub initially: Option<DeferrableInitial>,
2228    /// `[ ENFORCED | NOT ENFORCED ]`
2229    pub enforced: Option<bool>,
2230}
2231
2232/// Initial setting for deferrable constraints (`INITIALLY IMMEDIATE` or `INITIALLY DEFERRED`).
2233#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DeferrableInitial {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                DeferrableInitial::Immediate => "Immediate",
                DeferrableInitial::Deferred => "Deferred",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for DeferrableInitial { }Copy, #[automatically_derived]
impl ::core::clone::Clone for DeferrableInitial {
    #[inline]
    fn clone(&self) -> DeferrableInitial { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DeferrableInitial {
    #[inline]
    fn eq(&self, other: &DeferrableInitial) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DeferrableInitial {
    #[inline]
    fn partial_cmp(&self, other: &DeferrableInitial)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DeferrableInitial {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DeferrableInitial {
    #[inline]
    fn cmp(&self, other: &DeferrableInitial) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DeferrableInitial {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
2234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2235#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DeferrableInitial {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Immediate => {} Self::Deferred => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DeferrableInitial {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Immediate => {} Self::Deferred => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2236pub enum DeferrableInitial {
2237    /// `INITIALLY IMMEDIATE`
2238    Immediate,
2239    /// `INITIALLY DEFERRED`
2240    Deferred,
2241}
2242
2243impl ConstraintCharacteristics {
2244    fn deferrable_text(&self) -> Option<&'static str> {
2245        self.deferrable.map(|deferrable| {
2246            if deferrable {
2247                "DEFERRABLE"
2248            } else {
2249                "NOT DEFERRABLE"
2250            }
2251        })
2252    }
2253
2254    fn initially_immediate_text(&self) -> Option<&'static str> {
2255        self.initially
2256            .map(|initially_immediate| match initially_immediate {
2257                DeferrableInitial::Immediate => "INITIALLY IMMEDIATE",
2258                DeferrableInitial::Deferred => "INITIALLY DEFERRED",
2259            })
2260    }
2261
2262    fn enforced_text(&self) -> Option<&'static str> {
2263        self.enforced.map(
2264            |enforced| {
2265                if enforced {
2266                    "ENFORCED"
2267                } else {
2268                    "NOT ENFORCED"
2269                }
2270            },
2271        )
2272    }
2273}
2274
2275impl fmt::Display for ConstraintCharacteristics {
2276    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2277        let deferrable = self.deferrable_text();
2278        let initially_immediate = self.initially_immediate_text();
2279        let enforced = self.enforced_text();
2280
2281        match (deferrable, initially_immediate, enforced) {
2282            (None, None, None) => Ok(()),
2283            (None, None, Some(enforced)) => f.write_fmt(format_args!("{0}", enforced))write!(f, "{enforced}"),
2284            (None, Some(initial), None) => f.write_fmt(format_args!("{0}", initial))write!(f, "{initial}"),
2285            (None, Some(initial), Some(enforced)) => f.write_fmt(format_args!("{0} {1}", initial, enforced))write!(f, "{initial} {enforced}"),
2286            (Some(deferrable), None, None) => f.write_fmt(format_args!("{0}", deferrable))write!(f, "{deferrable}"),
2287            (Some(deferrable), None, Some(enforced)) => f.write_fmt(format_args!("{0} {1}", deferrable, enforced))write!(f, "{deferrable} {enforced}"),
2288            (Some(deferrable), Some(initial), None) => f.write_fmt(format_args!("{0} {1}", deferrable, initial))write!(f, "{deferrable} {initial}"),
2289            (Some(deferrable), Some(initial), Some(enforced)) => {
2290                f.write_fmt(format_args!("{0} {1} {2}", deferrable, initial, enforced))write!(f, "{deferrable} {initial} {enforced}")
2291            }
2292        }
2293    }
2294}
2295
2296/// `<referential_action> =
2297/// { RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT }`
2298///
2299/// Used in foreign key constraints in `ON UPDATE` and `ON DELETE` options.
2300#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ReferentialAction {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                ReferentialAction::Restrict => "Restrict",
                ReferentialAction::Cascade => "Cascade",
                ReferentialAction::SetNull => "SetNull",
                ReferentialAction::NoAction => "NoAction",
                ReferentialAction::SetDefault => "SetDefault",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for ReferentialAction { }Copy, #[automatically_derived]
impl ::core::clone::Clone for ReferentialAction {
    #[inline]
    fn clone(&self) -> ReferentialAction { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ReferentialAction {
    #[inline]
    fn eq(&self, other: &ReferentialAction) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ReferentialAction {
    #[inline]
    fn partial_cmp(&self, other: &ReferentialAction)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ReferentialAction {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ReferentialAction {
    #[inline]
    fn cmp(&self, other: &ReferentialAction) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ReferentialAction {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
2301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2302#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ReferentialAction {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Restrict => {}
                            Self::Cascade => {}
                            Self::SetNull => {}
                            Self::NoAction => {}
                            Self::SetDefault => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ReferentialAction {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Restrict => {}
                            Self::Cascade => {}
                            Self::SetNull => {}
                            Self::NoAction => {}
                            Self::SetDefault => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2303pub enum ReferentialAction {
2304    /// `RESTRICT` - disallow action if it would break referential integrity.
2305    Restrict,
2306    /// `CASCADE` - propagate the action to referencing rows.
2307    Cascade,
2308    /// `SET NULL` - set referencing columns to NULL.
2309    SetNull,
2310    /// `NO ACTION` - no action at the time; may be deferred.
2311    NoAction,
2312    /// `SET DEFAULT` - set referencing columns to their default values.
2313    SetDefault,
2314}
2315
2316impl fmt::Display for ReferentialAction {
2317    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2318        f.write_str(match self {
2319            ReferentialAction::Restrict => "RESTRICT",
2320            ReferentialAction::Cascade => "CASCADE",
2321            ReferentialAction::SetNull => "SET NULL",
2322            ReferentialAction::NoAction => "NO ACTION",
2323            ReferentialAction::SetDefault => "SET DEFAULT",
2324        })
2325    }
2326}
2327
2328/// `<drop behavior> ::= CASCADE | RESTRICT`.
2329///
2330/// Used in `DROP` statements.
2331#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropBehavior {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                DropBehavior::Restrict => "Restrict",
                DropBehavior::Cascade => "Cascade",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for DropBehavior { }Copy, #[automatically_derived]
impl ::core::clone::Clone for DropBehavior {
    #[inline]
    fn clone(&self) -> DropBehavior { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropBehavior {
    #[inline]
    fn eq(&self, other: &DropBehavior) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropBehavior {
    #[inline]
    fn partial_cmp(&self, other: &DropBehavior)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropBehavior {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropBehavior {
    #[inline]
    fn cmp(&self, other: &DropBehavior) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropBehavior {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
2332#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2333#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropBehavior {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Restrict => {} Self::Cascade => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropBehavior {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self { Self::Restrict => {} Self::Cascade => {} }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2334pub enum DropBehavior {
2335    /// `RESTRICT` - refuse to drop if there are any dependent objects.
2336    Restrict,
2337    /// `CASCADE` - automatically drop objects that depend on the object being dropped.
2338    Cascade,
2339}
2340
2341impl fmt::Display for DropBehavior {
2342    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2343        f.write_str(match self {
2344            DropBehavior::Restrict => "RESTRICT",
2345            DropBehavior::Cascade => "CASCADE",
2346        })
2347    }
2348}
2349
2350/// SQL user defined type definition
2351#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UserDefinedTypeRepresentation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            UserDefinedTypeRepresentation::Composite { attributes: __self_0 }
                =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "Composite", "attributes", &__self_0),
            UserDefinedTypeRepresentation::Enum { labels: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Enum",
                    "labels", &__self_0),
            UserDefinedTypeRepresentation::Range { options: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Range",
                    "options", &__self_0),
            UserDefinedTypeRepresentation::SqlDefinition { options: __self_0 }
                =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SqlDefinition", "options", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for UserDefinedTypeRepresentation {
    #[inline]
    fn clone(&self) -> UserDefinedTypeRepresentation {
        match self {
            UserDefinedTypeRepresentation::Composite { attributes: __self_0 }
                =>
                UserDefinedTypeRepresentation::Composite {
                    attributes: ::core::clone::Clone::clone(__self_0),
                },
            UserDefinedTypeRepresentation::Enum { labels: __self_0 } =>
                UserDefinedTypeRepresentation::Enum {
                    labels: ::core::clone::Clone::clone(__self_0),
                },
            UserDefinedTypeRepresentation::Range { options: __self_0 } =>
                UserDefinedTypeRepresentation::Range {
                    options: ::core::clone::Clone::clone(__self_0),
                },
            UserDefinedTypeRepresentation::SqlDefinition { options: __self_0 }
                =>
                UserDefinedTypeRepresentation::SqlDefinition {
                    options: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UserDefinedTypeRepresentation {
    #[inline]
    fn eq(&self, other: &UserDefinedTypeRepresentation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (UserDefinedTypeRepresentation::Composite {
                    attributes: __self_0 },
                    UserDefinedTypeRepresentation::Composite {
                    attributes: __arg1_0 }) => __self_0 == __arg1_0,
                (UserDefinedTypeRepresentation::Enum { labels: __self_0 },
                    UserDefinedTypeRepresentation::Enum { labels: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeRepresentation::Range { options: __self_0 },
                    UserDefinedTypeRepresentation::Range { options: __arg1_0 })
                    => __self_0 == __arg1_0,
                (UserDefinedTypeRepresentation::SqlDefinition {
                    options: __self_0 },
                    UserDefinedTypeRepresentation::SqlDefinition {
                    options: __arg1_0 }) => __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UserDefinedTypeRepresentation {
    #[inline]
    fn partial_cmp(&self, other: &UserDefinedTypeRepresentation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (UserDefinedTypeRepresentation::Composite { attributes: __self_0
                }, UserDefinedTypeRepresentation::Composite {
                attributes: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRepresentation::Enum { labels: __self_0 },
                UserDefinedTypeRepresentation::Enum { labels: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRepresentation::Range { options: __self_0 },
                UserDefinedTypeRepresentation::Range { options: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRepresentation::SqlDefinition { options: __self_0
                }, UserDefinedTypeRepresentation::SqlDefinition {
                options: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UserDefinedTypeRepresentation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _:
                ::core::cmp::AssertParamIsEq<Vec<UserDefinedTypeCompositeAttributeDef>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<UserDefinedTypeRangeOption>>;
        let _:
                ::core::cmp::AssertParamIsEq<Vec<UserDefinedTypeSqlDefinitionOption>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UserDefinedTypeRepresentation {
    #[inline]
    fn cmp(&self, other: &UserDefinedTypeRepresentation)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (UserDefinedTypeRepresentation::Composite {
                        attributes: __self_0 },
                        UserDefinedTypeRepresentation::Composite {
                        attributes: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRepresentation::Enum { labels: __self_0 },
                        UserDefinedTypeRepresentation::Enum { labels: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRepresentation::Range { options: __self_0 },
                        UserDefinedTypeRepresentation::Range { options: __arg1_0 })
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRepresentation::SqlDefinition {
                        options: __self_0 },
                        UserDefinedTypeRepresentation::SqlDefinition {
                        options: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UserDefinedTypeRepresentation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            UserDefinedTypeRepresentation::Composite { attributes: __self_0 }
                => ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRepresentation::Enum { labels: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRepresentation::Range { options: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRepresentation::SqlDefinition { options: __self_0 }
                => ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
2352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2353#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UserDefinedTypeRepresentation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Composite { attributes } => {
                                sqlparser::ast::Visit::visit(attributes, visitor)?;
                            }
                            Self::Enum { labels } => {
                                sqlparser::ast::Visit::visit(labels, visitor)?;
                            }
                            Self::Range { options } => {
                                sqlparser::ast::Visit::visit(options, visitor)?;
                            }
                            Self::SqlDefinition { options } => {
                                sqlparser::ast::Visit::visit(options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for UserDefinedTypeRepresentation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Composite { attributes } => {
                                sqlparser::ast::VisitMut::visit(attributes, visitor)?;
                            }
                            Self::Enum { labels } => {
                                sqlparser::ast::VisitMut::visit(labels, visitor)?;
                            }
                            Self::Range { options } => {
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                            }
                            Self::SqlDefinition { options } => {
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2354pub enum UserDefinedTypeRepresentation {
2355    /// Composite type: `CREATE TYPE name AS (attributes)`
2356    Composite {
2357        /// List of attributes for the composite type.
2358        attributes: Vec<UserDefinedTypeCompositeAttributeDef>,
2359    },
2360    /// Enum type: `CREATE TYPE name AS ENUM (labels)`
2361    ///
2362    /// Note: this is PostgreSQL-specific. See <https://www.postgresql.org/docs/current/sql-createtype.html>
2363    /// Enum type: `CREATE TYPE name AS ENUM (labels)`
2364    Enum {
2365        /// Labels that make up the enum type.
2366        labels: Vec<Ident>,
2367    },
2368    /// Range type: `CREATE TYPE name AS RANGE (options)`
2369    ///
2370    /// Note: this is PostgreSQL-specific. See <https://www.postgresql.org/docs/current/sql-createtype.html>
2371    Range {
2372        /// Options for the range type definition.
2373        options: Vec<UserDefinedTypeRangeOption>,
2374    },
2375    /// Base type (SQL definition): `CREATE TYPE name (options)`
2376    ///
2377    /// Note the lack of `AS` keyword
2378    ///
2379    /// Note: this is PostgreSQL-specific. See <https://www.postgresql.org/docs/current/sql-createtype.html>
2380    SqlDefinition {
2381        /// Options for SQL definition of the user-defined type.
2382        options: Vec<UserDefinedTypeSqlDefinitionOption>,
2383    },
2384}
2385
2386impl fmt::Display for UserDefinedTypeRepresentation {
2387    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2388        match self {
2389            Self::Composite { attributes } => {
2390                f.write_fmt(format_args!("AS ({0})", display_comma_separated(attributes)))write!(f, "AS ({})", display_comma_separated(attributes))
2391            }
2392            Self::Enum { labels } => {
2393                f.write_fmt(format_args!("AS ENUM ({0})", display_comma_separated(labels)))write!(f, "AS ENUM ({})", display_comma_separated(labels))
2394            }
2395            Self::Range { options } => {
2396                f.write_fmt(format_args!("AS RANGE ({0})", display_comma_separated(options)))write!(f, "AS RANGE ({})", display_comma_separated(options))
2397            }
2398            Self::SqlDefinition { options } => {
2399                f.write_fmt(format_args!("({0})", display_comma_separated(options)))write!(f, "({})", display_comma_separated(options))
2400            }
2401        }
2402    }
2403}
2404
2405/// SQL user defined type attribute definition
2406#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UserDefinedTypeCompositeAttributeDef {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "UserDefinedTypeCompositeAttributeDef", "name", &self.name,
            "data_type", &self.data_type, "collation", &&self.collation)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for UserDefinedTypeCompositeAttributeDef {
    #[inline]
    fn clone(&self) -> UserDefinedTypeCompositeAttributeDef {
        UserDefinedTypeCompositeAttributeDef {
            name: ::core::clone::Clone::clone(&self.name),
            data_type: ::core::clone::Clone::clone(&self.data_type),
            collation: ::core::clone::Clone::clone(&self.collation),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UserDefinedTypeCompositeAttributeDef {
    #[inline]
    fn eq(&self, other: &UserDefinedTypeCompositeAttributeDef) -> bool {
        self.name == other.name && self.data_type == other.data_type &&
            self.collation == other.collation
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UserDefinedTypeCompositeAttributeDef {
    #[inline]
    fn partial_cmp(&self, other: &UserDefinedTypeCompositeAttributeDef)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
                        &other.data_type) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.collation,
                            &other.collation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UserDefinedTypeCompositeAttributeDef {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UserDefinedTypeCompositeAttributeDef {
    #[inline]
    fn cmp(&self, other: &UserDefinedTypeCompositeAttributeDef)
        -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.data_type, &other.data_type)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.collation, &other.collation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UserDefinedTypeCompositeAttributeDef {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.data_type, state);
        ::core::hash::Hash::hash(&self.collation, state)
    }
}Hash)]
2407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2408#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UserDefinedTypeCompositeAttributeDef {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.collation, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for UserDefinedTypeCompositeAttributeDef {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.data_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.collation,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2409pub struct UserDefinedTypeCompositeAttributeDef {
2410    /// Attribute name.
2411    pub name: Ident,
2412    /// Attribute data type.
2413    pub data_type: DataType,
2414    /// Optional collation for the attribute.
2415    pub collation: Option<ObjectName>,
2416}
2417
2418impl fmt::Display for UserDefinedTypeCompositeAttributeDef {
2419    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2420        f.write_fmt(format_args!("{0} {1}", self.name, self.data_type))write!(f, "{} {}", self.name, self.data_type)?;
2421        if let Some(collation) = &self.collation {
2422            f.write_fmt(format_args!(" COLLATE {0}", collation))write!(f, " COLLATE {collation}")?;
2423        }
2424        Ok(())
2425    }
2426}
2427
2428/// Internal length specification for PostgreSQL user-defined base types.
2429///
2430/// Specifies the internal length in bytes of the new type's internal representation.
2431/// The default assumption is that it is variable-length.
2432///
2433/// # PostgreSQL Documentation
2434/// See: <https://www.postgresql.org/docs/current/sql-createtype.html>
2435///
2436/// # Examples
2437/// ```sql
2438/// CREATE TYPE mytype (
2439///     INPUT = in_func,
2440///     OUTPUT = out_func,
2441///     INTERNALLENGTH = 16  -- Fixed 16-byte length
2442/// );
2443///
2444/// CREATE TYPE mytype2 (
2445///     INPUT = in_func,
2446///     OUTPUT = out_func,
2447///     INTERNALLENGTH = VARIABLE  -- Variable length
2448/// );
2449/// ```
2450#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UserDefinedTypeInternalLength {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            UserDefinedTypeInternalLength::Fixed(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Fixed",
                    &__self_0),
            UserDefinedTypeInternalLength::Variable =>
                ::core::fmt::Formatter::write_str(f, "Variable"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for UserDefinedTypeInternalLength { }Copy, #[automatically_derived]
impl ::core::clone::Clone for UserDefinedTypeInternalLength {
    #[inline]
    fn clone(&self) -> UserDefinedTypeInternalLength {
        let _: ::core::clone::AssertParamIsClone<u64>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UserDefinedTypeInternalLength {
    #[inline]
    fn eq(&self, other: &UserDefinedTypeInternalLength) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (UserDefinedTypeInternalLength::Fixed(__self_0),
                    UserDefinedTypeInternalLength::Fixed(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UserDefinedTypeInternalLength {
    #[inline]
    fn partial_cmp(&self, other: &UserDefinedTypeInternalLength)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (UserDefinedTypeInternalLength::Fixed(__self_0),
                UserDefinedTypeInternalLength::Fixed(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UserDefinedTypeInternalLength {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u64>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UserDefinedTypeInternalLength {
    #[inline]
    fn cmp(&self, other: &UserDefinedTypeInternalLength)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (UserDefinedTypeInternalLength::Fixed(__self_0),
                        UserDefinedTypeInternalLength::Fixed(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UserDefinedTypeInternalLength {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            UserDefinedTypeInternalLength::Fixed(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
2451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2452#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UserDefinedTypeInternalLength {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Fixed(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Variable => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for UserDefinedTypeInternalLength {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Fixed(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Variable => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2453pub enum UserDefinedTypeInternalLength {
2454    /// Fixed internal length: `INTERNALLENGTH = <number>`
2455    Fixed(u64),
2456    /// Variable internal length: `INTERNALLENGTH = VARIABLE`
2457    Variable,
2458}
2459
2460impl fmt::Display for UserDefinedTypeInternalLength {
2461    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2462        match self {
2463            UserDefinedTypeInternalLength::Fixed(n) => f.write_fmt(format_args!("{0}", n))write!(f, "{}", n),
2464            UserDefinedTypeInternalLength::Variable => f.write_fmt(format_args!("VARIABLE"))write!(f, "VARIABLE"),
2465        }
2466    }
2467}
2468
2469/// Alignment specification for PostgreSQL user-defined base types.
2470///
2471/// Specifies the storage alignment requirement for values of the data type.
2472/// The allowed values equate to alignment on 1, 2, 4, or 8 byte boundaries.
2473/// Note that variable-length types must have an alignment of at least 4, since
2474/// they necessarily contain an int4 as their first component.
2475///
2476/// # PostgreSQL Documentation
2477/// See: <https://www.postgresql.org/docs/current/sql-createtype.html>
2478///
2479/// # Examples
2480/// ```sql
2481/// CREATE TYPE mytype (
2482///     INPUT = in_func,
2483///     OUTPUT = out_func,
2484///     ALIGNMENT = int4  -- 4-byte alignment
2485/// );
2486/// ```
2487#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Alignment {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                Alignment::Char => "Char",
                Alignment::Int2 => "Int2",
                Alignment::Int4 => "Int4",
                Alignment::Double => "Double",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for Alignment { }Copy, #[automatically_derived]
impl ::core::clone::Clone for Alignment {
    #[inline]
    fn clone(&self) -> Alignment { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Alignment {
    #[inline]
    fn eq(&self, other: &Alignment) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Alignment {
    #[inline]
    fn partial_cmp(&self, other: &Alignment)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Alignment {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Alignment {
    #[inline]
    fn cmp(&self, other: &Alignment) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Alignment {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
2488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2489#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Alignment {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Char => {}
                            Self::Int2 => {}
                            Self::Int4 => {}
                            Self::Double => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for Alignment {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Char => {}
                            Self::Int2 => {}
                            Self::Int4 => {}
                            Self::Double => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2490pub enum Alignment {
2491    /// Single-byte alignment: `ALIGNMENT = char`
2492    Char,
2493    /// 2-byte alignment: `ALIGNMENT = int2`
2494    Int2,
2495    /// 4-byte alignment: `ALIGNMENT = int4`
2496    Int4,
2497    /// 8-byte alignment: `ALIGNMENT = double`
2498    Double,
2499}
2500
2501impl fmt::Display for Alignment {
2502    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2503        match self {
2504            Alignment::Char => f.write_fmt(format_args!("char"))write!(f, "char"),
2505            Alignment::Int2 => f.write_fmt(format_args!("int2"))write!(f, "int2"),
2506            Alignment::Int4 => f.write_fmt(format_args!("int4"))write!(f, "int4"),
2507            Alignment::Double => f.write_fmt(format_args!("double"))write!(f, "double"),
2508        }
2509    }
2510}
2511
2512/// Storage specification for PostgreSQL user-defined base types.
2513///
2514/// Specifies the storage strategy for values of the data type:
2515/// - `plain`: Prevents compression and out-of-line storage (for fixed-length types)
2516/// - `external`: Allows out-of-line storage but not compression
2517/// - `extended`: Allows both compression and out-of-line storage (default for most types)
2518/// - `main`: Allows compression but discourages out-of-line storage
2519///
2520/// # PostgreSQL Documentation
2521/// See: <https://www.postgresql.org/docs/current/sql-createtype.html>
2522///
2523/// # Examples
2524/// ```sql
2525/// CREATE TYPE mytype (
2526///     INPUT = in_func,
2527///     OUTPUT = out_func,
2528///     STORAGE = plain
2529/// );
2530/// ```
2531#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UserDefinedTypeStorage {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                UserDefinedTypeStorage::Plain => "Plain",
                UserDefinedTypeStorage::External => "External",
                UserDefinedTypeStorage::Extended => "Extended",
                UserDefinedTypeStorage::Main => "Main",
            })
    }
}Debug, #[automatically_derived]
impl ::core::marker::Copy for UserDefinedTypeStorage { }Copy, #[automatically_derived]
impl ::core::clone::Clone for UserDefinedTypeStorage {
    #[inline]
    fn clone(&self) -> UserDefinedTypeStorage { *self }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UserDefinedTypeStorage {
    #[inline]
    fn eq(&self, other: &UserDefinedTypeStorage) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UserDefinedTypeStorage {
    #[inline]
    fn partial_cmp(&self, other: &UserDefinedTypeStorage)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UserDefinedTypeStorage {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UserDefinedTypeStorage {
    #[inline]
    fn cmp(&self, other: &UserDefinedTypeStorage) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UserDefinedTypeStorage {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
2532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2533#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UserDefinedTypeStorage {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Plain => {}
                            Self::External => {}
                            Self::Extended => {}
                            Self::Main => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for UserDefinedTypeStorage {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Plain => {}
                            Self::External => {}
                            Self::Extended => {}
                            Self::Main => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2534pub enum UserDefinedTypeStorage {
2535    /// No compression or out-of-line storage: `STORAGE = plain`
2536    Plain,
2537    /// Out-of-line storage allowed, no compression: `STORAGE = external`
2538    External,
2539    /// Both compression and out-of-line storage allowed: `STORAGE = extended`
2540    Extended,
2541    /// Compression allowed, out-of-line discouraged: `STORAGE = main`
2542    Main,
2543}
2544
2545impl fmt::Display for UserDefinedTypeStorage {
2546    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2547        match self {
2548            UserDefinedTypeStorage::Plain => f.write_fmt(format_args!("plain"))write!(f, "plain"),
2549            UserDefinedTypeStorage::External => f.write_fmt(format_args!("external"))write!(f, "external"),
2550            UserDefinedTypeStorage::Extended => f.write_fmt(format_args!("extended"))write!(f, "extended"),
2551            UserDefinedTypeStorage::Main => f.write_fmt(format_args!("main"))write!(f, "main"),
2552        }
2553    }
2554}
2555
2556/// Options for PostgreSQL `CREATE TYPE ... AS RANGE` statement.
2557///
2558/// Range types are data types representing a range of values of some element type
2559/// (called the range's subtype). These options configure the behavior of the range type.
2560///
2561/// # PostgreSQL Documentation
2562/// See: <https://www.postgresql.org/docs/current/sql-createtype.html>
2563///
2564/// # Examples
2565/// ```sql
2566/// CREATE TYPE int4range AS RANGE (
2567///     SUBTYPE = int4,
2568///     SUBTYPE_OPCLASS = int4_ops,
2569///     CANONICAL = int4range_canonical,
2570///     SUBTYPE_DIFF = int4range_subdiff
2571/// );
2572/// ```
2573#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UserDefinedTypeRangeOption {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            UserDefinedTypeRangeOption::Subtype(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Subtype", &__self_0),
            UserDefinedTypeRangeOption::SubtypeOpClass(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "SubtypeOpClass", &__self_0),
            UserDefinedTypeRangeOption::Collation(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Collation", &__self_0),
            UserDefinedTypeRangeOption::Canonical(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Canonical", &__self_0),
            UserDefinedTypeRangeOption::SubtypeDiff(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "SubtypeDiff", &__self_0),
            UserDefinedTypeRangeOption::MultirangeTypeName(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "MultirangeTypeName", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for UserDefinedTypeRangeOption {
    #[inline]
    fn clone(&self) -> UserDefinedTypeRangeOption {
        match self {
            UserDefinedTypeRangeOption::Subtype(__self_0) =>
                UserDefinedTypeRangeOption::Subtype(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeRangeOption::SubtypeOpClass(__self_0) =>
                UserDefinedTypeRangeOption::SubtypeOpClass(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeRangeOption::Collation(__self_0) =>
                UserDefinedTypeRangeOption::Collation(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeRangeOption::Canonical(__self_0) =>
                UserDefinedTypeRangeOption::Canonical(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeRangeOption::SubtypeDiff(__self_0) =>
                UserDefinedTypeRangeOption::SubtypeDiff(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeRangeOption::MultirangeTypeName(__self_0) =>
                UserDefinedTypeRangeOption::MultirangeTypeName(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UserDefinedTypeRangeOption {
    #[inline]
    fn eq(&self, other: &UserDefinedTypeRangeOption) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (UserDefinedTypeRangeOption::Subtype(__self_0),
                    UserDefinedTypeRangeOption::Subtype(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeRangeOption::SubtypeOpClass(__self_0),
                    UserDefinedTypeRangeOption::SubtypeOpClass(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeRangeOption::Collation(__self_0),
                    UserDefinedTypeRangeOption::Collation(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeRangeOption::Canonical(__self_0),
                    UserDefinedTypeRangeOption::Canonical(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeRangeOption::SubtypeDiff(__self_0),
                    UserDefinedTypeRangeOption::SubtypeDiff(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeRangeOption::MultirangeTypeName(__self_0),
                    UserDefinedTypeRangeOption::MultirangeTypeName(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UserDefinedTypeRangeOption {
    #[inline]
    fn partial_cmp(&self, other: &UserDefinedTypeRangeOption)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (UserDefinedTypeRangeOption::Subtype(__self_0),
                UserDefinedTypeRangeOption::Subtype(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRangeOption::SubtypeOpClass(__self_0),
                UserDefinedTypeRangeOption::SubtypeOpClass(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRangeOption::Collation(__self_0),
                UserDefinedTypeRangeOption::Collation(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRangeOption::Canonical(__self_0),
                UserDefinedTypeRangeOption::Canonical(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRangeOption::SubtypeDiff(__self_0),
                UserDefinedTypeRangeOption::SubtypeDiff(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeRangeOption::MultirangeTypeName(__self_0),
                UserDefinedTypeRangeOption::MultirangeTypeName(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UserDefinedTypeRangeOption {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UserDefinedTypeRangeOption {
    #[inline]
    fn cmp(&self, other: &UserDefinedTypeRangeOption)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (UserDefinedTypeRangeOption::Subtype(__self_0),
                        UserDefinedTypeRangeOption::Subtype(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRangeOption::SubtypeOpClass(__self_0),
                        UserDefinedTypeRangeOption::SubtypeOpClass(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRangeOption::Collation(__self_0),
                        UserDefinedTypeRangeOption::Collation(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRangeOption::Canonical(__self_0),
                        UserDefinedTypeRangeOption::Canonical(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRangeOption::SubtypeDiff(__self_0),
                        UserDefinedTypeRangeOption::SubtypeDiff(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeRangeOption::MultirangeTypeName(__self_0),
                        UserDefinedTypeRangeOption::MultirangeTypeName(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UserDefinedTypeRangeOption {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            UserDefinedTypeRangeOption::Subtype(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRangeOption::SubtypeOpClass(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRangeOption::Collation(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRangeOption::Canonical(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRangeOption::SubtypeDiff(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeRangeOption::MultirangeTypeName(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
2574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2575#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UserDefinedTypeRangeOption {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Subtype(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::SubtypeOpClass(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Collation(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Canonical(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::SubtypeDiff(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::MultirangeTypeName(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for UserDefinedTypeRangeOption {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Subtype(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::SubtypeOpClass(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Collation(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Canonical(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::SubtypeDiff(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::MultirangeTypeName(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2576pub enum UserDefinedTypeRangeOption {
2577    /// The element type that the range type will represent: `SUBTYPE = subtype`
2578    Subtype(DataType),
2579    /// The operator class for the subtype: `SUBTYPE_OPCLASS = subtype_operator_class`
2580    SubtypeOpClass(ObjectName),
2581    /// Collation to use for ordering the subtype: `COLLATION = collation`
2582    Collation(ObjectName),
2583    /// Function to convert range values to canonical form: `CANONICAL = canonical_function`
2584    Canonical(ObjectName),
2585    /// Function to compute the difference between two subtype values: `SUBTYPE_DIFF = subtype_diff_function`
2586    SubtypeDiff(ObjectName),
2587    /// Name of the corresponding multirange type: `MULTIRANGE_TYPE_NAME = multirange_type_name`
2588    MultirangeTypeName(ObjectName),
2589}
2590
2591impl fmt::Display for UserDefinedTypeRangeOption {
2592    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2593        match self {
2594            UserDefinedTypeRangeOption::Subtype(dt) => f.write_fmt(format_args!("SUBTYPE = {0}", dt))write!(f, "SUBTYPE = {}", dt),
2595            UserDefinedTypeRangeOption::SubtypeOpClass(name) => {
2596                f.write_fmt(format_args!("SUBTYPE_OPCLASS = {0}", name))write!(f, "SUBTYPE_OPCLASS = {}", name)
2597            }
2598            UserDefinedTypeRangeOption::Collation(name) => f.write_fmt(format_args!("COLLATION = {0}", name))write!(f, "COLLATION = {}", name),
2599            UserDefinedTypeRangeOption::Canonical(name) => f.write_fmt(format_args!("CANONICAL = {0}", name))write!(f, "CANONICAL = {}", name),
2600            UserDefinedTypeRangeOption::SubtypeDiff(name) => f.write_fmt(format_args!("SUBTYPE_DIFF = {0}", name))write!(f, "SUBTYPE_DIFF = {}", name),
2601            UserDefinedTypeRangeOption::MultirangeTypeName(name) => {
2602                f.write_fmt(format_args!("MULTIRANGE_TYPE_NAME = {0}", name))write!(f, "MULTIRANGE_TYPE_NAME = {}", name)
2603            }
2604        }
2605    }
2606}
2607
2608/// Options for PostgreSQL `CREATE TYPE ... (<options>)` statement (base type definition).
2609///
2610/// Base types are the lowest-level data types in PostgreSQL. To define a new base type,
2611/// you must specify functions that convert it to and from text representation, and optionally
2612/// binary representation and other properties.
2613///
2614/// Note: This syntax uses parentheses directly after the type name, without the `AS` keyword.
2615///
2616/// # PostgreSQL Documentation
2617/// See: <https://www.postgresql.org/docs/current/sql-createtype.html>
2618///
2619/// # Examples
2620/// ```sql
2621/// CREATE TYPE complex (
2622///     INPUT = complex_in,
2623///     OUTPUT = complex_out,
2624///     INTERNALLENGTH = 16,
2625///     ALIGNMENT = double
2626/// );
2627/// ```
2628#[derive(#[automatically_derived]
impl ::core::fmt::Debug for UserDefinedTypeSqlDefinitionOption {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            UserDefinedTypeSqlDefinitionOption::Input(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Input",
                    &__self_0),
            UserDefinedTypeSqlDefinitionOption::Output(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Output",
                    &__self_0),
            UserDefinedTypeSqlDefinitionOption::Receive(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Receive", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Send(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Send",
                    &__self_0),
            UserDefinedTypeSqlDefinitionOption::TypmodIn(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "TypmodIn", &__self_0),
            UserDefinedTypeSqlDefinitionOption::TypmodOut(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "TypmodOut", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Analyze(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Analyze", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Subscript(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Subscript", &__self_0),
            UserDefinedTypeSqlDefinitionOption::InternalLength(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "InternalLength", &__self_0),
            UserDefinedTypeSqlDefinitionOption::PassedByValue =>
                ::core::fmt::Formatter::write_str(f, "PassedByValue"),
            UserDefinedTypeSqlDefinitionOption::Alignment(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Alignment", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Storage(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Storage", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Like(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Like",
                    &__self_0),
            UserDefinedTypeSqlDefinitionOption::Category(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Category", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Preferred(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Preferred", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Default(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Default", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Element(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Element", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Delimiter(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Delimiter", &__self_0),
            UserDefinedTypeSqlDefinitionOption::Collatable(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Collatable", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for UserDefinedTypeSqlDefinitionOption {
    #[inline]
    fn clone(&self) -> UserDefinedTypeSqlDefinitionOption {
        match self {
            UserDefinedTypeSqlDefinitionOption::Input(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Input(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Output(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Output(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Receive(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Receive(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Send(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Send(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::TypmodIn(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::TypmodIn(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::TypmodOut(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::TypmodOut(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Analyze(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Analyze(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Subscript(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Subscript(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::InternalLength(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::InternalLength(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::PassedByValue =>
                UserDefinedTypeSqlDefinitionOption::PassedByValue,
            UserDefinedTypeSqlDefinitionOption::Alignment(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Alignment(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Storage(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Storage(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Like(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Like(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Category(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Category(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Preferred(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Preferred(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Default(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Default(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Element(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Element(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Delimiter(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Delimiter(::core::clone::Clone::clone(__self_0)),
            UserDefinedTypeSqlDefinitionOption::Collatable(__self_0) =>
                UserDefinedTypeSqlDefinitionOption::Collatable(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for UserDefinedTypeSqlDefinitionOption {
    #[inline]
    fn eq(&self, other: &UserDefinedTypeSqlDefinitionOption) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (UserDefinedTypeSqlDefinitionOption::Input(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Input(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Output(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Output(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Receive(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Receive(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Send(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Send(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::TypmodIn(__self_0),
                    UserDefinedTypeSqlDefinitionOption::TypmodIn(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::TypmodOut(__self_0),
                    UserDefinedTypeSqlDefinitionOption::TypmodOut(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Analyze(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Analyze(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Subscript(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Subscript(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::InternalLength(__self_0),
                    UserDefinedTypeSqlDefinitionOption::InternalLength(__arg1_0))
                    => __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Alignment(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Alignment(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Storage(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Storage(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Like(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Like(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Category(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Category(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Preferred(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Preferred(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Default(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Default(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Element(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Element(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Delimiter(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Delimiter(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (UserDefinedTypeSqlDefinitionOption::Collatable(__self_0),
                    UserDefinedTypeSqlDefinitionOption::Collatable(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for UserDefinedTypeSqlDefinitionOption {
    #[inline]
    fn partial_cmp(&self, other: &UserDefinedTypeSqlDefinitionOption)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (UserDefinedTypeSqlDefinitionOption::Input(__self_0),
                UserDefinedTypeSqlDefinitionOption::Input(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Output(__self_0),
                UserDefinedTypeSqlDefinitionOption::Output(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Receive(__self_0),
                UserDefinedTypeSqlDefinitionOption::Receive(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Send(__self_0),
                UserDefinedTypeSqlDefinitionOption::Send(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::TypmodIn(__self_0),
                UserDefinedTypeSqlDefinitionOption::TypmodIn(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::TypmodOut(__self_0),
                UserDefinedTypeSqlDefinitionOption::TypmodOut(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Analyze(__self_0),
                UserDefinedTypeSqlDefinitionOption::Analyze(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Subscript(__self_0),
                UserDefinedTypeSqlDefinitionOption::Subscript(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::InternalLength(__self_0),
                UserDefinedTypeSqlDefinitionOption::InternalLength(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Alignment(__self_0),
                UserDefinedTypeSqlDefinitionOption::Alignment(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Storage(__self_0),
                UserDefinedTypeSqlDefinitionOption::Storage(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Like(__self_0),
                UserDefinedTypeSqlDefinitionOption::Like(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Category(__self_0),
                UserDefinedTypeSqlDefinitionOption::Category(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Preferred(__self_0),
                UserDefinedTypeSqlDefinitionOption::Preferred(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Default(__self_0),
                UserDefinedTypeSqlDefinitionOption::Default(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Element(__self_0),
                UserDefinedTypeSqlDefinitionOption::Element(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Delimiter(__self_0),
                UserDefinedTypeSqlDefinitionOption::Delimiter(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (UserDefinedTypeSqlDefinitionOption::Collatable(__self_0),
                UserDefinedTypeSqlDefinitionOption::Collatable(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for UserDefinedTypeSqlDefinitionOption {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<UserDefinedTypeInternalLength>;
        let _: ::core::cmp::AssertParamIsEq<Alignment>;
        let _: ::core::cmp::AssertParamIsEq<UserDefinedTypeStorage>;
        let _: ::core::cmp::AssertParamIsEq<char>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Expr>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<String>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for UserDefinedTypeSqlDefinitionOption {
    #[inline]
    fn cmp(&self, other: &UserDefinedTypeSqlDefinitionOption)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (UserDefinedTypeSqlDefinitionOption::Input(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Input(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Output(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Output(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Receive(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Receive(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Send(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Send(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::TypmodIn(__self_0),
                        UserDefinedTypeSqlDefinitionOption::TypmodIn(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::TypmodOut(__self_0),
                        UserDefinedTypeSqlDefinitionOption::TypmodOut(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Analyze(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Analyze(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Subscript(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Subscript(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::InternalLength(__self_0),
                        UserDefinedTypeSqlDefinitionOption::InternalLength(__arg1_0))
                        => ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Alignment(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Alignment(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Storage(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Storage(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Like(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Like(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Category(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Category(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Preferred(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Preferred(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Default(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Default(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Element(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Element(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Delimiter(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Delimiter(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (UserDefinedTypeSqlDefinitionOption::Collatable(__self_0),
                        UserDefinedTypeSqlDefinitionOption::Collatable(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for UserDefinedTypeSqlDefinitionOption {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            UserDefinedTypeSqlDefinitionOption::Input(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Output(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Receive(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Send(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::TypmodIn(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::TypmodOut(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Analyze(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Subscript(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::InternalLength(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Alignment(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Storage(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Like(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Category(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Preferred(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Default(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Element(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Delimiter(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            UserDefinedTypeSqlDefinitionOption::Collatable(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
2629#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2630#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for UserDefinedTypeSqlDefinitionOption {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Input(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Output(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Receive(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Send(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::TypmodIn(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::TypmodOut(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Analyze(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Subscript(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::InternalLength(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::PassedByValue => {}
                            Self::Alignment(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Storage(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Like(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Category(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Preferred(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Default(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Element(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Delimiter(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Collatable(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for UserDefinedTypeSqlDefinitionOption {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Input(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Output(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Receive(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Send(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::TypmodIn(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::TypmodOut(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Analyze(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Subscript(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::InternalLength(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::PassedByValue => {}
                            Self::Alignment(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Storage(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Like(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Category(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Preferred(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Default(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Element(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Delimiter(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Collatable(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2631pub enum UserDefinedTypeSqlDefinitionOption {
2632    /// Function to convert from external text representation to internal: `INPUT = input_function`
2633    Input(ObjectName),
2634    /// Function to convert from internal to external text representation: `OUTPUT = output_function`
2635    Output(ObjectName),
2636    /// Function to convert from external binary representation to internal: `RECEIVE = receive_function`
2637    Receive(ObjectName),
2638    /// Function to convert from internal to external binary representation: `SEND = send_function`
2639    Send(ObjectName),
2640    /// Function to convert type modifiers from text array to internal form: `TYPMOD_IN = type_modifier_input_function`
2641    TypmodIn(ObjectName),
2642    /// Function to convert type modifiers from internal to text form: `TYPMOD_OUT = type_modifier_output_function`
2643    TypmodOut(ObjectName),
2644    /// Function to compute statistics for the data type: `ANALYZE = analyze_function`
2645    Analyze(ObjectName),
2646    /// Function to handle subscripting operations: `SUBSCRIPT = subscript_function`
2647    Subscript(ObjectName),
2648    /// Internal storage size in bytes, or VARIABLE for variable-length: `INTERNALLENGTH = { internallength | VARIABLE }`
2649    InternalLength(UserDefinedTypeInternalLength),
2650    /// Indicates values are passed by value rather than by reference: `PASSEDBYVALUE`
2651    PassedByValue,
2652    /// Storage alignment requirement (1, 2, 4, or 8 bytes): `ALIGNMENT = alignment`
2653    Alignment(Alignment),
2654    /// Storage strategy for varlena types: `STORAGE = storage`
2655    Storage(UserDefinedTypeStorage),
2656    /// Copy properties from an existing type: `LIKE = like_type`
2657    Like(ObjectName),
2658    /// Type category for implicit casting rules (single char): `CATEGORY = category`
2659    Category(char),
2660    /// Whether this type is preferred within its category: `PREFERRED = preferred`
2661    Preferred(bool),
2662    /// Default value for the type: `DEFAULT = default`
2663    Default(Expr),
2664    /// Element type for array types: `ELEMENT = element`
2665    Element(DataType),
2666    /// Delimiter character for array value display: `DELIMITER = delimiter`
2667    Delimiter(String),
2668    /// Whether the type supports collation: `COLLATABLE = collatable`
2669    Collatable(bool),
2670}
2671
2672impl fmt::Display for UserDefinedTypeSqlDefinitionOption {
2673    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2674        match self {
2675            UserDefinedTypeSqlDefinitionOption::Input(name) => f.write_fmt(format_args!("INPUT = {0}", name))write!(f, "INPUT = {}", name),
2676            UserDefinedTypeSqlDefinitionOption::Output(name) => f.write_fmt(format_args!("OUTPUT = {0}", name))write!(f, "OUTPUT = {}", name),
2677            UserDefinedTypeSqlDefinitionOption::Receive(name) => f.write_fmt(format_args!("RECEIVE = {0}", name))write!(f, "RECEIVE = {}", name),
2678            UserDefinedTypeSqlDefinitionOption::Send(name) => f.write_fmt(format_args!("SEND = {0}", name))write!(f, "SEND = {}", name),
2679            UserDefinedTypeSqlDefinitionOption::TypmodIn(name) => f.write_fmt(format_args!("TYPMOD_IN = {0}", name))write!(f, "TYPMOD_IN = {}", name),
2680            UserDefinedTypeSqlDefinitionOption::TypmodOut(name) => {
2681                f.write_fmt(format_args!("TYPMOD_OUT = {0}", name))write!(f, "TYPMOD_OUT = {}", name)
2682            }
2683            UserDefinedTypeSqlDefinitionOption::Analyze(name) => f.write_fmt(format_args!("ANALYZE = {0}", name))write!(f, "ANALYZE = {}", name),
2684            UserDefinedTypeSqlDefinitionOption::Subscript(name) => {
2685                f.write_fmt(format_args!("SUBSCRIPT = {0}", name))write!(f, "SUBSCRIPT = {}", name)
2686            }
2687            UserDefinedTypeSqlDefinitionOption::InternalLength(len) => {
2688                f.write_fmt(format_args!("INTERNALLENGTH = {0}", len))write!(f, "INTERNALLENGTH = {}", len)
2689            }
2690            UserDefinedTypeSqlDefinitionOption::PassedByValue => f.write_fmt(format_args!("PASSEDBYVALUE"))write!(f, "PASSEDBYVALUE"),
2691            UserDefinedTypeSqlDefinitionOption::Alignment(align) => {
2692                f.write_fmt(format_args!("ALIGNMENT = {0}", align))write!(f, "ALIGNMENT = {}", align)
2693            }
2694            UserDefinedTypeSqlDefinitionOption::Storage(storage) => {
2695                f.write_fmt(format_args!("STORAGE = {0}", storage))write!(f, "STORAGE = {}", storage)
2696            }
2697            UserDefinedTypeSqlDefinitionOption::Like(name) => f.write_fmt(format_args!("LIKE = {0}", name))write!(f, "LIKE = {}", name),
2698            UserDefinedTypeSqlDefinitionOption::Category(c) => f.write_fmt(format_args!("CATEGORY = \'{0}\'", c))write!(f, "CATEGORY = '{}'", c),
2699            UserDefinedTypeSqlDefinitionOption::Preferred(b) => f.write_fmt(format_args!("PREFERRED = {0}", b))write!(f, "PREFERRED = {}", b),
2700            UserDefinedTypeSqlDefinitionOption::Default(expr) => f.write_fmt(format_args!("DEFAULT = {0}", expr))write!(f, "DEFAULT = {}", expr),
2701            UserDefinedTypeSqlDefinitionOption::Element(dt) => f.write_fmt(format_args!("ELEMENT = {0}", dt))write!(f, "ELEMENT = {}", dt),
2702            UserDefinedTypeSqlDefinitionOption::Delimiter(s) => {
2703                f.write_fmt(format_args!("DELIMITER = \'{0}\'",
        escape_single_quote_string(s)))write!(f, "DELIMITER = '{}'", escape_single_quote_string(s))
2704            }
2705            UserDefinedTypeSqlDefinitionOption::Collatable(b) => f.write_fmt(format_args!("COLLATABLE = {0}", b))write!(f, "COLLATABLE = {}", b),
2706        }
2707    }
2708}
2709
2710/// PARTITION statement used in ALTER TABLE et al. such as in Hive and ClickHouse SQL.
2711/// For example, ClickHouse's OPTIMIZE TABLE supports syntax like PARTITION ID 'partition_id' and PARTITION expr.
2712/// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/optimize)
2713#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Partition {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Partition::Identifier(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Identifier", &__self_0),
            Partition::Expr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
                    &__self_0),
            Partition::Part(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Part",
                    &__self_0),
            Partition::Partitions(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "Partitions", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Partition {
    #[inline]
    fn clone(&self) -> Partition {
        match self {
            Partition::Identifier(__self_0) =>
                Partition::Identifier(::core::clone::Clone::clone(__self_0)),
            Partition::Expr(__self_0) =>
                Partition::Expr(::core::clone::Clone::clone(__self_0)),
            Partition::Part(__self_0) =>
                Partition::Part(::core::clone::Clone::clone(__self_0)),
            Partition::Partitions(__self_0) =>
                Partition::Partitions(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Partition {
    #[inline]
    fn eq(&self, other: &Partition) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (Partition::Identifier(__self_0),
                    Partition::Identifier(__arg1_0)) => __self_0 == __arg1_0,
                (Partition::Expr(__self_0), Partition::Expr(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (Partition::Part(__self_0), Partition::Part(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (Partition::Partitions(__self_0),
                    Partition::Partitions(__arg1_0)) => __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::Eq for Partition {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<Expr>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
    }
}Eq, #[automatically_derived]
impl ::core::hash::Hash for Partition {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            Partition::Identifier(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            Partition::Expr(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            Partition::Part(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            Partition::Partitions(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash, #[automatically_derived]
impl ::core::cmp::PartialOrd for Partition {
    #[inline]
    fn partial_cmp(&self, other: &Partition)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (Partition::Identifier(__self_0), Partition::Identifier(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (Partition::Expr(__self_0), Partition::Expr(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (Partition::Part(__self_0), Partition::Part(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (Partition::Partitions(__self_0), Partition::Partitions(__arg1_0))
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Ord for Partition {
    #[inline]
    fn cmp(&self, other: &Partition) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (Partition::Identifier(__self_0),
                        Partition::Identifier(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (Partition::Expr(__self_0), Partition::Expr(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (Partition::Part(__self_0), Partition::Part(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (Partition::Partitions(__self_0),
                        Partition::Partitions(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord)]
2714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2715#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Partition {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Identifier(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Expr(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Part(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::Partitions(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for Partition {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Identifier(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Expr(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Part(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::Partitions(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2716pub enum Partition {
2717    /// ClickHouse supports PARTITION ID 'partition_id' syntax.
2718    Identifier(Ident),
2719    /// ClickHouse supports PARTITION expr syntax.
2720    Expr(Expr),
2721    /// ClickHouse supports PART expr which represents physical partition in disk.
2722    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/partition#attach-partitionpart)
2723    Part(Expr),
2724    /// Hive supports multiple partitions in PARTITION (part1, part2, ...) syntax.
2725    Partitions(Vec<Expr>),
2726}
2727
2728impl fmt::Display for Partition {
2729    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2730        match self {
2731            Partition::Identifier(id) => f.write_fmt(format_args!("PARTITION ID {0}", id))write!(f, "PARTITION ID {id}"),
2732            Partition::Expr(expr) => f.write_fmt(format_args!("PARTITION {0}", expr))write!(f, "PARTITION {expr}"),
2733            Partition::Part(expr) => f.write_fmt(format_args!("PART {0}", expr))write!(f, "PART {expr}"),
2734            Partition::Partitions(partitions) => {
2735                f.write_fmt(format_args!("PARTITION ({0})",
        display_comma_separated(partitions)))write!(f, "PARTITION ({})", display_comma_separated(partitions))
2736            }
2737        }
2738    }
2739}
2740
2741/// DEDUPLICATE statement used in OPTIMIZE TABLE et al. such as in ClickHouse SQL
2742/// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/optimize)
2743#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Deduplicate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            Deduplicate::All => ::core::fmt::Formatter::write_str(f, "All"),
            Deduplicate::ByExpression(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ByExpression", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Deduplicate {
    #[inline]
    fn clone(&self) -> Deduplicate {
        match self {
            Deduplicate::All => Deduplicate::All,
            Deduplicate::ByExpression(__self_0) =>
                Deduplicate::ByExpression(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Deduplicate {
    #[inline]
    fn eq(&self, other: &Deduplicate) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (Deduplicate::ByExpression(__self_0),
                    Deduplicate::ByExpression(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Deduplicate {
    #[inline]
    fn partial_cmp(&self, other: &Deduplicate)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (Deduplicate::ByExpression(__self_0),
                Deduplicate::ByExpression(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Deduplicate {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Expr>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Deduplicate {
    #[inline]
    fn cmp(&self, other: &Deduplicate) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (Deduplicate::ByExpression(__self_0),
                        Deduplicate::ByExpression(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Deduplicate {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            Deduplicate::ByExpression(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
2744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2745#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Deduplicate {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::All => {}
                            Self::ByExpression(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for Deduplicate {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::All => {}
                            Self::ByExpression(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2746pub enum Deduplicate {
2747    /// DEDUPLICATE ALL
2748    All,
2749    /// DEDUPLICATE BY expr
2750    ByExpression(Expr),
2751}
2752
2753impl fmt::Display for Deduplicate {
2754    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2755        match self {
2756            Deduplicate::All => f.write_fmt(format_args!("DEDUPLICATE"))write!(f, "DEDUPLICATE"),
2757            Deduplicate::ByExpression(expr) => f.write_fmt(format_args!("DEDUPLICATE BY {0}", expr))write!(f, "DEDUPLICATE BY {expr}"),
2758        }
2759    }
2760}
2761
2762/// Hive supports `CLUSTERED BY` statement in `CREATE TABLE`.
2763/// Syntax: `CLUSTERED BY (col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)] INTO num_buckets BUCKETS`
2764///
2765/// [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable)
2766#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ClusteredBy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "ClusteredBy",
            "columns", &self.columns, "sorted_by", &self.sorted_by,
            "num_buckets", &&self.num_buckets)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ClusteredBy {
    #[inline]
    fn clone(&self) -> ClusteredBy {
        ClusteredBy {
            columns: ::core::clone::Clone::clone(&self.columns),
            sorted_by: ::core::clone::Clone::clone(&self.sorted_by),
            num_buckets: ::core::clone::Clone::clone(&self.num_buckets),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ClusteredBy {
    #[inline]
    fn eq(&self, other: &ClusteredBy) -> bool {
        self.columns == other.columns && self.sorted_by == other.sorted_by &&
            self.num_buckets == other.num_buckets
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ClusteredBy {
    #[inline]
    fn partial_cmp(&self, other: &ClusteredBy)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.columns,
                &other.columns) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.sorted_by,
                        &other.sorted_by) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.num_buckets,
                            &other.num_buckets),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ClusteredBy {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<OrderByExpr>>>;
        let _: ::core::cmp::AssertParamIsEq<Value>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ClusteredBy {
    #[inline]
    fn cmp(&self, other: &ClusteredBy) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.columns, &other.columns) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.sorted_by, &other.sorted_by)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.num_buckets,
                            &other.num_buckets),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ClusteredBy {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.columns, state);
        ::core::hash::Hash::hash(&self.sorted_by, state);
        ::core::hash::Hash::hash(&self.num_buckets, state)
    }
}Hash)]
2767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2768#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ClusteredBy {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.columns, visitor)?;
                        sqlparser::ast::Visit::visit(&self.sorted_by, visitor)?;
                        sqlparser::ast::Visit::visit(&self.num_buckets, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ClusteredBy {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.columns,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.sorted_by,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.num_buckets,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2769pub struct ClusteredBy {
2770    /// columns used for clustering
2771    pub columns: Vec<Ident>,
2772    /// optional sorted by expressions
2773    pub sorted_by: Option<Vec<OrderByExpr>>,
2774    /// number of buckets
2775    pub num_buckets: Value,
2776}
2777
2778impl fmt::Display for ClusteredBy {
2779    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2780        f.write_fmt(format_args!("CLUSTERED BY ({0})",
        display_comma_separated(&self.columns)))write!(
2781            f,
2782            "CLUSTERED BY ({})",
2783            display_comma_separated(&self.columns)
2784        )?;
2785        if let Some(ref sorted_by) = self.sorted_by {
2786            f.write_fmt(format_args!(" SORTED BY ({0})",
        display_comma_separated(sorted_by)))write!(f, " SORTED BY ({})", display_comma_separated(sorted_by))?;
2787        }
2788        f.write_fmt(format_args!(" INTO {0} BUCKETS", self.num_buckets))write!(f, " INTO {} BUCKETS", self.num_buckets)
2789    }
2790}
2791
2792/// CREATE INDEX statement.
2793#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateIndex {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "table_name", "using", "columns", "unique",
                        "concurrently", "if_not_exists", "include",
                        "nulls_distinct", "with", "predicate", "index_options",
                        "alter_options"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.table_name, &self.using, &self.columns,
                        &self.unique, &self.concurrently, &self.if_not_exists,
                        &self.include, &self.nulls_distinct, &self.with,
                        &self.predicate, &self.index_options, &&self.alter_options];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "CreateIndex",
            names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateIndex {
    #[inline]
    fn clone(&self) -> CreateIndex {
        CreateIndex {
            name: ::core::clone::Clone::clone(&self.name),
            table_name: ::core::clone::Clone::clone(&self.table_name),
            using: ::core::clone::Clone::clone(&self.using),
            columns: ::core::clone::Clone::clone(&self.columns),
            unique: ::core::clone::Clone::clone(&self.unique),
            concurrently: ::core::clone::Clone::clone(&self.concurrently),
            if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
            include: ::core::clone::Clone::clone(&self.include),
            nulls_distinct: ::core::clone::Clone::clone(&self.nulls_distinct),
            with: ::core::clone::Clone::clone(&self.with),
            predicate: ::core::clone::Clone::clone(&self.predicate),
            index_options: ::core::clone::Clone::clone(&self.index_options),
            alter_options: ::core::clone::Clone::clone(&self.alter_options),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateIndex {
    #[inline]
    fn eq(&self, other: &CreateIndex) -> bool {
        self.unique == other.unique && self.concurrently == other.concurrently
                                                    && self.if_not_exists == other.if_not_exists &&
                                                self.name == other.name &&
                                            self.table_name == other.table_name &&
                                        self.using == other.using && self.columns == other.columns
                                && self.include == other.include &&
                            self.nulls_distinct == other.nulls_distinct &&
                        self.with == other.with && self.predicate == other.predicate
                && self.index_options == other.index_options &&
            self.alter_options == other.alter_options
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateIndex {
    #[inline]
    fn partial_cmp(&self, other: &CreateIndex)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
                        &other.table_name) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                                &other.using) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.columns,
                                        &other.columns) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.unique,
                                                &other.unique) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.concurrently,
                                                        &other.concurrently) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
                                                                &other.if_not_exists) {
                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                =>
                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.include,
                                                                        &other.include) {
                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                        =>
                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.nulls_distinct,
                                                                                &other.nulls_distinct) {
                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                =>
                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.with,
                                                                                        &other.with) {
                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                        =>
                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.predicate,
                                                                                                &other.predicate) {
                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                =>
                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.index_options,
                                                                                                        &other.index_options) {
                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                        =>
                                                                                                        ::core::cmp::PartialOrd::partial_cmp(&self.alter_options,
                                                                                                            &other.alter_options),
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateIndex {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<IndexType>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<IndexColumn>>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<IndexOption>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<AlterTableOperation>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateIndex {
    #[inline]
    fn cmp(&self, other: &CreateIndex) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.table_name,
                        &other.table_name) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.columns, &other.columns) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.unique, &other.unique) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.concurrently,
                                                        &other.concurrently) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        match ::core::cmp::Ord::cmp(&self.if_not_exists,
                                                                &other.if_not_exists) {
                                                            ::core::cmp::Ordering::Equal =>
                                                                match ::core::cmp::Ord::cmp(&self.include, &other.include) {
                                                                    ::core::cmp::Ordering::Equal =>
                                                                        match ::core::cmp::Ord::cmp(&self.nulls_distinct,
                                                                                &other.nulls_distinct) {
                                                                            ::core::cmp::Ordering::Equal =>
                                                                                match ::core::cmp::Ord::cmp(&self.with, &other.with) {
                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                        match ::core::cmp::Ord::cmp(&self.predicate,
                                                                                                &other.predicate) {
                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                match ::core::cmp::Ord::cmp(&self.index_options,
                                                                                                        &other.index_options) {
                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                        ::core::cmp::Ord::cmp(&self.alter_options,
                                                                                                            &other.alter_options),
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateIndex {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.table_name, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.columns, state);
        ::core::hash::Hash::hash(&self.unique, state);
        ::core::hash::Hash::hash(&self.concurrently, state);
        ::core::hash::Hash::hash(&self.if_not_exists, state);
        ::core::hash::Hash::hash(&self.include, state);
        ::core::hash::Hash::hash(&self.nulls_distinct, state);
        ::core::hash::Hash::hash(&self.with, state);
        ::core::hash::Hash::hash(&self.predicate, state);
        ::core::hash::Hash::hash(&self.index_options, state);
        ::core::hash::Hash::hash(&self.alter_options, state)
    }
}Hash)]
2794#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2795#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateIndex {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        visitor.pre_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
                        visitor.post_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.columns, visitor)?;
                        sqlparser::ast::Visit::visit(&self.unique, visitor)?;
                        sqlparser::ast::Visit::visit(&self.concurrently, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.include, visitor)?;
                        sqlparser::ast::Visit::visit(&self.nulls_distinct,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.with, visitor)?;
                        sqlparser::ast::Visit::visit(&self.predicate, visitor)?;
                        sqlparser::ast::Visit::visit(&self.index_options, visitor)?;
                        sqlparser::ast::Visit::visit(&self.alter_options, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateIndex {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        visitor.pre_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_name,
                                visitor)?;
                        visitor.post_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.columns,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.unique, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.concurrently,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.include,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.nulls_distinct,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.with, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.predicate,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.index_options,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.alter_options,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2796pub struct CreateIndex {
2797    /// index name
2798    pub name: Option<ObjectName>,
2799    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
2800    /// table name
2801    pub table_name: ObjectName,
2802    /// Index type used in the statement. Can also be found inside [`CreateIndex::index_options`]
2803    /// depending on the position of the option within the statement.
2804    pub using: Option<IndexType>,
2805    /// columns included in the index
2806    pub columns: Vec<IndexColumn>,
2807    /// whether the index is unique
2808    pub unique: bool,
2809    /// whether the index is created concurrently
2810    pub concurrently: bool,
2811    /// IF NOT EXISTS clause
2812    pub if_not_exists: bool,
2813    /// INCLUDE clause: <https://www.postgresql.org/docs/current/sql-createindex.html>
2814    pub include: Vec<Ident>,
2815    /// NULLS DISTINCT / NOT DISTINCT clause: <https://www.postgresql.org/docs/current/sql-createindex.html>
2816    pub nulls_distinct: Option<bool>,
2817    /// WITH clause: <https://www.postgresql.org/docs/current/sql-createindex.html>
2818    pub with: Vec<Expr>,
2819    /// WHERE clause: <https://www.postgresql.org/docs/current/sql-createindex.html>
2820    pub predicate: Option<Expr>,
2821    /// Index options: <https://www.postgresql.org/docs/current/sql-createindex.html>
2822    pub index_options: Vec<IndexOption>,
2823    /// [MySQL] allows a subset of options normally used for `ALTER TABLE`:
2824    ///
2825    /// - `ALGORITHM`
2826    /// - `LOCK`
2827    ///
2828    /// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/create-index.html
2829    pub alter_options: Vec<AlterTableOperation>,
2830}
2831
2832impl fmt::Display for CreateIndex {
2833    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2834        f.write_fmt(format_args!("CREATE {0}INDEX {1}{2}",
        if self.unique { "UNIQUE " } else { "" },
        if self.concurrently { "CONCURRENTLY " } else { "" },
        if self.if_not_exists { "IF NOT EXISTS " } else { "" }))write!(
2835            f,
2836            "CREATE {unique}INDEX {concurrently}{if_not_exists}",
2837            unique = if self.unique { "UNIQUE " } else { "" },
2838            concurrently = if self.concurrently {
2839                "CONCURRENTLY "
2840            } else {
2841                ""
2842            },
2843            if_not_exists = if self.if_not_exists {
2844                "IF NOT EXISTS "
2845            } else {
2846                ""
2847            },
2848        )?;
2849        if let Some(value) = &self.name {
2850            f.write_fmt(format_args!("{0} ", value))write!(f, "{value} ")?;
2851        }
2852        f.write_fmt(format_args!("ON {0}", self.table_name))write!(f, "ON {}", self.table_name)?;
2853        if let Some(value) = &self.using {
2854            f.write_fmt(format_args!(" USING {0} ", value))write!(f, " USING {value} ")?;
2855        }
2856        f.write_fmt(format_args!("({0})", display_comma_separated(&self.columns)))write!(f, "({})", display_comma_separated(&self.columns))?;
2857        if !self.include.is_empty() {
2858            f.write_fmt(format_args!(" INCLUDE ({0})",
        display_comma_separated(&self.include)))write!(f, " INCLUDE ({})", display_comma_separated(&self.include))?;
2859        }
2860        if let Some(value) = self.nulls_distinct {
2861            if value {
2862                f.write_fmt(format_args!(" NULLS DISTINCT"))write!(f, " NULLS DISTINCT")?;
2863            } else {
2864                f.write_fmt(format_args!(" NULLS NOT DISTINCT"))write!(f, " NULLS NOT DISTINCT")?;
2865            }
2866        }
2867        if !self.with.is_empty() {
2868            f.write_fmt(format_args!(" WITH ({0})", display_comma_separated(&self.with)))write!(f, " WITH ({})", display_comma_separated(&self.with))?;
2869        }
2870        if let Some(predicate) = &self.predicate {
2871            f.write_fmt(format_args!(" WHERE {0}", predicate))write!(f, " WHERE {predicate}")?;
2872        }
2873        if !self.index_options.is_empty() {
2874            f.write_fmt(format_args!(" {0}", display_separated(&self.index_options, " ")))write!(f, " {}", display_separated(&self.index_options, " "))?;
2875        }
2876        if !self.alter_options.is_empty() {
2877            f.write_fmt(format_args!(" {0}", display_separated(&self.alter_options, " ")))write!(f, " {}", display_separated(&self.alter_options, " "))?;
2878        }
2879        Ok(())
2880    }
2881}
2882
2883/// CREATE TABLE statement.
2884#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateTable {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["or_replace", "temporary", "external", "dynamic", "global",
                        "if_not_exists", "transient", "volatile", "iceberg", "name",
                        "columns", "constraints", "hive_distribution",
                        "hive_formats", "table_options", "file_format", "location",
                        "query", "without_rowid", "like", "clone", "version",
                        "comment", "on_commit", "on_cluster", "primary_key",
                        "order_by", "partition_by", "cluster_by", "clustered_by",
                        "inherits", "partition_of", "for_values", "strict",
                        "copy_grants", "enable_schema_evolution", "change_tracking",
                        "data_retention_time_in_days",
                        "max_data_extension_time_in_days", "default_ddl_collation",
                        "with_aggregation_policy", "with_row_access_policy",
                        "with_tags", "external_volume", "base_location", "catalog",
                        "catalog_sync", "storage_serialization_policy",
                        "target_lag", "warehouse", "refresh_mode", "initialize",
                        "require_user"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.or_replace, &self.temporary, &self.external,
                        &self.dynamic, &self.global, &self.if_not_exists,
                        &self.transient, &self.volatile, &self.iceberg, &self.name,
                        &self.columns, &self.constraints, &self.hive_distribution,
                        &self.hive_formats, &self.table_options, &self.file_format,
                        &self.location, &self.query, &self.without_rowid,
                        &self.like, &self.clone, &self.version, &self.comment,
                        &self.on_commit, &self.on_cluster, &self.primary_key,
                        &self.order_by, &self.partition_by, &self.cluster_by,
                        &self.clustered_by, &self.inherits, &self.partition_of,
                        &self.for_values, &self.strict, &self.copy_grants,
                        &self.enable_schema_evolution, &self.change_tracking,
                        &self.data_retention_time_in_days,
                        &self.max_data_extension_time_in_days,
                        &self.default_ddl_collation, &self.with_aggregation_policy,
                        &self.with_row_access_policy, &self.with_tags,
                        &self.external_volume, &self.base_location, &self.catalog,
                        &self.catalog_sync, &self.storage_serialization_policy,
                        &self.target_lag, &self.warehouse, &self.refresh_mode,
                        &self.initialize, &&self.require_user];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "CreateTable",
            names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateTable {
    #[inline]
    fn clone(&self) -> CreateTable {
        CreateTable {
            or_replace: ::core::clone::Clone::clone(&self.or_replace),
            temporary: ::core::clone::Clone::clone(&self.temporary),
            external: ::core::clone::Clone::clone(&self.external),
            dynamic: ::core::clone::Clone::clone(&self.dynamic),
            global: ::core::clone::Clone::clone(&self.global),
            if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
            transient: ::core::clone::Clone::clone(&self.transient),
            volatile: ::core::clone::Clone::clone(&self.volatile),
            iceberg: ::core::clone::Clone::clone(&self.iceberg),
            name: ::core::clone::Clone::clone(&self.name),
            columns: ::core::clone::Clone::clone(&self.columns),
            constraints: ::core::clone::Clone::clone(&self.constraints),
            hive_distribution: ::core::clone::Clone::clone(&self.hive_distribution),
            hive_formats: ::core::clone::Clone::clone(&self.hive_formats),
            table_options: ::core::clone::Clone::clone(&self.table_options),
            file_format: ::core::clone::Clone::clone(&self.file_format),
            location: ::core::clone::Clone::clone(&self.location),
            query: ::core::clone::Clone::clone(&self.query),
            without_rowid: ::core::clone::Clone::clone(&self.without_rowid),
            like: ::core::clone::Clone::clone(&self.like),
            clone: ::core::clone::Clone::clone(&self.clone),
            version: ::core::clone::Clone::clone(&self.version),
            comment: ::core::clone::Clone::clone(&self.comment),
            on_commit: ::core::clone::Clone::clone(&self.on_commit),
            on_cluster: ::core::clone::Clone::clone(&self.on_cluster),
            primary_key: ::core::clone::Clone::clone(&self.primary_key),
            order_by: ::core::clone::Clone::clone(&self.order_by),
            partition_by: ::core::clone::Clone::clone(&self.partition_by),
            cluster_by: ::core::clone::Clone::clone(&self.cluster_by),
            clustered_by: ::core::clone::Clone::clone(&self.clustered_by),
            inherits: ::core::clone::Clone::clone(&self.inherits),
            partition_of: ::core::clone::Clone::clone(&self.partition_of),
            for_values: ::core::clone::Clone::clone(&self.for_values),
            strict: ::core::clone::Clone::clone(&self.strict),
            copy_grants: ::core::clone::Clone::clone(&self.copy_grants),
            enable_schema_evolution: ::core::clone::Clone::clone(&self.enable_schema_evolution),
            change_tracking: ::core::clone::Clone::clone(&self.change_tracking),
            data_retention_time_in_days: ::core::clone::Clone::clone(&self.data_retention_time_in_days),
            max_data_extension_time_in_days: ::core::clone::Clone::clone(&self.max_data_extension_time_in_days),
            default_ddl_collation: ::core::clone::Clone::clone(&self.default_ddl_collation),
            with_aggregation_policy: ::core::clone::Clone::clone(&self.with_aggregation_policy),
            with_row_access_policy: ::core::clone::Clone::clone(&self.with_row_access_policy),
            with_tags: ::core::clone::Clone::clone(&self.with_tags),
            external_volume: ::core::clone::Clone::clone(&self.external_volume),
            base_location: ::core::clone::Clone::clone(&self.base_location),
            catalog: ::core::clone::Clone::clone(&self.catalog),
            catalog_sync: ::core::clone::Clone::clone(&self.catalog_sync),
            storage_serialization_policy: ::core::clone::Clone::clone(&self.storage_serialization_policy),
            target_lag: ::core::clone::Clone::clone(&self.target_lag),
            warehouse: ::core::clone::Clone::clone(&self.warehouse),
            refresh_mode: ::core::clone::Clone::clone(&self.refresh_mode),
            initialize: ::core::clone::Clone::clone(&self.initialize),
            require_user: ::core::clone::Clone::clone(&self.require_user),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateTable {
    #[inline]
    fn eq(&self, other: &CreateTable) -> bool {
        self.or_replace == other.or_replace &&
                                                                                                                                                                                                                        self.temporary == other.temporary &&
                                                                                                                                                                                                                    self.external == other.external &&
                                                                                                                                                                                                                self.dynamic == other.dynamic &&
                                                                                                                                                                                                            self.if_not_exists == other.if_not_exists &&
                                                                                                                                                                                                        self.transient == other.transient &&
                                                                                                                                                                                                    self.volatile == other.volatile &&
                                                                                                                                                                                                self.iceberg == other.iceberg &&
                                                                                                                                                                                            self.without_rowid == other.without_rowid &&
                                                                                                                                                                                        self.strict == other.strict &&
                                                                                                                                                                                    self.copy_grants == other.copy_grants &&
                                                                                                                                                                                self.require_user == other.require_user &&
                                                                                                                                                                            self.global == other.global && self.name == other.name &&
                                                                                                                                                                    self.columns == other.columns &&
                                                                                                                                                                self.constraints == other.constraints &&
                                                                                                                                                            self.hive_distribution == other.hive_distribution &&
                                                                                                                                                        self.hive_formats == other.hive_formats &&
                                                                                                                                                    self.table_options == other.table_options &&
                                                                                                                                                self.file_format == other.file_format &&
                                                                                                                                            self.location == other.location && self.query == other.query
                                                                                                                                    && self.like == other.like && self.clone == other.clone &&
                                                                                                                            self.version == other.version &&
                                                                                                                        self.comment == other.comment &&
                                                                                                                    self.on_commit == other.on_commit &&
                                                                                                                self.on_cluster == other.on_cluster &&
                                                                                                            self.primary_key == other.primary_key &&
                                                                                                        self.order_by == other.order_by &&
                                                                                                    self.partition_by == other.partition_by &&
                                                                                                self.cluster_by == other.cluster_by &&
                                                                                            self.clustered_by == other.clustered_by &&
                                                                                        self.inherits == other.inherits &&
                                                                                    self.partition_of == other.partition_of &&
                                                                                self.for_values == other.for_values &&
                                                                            self.enable_schema_evolution ==
                                                                                other.enable_schema_evolution &&
                                                                        self.change_tracking == other.change_tracking &&
                                                                    self.data_retention_time_in_days ==
                                                                        other.data_retention_time_in_days &&
                                                                self.max_data_extension_time_in_days ==
                                                                    other.max_data_extension_time_in_days &&
                                                            self.default_ddl_collation == other.default_ddl_collation &&
                                                        self.with_aggregation_policy ==
                                                            other.with_aggregation_policy &&
                                                    self.with_row_access_policy == other.with_row_access_policy
                                                && self.with_tags == other.with_tags &&
                                            self.external_volume == other.external_volume &&
                                        self.base_location == other.base_location &&
                                    self.catalog == other.catalog &&
                                self.catalog_sync == other.catalog_sync &&
                            self.storage_serialization_policy ==
                                other.storage_serialization_policy &&
                        self.target_lag == other.target_lag &&
                    self.warehouse == other.warehouse &&
                self.refresh_mode == other.refresh_mode &&
            self.initialize == other.initialize
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateTable {
    #[inline]
    fn partial_cmp(&self, other: &CreateTable)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.or_replace,
                &other.or_replace) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.temporary,
                        &other.temporary) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.external,
                                &other.external) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.dynamic,
                                        &other.dynamic) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.global,
                                                &other.global) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
                                                        &other.if_not_exists) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.transient,
                                                                &other.transient) {
                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                =>
                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.volatile,
                                                                        &other.volatile) {
                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                        =>
                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.iceberg,
                                                                                &other.iceberg) {
                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                =>
                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.name,
                                                                                        &other.name) {
                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                        =>
                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.columns,
                                                                                                &other.columns) {
                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                =>
                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.constraints,
                                                                                                        &other.constraints) {
                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                        =>
                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.hive_distribution,
                                                                                                                &other.hive_distribution) {
                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                =>
                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.hive_formats,
                                                                                                                        &other.hive_formats) {
                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                        =>
                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.table_options,
                                                                                                                                &other.table_options) {
                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                =>
                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.file_format,
                                                                                                                                        &other.file_format) {
                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                        =>
                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.location,
                                                                                                                                                &other.location) {
                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                =>
                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.query,
                                                                                                                                                        &other.query) {
                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                        =>
                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.without_rowid,
                                                                                                                                                                &other.without_rowid) {
                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                =>
                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.like,
                                                                                                                                                                        &other.like) {
                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                        =>
                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.clone,
                                                                                                                                                                                &other.clone) {
                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                =>
                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.version,
                                                                                                                                                                                        &other.version) {
                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                        =>
                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.comment,
                                                                                                                                                                                                &other.comment) {
                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                =>
                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.on_commit,
                                                                                                                                                                                                        &other.on_commit) {
                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                        =>
                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.on_cluster,
                                                                                                                                                                                                                &other.on_cluster) {
                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                =>
                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.primary_key,
                                                                                                                                                                                                                        &other.primary_key) {
                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.order_by,
                                                                                                                                                                                                                                &other.order_by) {
                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.partition_by,
                                                                                                                                                                                                                                        &other.partition_by) {
                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.cluster_by,
                                                                                                                                                                                                                                                &other.cluster_by) {
                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.clustered_by,
                                                                                                                                                                                                                                                        &other.clustered_by) {
                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.inherits,
                                                                                                                                                                                                                                                                &other.inherits) {
                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.partition_of,
                                                                                                                                                                                                                                                                        &other.partition_of) {
                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.for_values,
                                                                                                                                                                                                                                                                                &other.for_values) {
                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.strict,
                                                                                                                                                                                                                                                                                        &other.strict) {
                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.copy_grants,
                                                                                                                                                                                                                                                                                                &other.copy_grants) {
                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.enable_schema_evolution,
                                                                                                                                                                                                                                                                                                        &other.enable_schema_evolution) {
                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.change_tracking,
                                                                                                                                                                                                                                                                                                                &other.change_tracking) {
                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.data_retention_time_in_days,
                                                                                                                                                                                                                                                                                                                        &other.data_retention_time_in_days) {
                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.max_data_extension_time_in_days,
                                                                                                                                                                                                                                                                                                                                &other.max_data_extension_time_in_days) {
                                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.default_ddl_collation,
                                                                                                                                                                                                                                                                                                                                        &other.default_ddl_collation) {
                                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.with_aggregation_policy,
                                                                                                                                                                                                                                                                                                                                                &other.with_aggregation_policy) {
                                                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.with_row_access_policy,
                                                                                                                                                                                                                                                                                                                                                        &other.with_row_access_policy) {
                                                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.with_tags,
                                                                                                                                                                                                                                                                                                                                                                &other.with_tags) {
                                                                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.external_volume,
                                                                                                                                                                                                                                                                                                                                                                        &other.external_volume) {
                                                                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.base_location,
                                                                                                                                                                                                                                                                                                                                                                                &other.base_location) {
                                                                                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.catalog,
                                                                                                                                                                                                                                                                                                                                                                                        &other.catalog) {
                                                                                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.catalog_sync,
                                                                                                                                                                                                                                                                                                                                                                                                &other.catalog_sync) {
                                                                                                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.storage_serialization_policy,
                                                                                                                                                                                                                                                                                                                                                                                                        &other.storage_serialization_policy) {
                                                                                                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.target_lag,
                                                                                                                                                                                                                                                                                                                                                                                                                &other.target_lag) {
                                                                                                                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.warehouse,
                                                                                                                                                                                                                                                                                                                                                                                                                        &other.warehouse) {
                                                                                                                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.refresh_mode,
                                                                                                                                                                                                                                                                                                                                                                                                                                &other.refresh_mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                                                                =>
                                                                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.initialize,
                                                                                                                                                                                                                                                                                                                                                                                                                                        &other.initialize) {
                                                                                                                                                                                                                                                                                                                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                                                                                                                                                                                                                                                                                                        =>
                                                                                                                                                                                                                                                                                                                                                                                                                                        ::core::cmp::PartialOrd::partial_cmp(&self.require_user,
                                                                                                                                                                                                                                                                                                                                                                                                                                            &other.require_user),
                                                                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                },
                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                        },
                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                },
                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                        },
                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                },
                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                        },
                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                },
                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                        },
                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                },
                                                                                                                                                            cmp => cmp,
                                                                                                                                                        },
                                                                                                                                                    cmp => cmp,
                                                                                                                                                },
                                                                                                                                            cmp => cmp,
                                                                                                                                        },
                                                                                                                                    cmp => cmp,
                                                                                                                                },
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateTable {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ColumnDef>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<TableConstraint>>;
        let _: ::core::cmp::AssertParamIsEq<HiveDistributionStyle>;
        let _: ::core::cmp::AssertParamIsEq<Option<HiveFormat>>;
        let _: ::core::cmp::AssertParamIsEq<CreateTableOptions>;
        let _: ::core::cmp::AssertParamIsEq<Option<FileFormat>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Box<Query>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<CreateTableLikeKind>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Option<TableVersion>>;
        let _: ::core::cmp::AssertParamIsEq<Option<CommentDef>>;
        let _: ::core::cmp::AssertParamIsEq<Option<OnCommit>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
        let _:
                ::core::cmp::AssertParamIsEq<Option<OneOrManyWithParens<Expr>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Box<Expr>>>;
        let _:
                ::core::cmp::AssertParamIsEq<Option<WrappedCollection<Vec<Expr>>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ClusteredBy>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<ObjectName>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ForValues>>;
        let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
        let _: ::core::cmp::AssertParamIsEq<Option<bool>>;
        let _: ::core::cmp::AssertParamIsEq<Option<u64>>;
        let _: ::core::cmp::AssertParamIsEq<Option<u64>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Option<RowAccessPolicy>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<Tag>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _:
                ::core::cmp::AssertParamIsEq<Option<StorageSerializationPolicy>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<RefreshModeKind>>;
        let _: ::core::cmp::AssertParamIsEq<Option<InitializeKind>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateTable {
    #[inline]
    fn cmp(&self, other: &CreateTable) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.or_replace, &other.or_replace) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.temporary, &other.temporary)
                    {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.external, &other.external)
                            {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.dynamic, &other.dynamic) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.global, &other.global) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.if_not_exists,
                                                        &other.if_not_exists) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        match ::core::cmp::Ord::cmp(&self.transient,
                                                                &other.transient) {
                                                            ::core::cmp::Ordering::Equal =>
                                                                match ::core::cmp::Ord::cmp(&self.volatile, &other.volatile)
                                                                    {
                                                                    ::core::cmp::Ordering::Equal =>
                                                                        match ::core::cmp::Ord::cmp(&self.iceberg, &other.iceberg) {
                                                                            ::core::cmp::Ordering::Equal =>
                                                                                match ::core::cmp::Ord::cmp(&self.name, &other.name) {
                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                        match ::core::cmp::Ord::cmp(&self.columns, &other.columns) {
                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                match ::core::cmp::Ord::cmp(&self.constraints,
                                                                                                        &other.constraints) {
                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                        match ::core::cmp::Ord::cmp(&self.hive_distribution,
                                                                                                                &other.hive_distribution) {
                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                match ::core::cmp::Ord::cmp(&self.hive_formats,
                                                                                                                        &other.hive_formats) {
                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                        match ::core::cmp::Ord::cmp(&self.table_options,
                                                                                                                                &other.table_options) {
                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                match ::core::cmp::Ord::cmp(&self.file_format,
                                                                                                                                        &other.file_format) {
                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                        match ::core::cmp::Ord::cmp(&self.location, &other.location)
                                                                                                                                            {
                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                match ::core::cmp::Ord::cmp(&self.query, &other.query) {
                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.without_rowid,
                                                                                                                                                                &other.without_rowid) {
                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.like, &other.like) {
                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.clone, &other.clone) {
                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.version, &other.version) {
                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.comment, &other.comment) {
                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.on_commit,
                                                                                                                                                                                                        &other.on_commit) {
                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.on_cluster,
                                                                                                                                                                                                                &other.on_cluster) {
                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.primary_key,
                                                                                                                                                                                                                        &other.primary_key) {
                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.order_by, &other.order_by)
                                                                                                                                                                                                                            {
                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.partition_by,
                                                                                                                                                                                                                                        &other.partition_by) {
                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.cluster_by,
                                                                                                                                                                                                                                                &other.cluster_by) {
                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.clustered_by,
                                                                                                                                                                                                                                                        &other.clustered_by) {
                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.inherits, &other.inherits)
                                                                                                                                                                                                                                                            {
                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.partition_of,
                                                                                                                                                                                                                                                                        &other.partition_of) {
                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.for_values,
                                                                                                                                                                                                                                                                                &other.for_values) {
                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.strict, &other.strict) {
                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.copy_grants,
                                                                                                                                                                                                                                                                                                &other.copy_grants) {
                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.enable_schema_evolution,
                                                                                                                                                                                                                                                                                                        &other.enable_schema_evolution) {
                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.change_tracking,
                                                                                                                                                                                                                                                                                                                &other.change_tracking) {
                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.data_retention_time_in_days,
                                                                                                                                                                                                                                                                                                                        &other.data_retention_time_in_days) {
                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.max_data_extension_time_in_days,
                                                                                                                                                                                                                                                                                                                                &other.max_data_extension_time_in_days) {
                                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.default_ddl_collation,
                                                                                                                                                                                                                                                                                                                                        &other.default_ddl_collation) {
                                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.with_aggregation_policy,
                                                                                                                                                                                                                                                                                                                                                &other.with_aggregation_policy) {
                                                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.with_row_access_policy,
                                                                                                                                                                                                                                                                                                                                                        &other.with_row_access_policy) {
                                                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.with_tags,
                                                                                                                                                                                                                                                                                                                                                                &other.with_tags) {
                                                                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.external_volume,
                                                                                                                                                                                                                                                                                                                                                                        &other.external_volume) {
                                                                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.base_location,
                                                                                                                                                                                                                                                                                                                                                                                &other.base_location) {
                                                                                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.catalog, &other.catalog) {
                                                                                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.catalog_sync,
                                                                                                                                                                                                                                                                                                                                                                                                &other.catalog_sync) {
                                                                                                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.storage_serialization_policy,
                                                                                                                                                                                                                                                                                                                                                                                                        &other.storage_serialization_policy) {
                                                                                                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.target_lag,
                                                                                                                                                                                                                                                                                                                                                                                                                &other.target_lag) {
                                                                                                                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.warehouse,
                                                                                                                                                                                                                                                                                                                                                                                                                        &other.warehouse) {
                                                                                                                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                                                        match ::core::cmp::Ord::cmp(&self.refresh_mode,
                                                                                                                                                                                                                                                                                                                                                                                                                                &other.refresh_mode) {
                                                                                                                                                                                                                                                                                                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                                                                match ::core::cmp::Ord::cmp(&self.initialize,
                                                                                                                                                                                                                                                                                                                                                                                                                                        &other.initialize) {
                                                                                                                                                                                                                                                                                                                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                                                                                                                                                                                                                                                                                                                        ::core::cmp::Ord::cmp(&self.require_user,
                                                                                                                                                                                                                                                                                                                                                                                                                                            &other.require_user),
                                                                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                                },
                                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                                        },
                                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                                },
                                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                                        },
                                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                                },
                                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                                        },
                                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                                },
                                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                                        },
                                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                                },
                                                                                                                                                                            cmp => cmp,
                                                                                                                                                                        },
                                                                                                                                                                    cmp => cmp,
                                                                                                                                                                },
                                                                                                                                                            cmp => cmp,
                                                                                                                                                        },
                                                                                                                                                    cmp => cmp,
                                                                                                                                                },
                                                                                                                                            cmp => cmp,
                                                                                                                                        },
                                                                                                                                    cmp => cmp,
                                                                                                                                },
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateTable {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.or_replace, state);
        ::core::hash::Hash::hash(&self.temporary, state);
        ::core::hash::Hash::hash(&self.external, state);
        ::core::hash::Hash::hash(&self.dynamic, state);
        ::core::hash::Hash::hash(&self.global, state);
        ::core::hash::Hash::hash(&self.if_not_exists, state);
        ::core::hash::Hash::hash(&self.transient, state);
        ::core::hash::Hash::hash(&self.volatile, state);
        ::core::hash::Hash::hash(&self.iceberg, state);
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.columns, state);
        ::core::hash::Hash::hash(&self.constraints, state);
        ::core::hash::Hash::hash(&self.hive_distribution, state);
        ::core::hash::Hash::hash(&self.hive_formats, state);
        ::core::hash::Hash::hash(&self.table_options, state);
        ::core::hash::Hash::hash(&self.file_format, state);
        ::core::hash::Hash::hash(&self.location, state);
        ::core::hash::Hash::hash(&self.query, state);
        ::core::hash::Hash::hash(&self.without_rowid, state);
        ::core::hash::Hash::hash(&self.like, state);
        ::core::hash::Hash::hash(&self.clone, state);
        ::core::hash::Hash::hash(&self.version, state);
        ::core::hash::Hash::hash(&self.comment, state);
        ::core::hash::Hash::hash(&self.on_commit, state);
        ::core::hash::Hash::hash(&self.on_cluster, state);
        ::core::hash::Hash::hash(&self.primary_key, state);
        ::core::hash::Hash::hash(&self.order_by, state);
        ::core::hash::Hash::hash(&self.partition_by, state);
        ::core::hash::Hash::hash(&self.cluster_by, state);
        ::core::hash::Hash::hash(&self.clustered_by, state);
        ::core::hash::Hash::hash(&self.inherits, state);
        ::core::hash::Hash::hash(&self.partition_of, state);
        ::core::hash::Hash::hash(&self.for_values, state);
        ::core::hash::Hash::hash(&self.strict, state);
        ::core::hash::Hash::hash(&self.copy_grants, state);
        ::core::hash::Hash::hash(&self.enable_schema_evolution, state);
        ::core::hash::Hash::hash(&self.change_tracking, state);
        ::core::hash::Hash::hash(&self.data_retention_time_in_days, state);
        ::core::hash::Hash::hash(&self.max_data_extension_time_in_days,
            state);
        ::core::hash::Hash::hash(&self.default_ddl_collation, state);
        ::core::hash::Hash::hash(&self.with_aggregation_policy, state);
        ::core::hash::Hash::hash(&self.with_row_access_policy, state);
        ::core::hash::Hash::hash(&self.with_tags, state);
        ::core::hash::Hash::hash(&self.external_volume, state);
        ::core::hash::Hash::hash(&self.base_location, state);
        ::core::hash::Hash::hash(&self.catalog, state);
        ::core::hash::Hash::hash(&self.catalog_sync, state);
        ::core::hash::Hash::hash(&self.storage_serialization_policy, state);
        ::core::hash::Hash::hash(&self.target_lag, state);
        ::core::hash::Hash::hash(&self.warehouse, state);
        ::core::hash::Hash::hash(&self.refresh_mode, state);
        ::core::hash::Hash::hash(&self.initialize, state);
        ::core::hash::Hash::hash(&self.require_user, state)
    }
}Hash)]
2885#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2886#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateTable {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.or_replace, visitor)?;
                        sqlparser::ast::Visit::visit(&self.temporary, visitor)?;
                        sqlparser::ast::Visit::visit(&self.external, visitor)?;
                        sqlparser::ast::Visit::visit(&self.dynamic, visitor)?;
                        sqlparser::ast::Visit::visit(&self.global, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.transient, visitor)?;
                        sqlparser::ast::Visit::visit(&self.volatile, visitor)?;
                        sqlparser::ast::Visit::visit(&self.iceberg, visitor)?;
                        visitor.pre_visit_relation(&self.name)?;
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        visitor.post_visit_relation(&self.name)?;
                        sqlparser::ast::Visit::visit(&self.columns, visitor)?;
                        sqlparser::ast::Visit::visit(&self.constraints, visitor)?;
                        sqlparser::ast::Visit::visit(&self.hive_distribution,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.hive_formats, visitor)?;
                        sqlparser::ast::Visit::visit(&self.table_options, visitor)?;
                        sqlparser::ast::Visit::visit(&self.file_format, visitor)?;
                        sqlparser::ast::Visit::visit(&self.location, visitor)?;
                        sqlparser::ast::Visit::visit(&self.query, visitor)?;
                        sqlparser::ast::Visit::visit(&self.without_rowid, visitor)?;
                        sqlparser::ast::Visit::visit(&self.like, visitor)?;
                        sqlparser::ast::Visit::visit(&self.clone, visitor)?;
                        sqlparser::ast::Visit::visit(&self.version, visitor)?;
                        sqlparser::ast::Visit::visit(&self.comment, visitor)?;
                        sqlparser::ast::Visit::visit(&self.on_commit, visitor)?;
                        sqlparser::ast::Visit::visit(&self.on_cluster, visitor)?;
                        sqlparser::ast::Visit::visit(&self.primary_key, visitor)?;
                        sqlparser::ast::Visit::visit(&self.order_by, visitor)?;
                        sqlparser::ast::Visit::visit(&self.partition_by, visitor)?;
                        sqlparser::ast::Visit::visit(&self.cluster_by, visitor)?;
                        sqlparser::ast::Visit::visit(&self.clustered_by, visitor)?;
                        sqlparser::ast::Visit::visit(&self.inherits, visitor)?;
                        if let Some(value) = &self.partition_of {
                            visitor.pre_visit_relation(value)?;
                            sqlparser::ast::Visit::visit(value, visitor)?;
                            visitor.post_visit_relation(value)?;
                        }
                        sqlparser::ast::Visit::visit(&self.for_values, visitor)?;
                        sqlparser::ast::Visit::visit(&self.strict, visitor)?;
                        sqlparser::ast::Visit::visit(&self.copy_grants, visitor)?;
                        sqlparser::ast::Visit::visit(&self.enable_schema_evolution,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.change_tracking,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.data_retention_time_in_days,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.max_data_extension_time_in_days,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.default_ddl_collation,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.with_aggregation_policy,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.with_row_access_policy,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.with_tags, visitor)?;
                        sqlparser::ast::Visit::visit(&self.external_volume,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.base_location, visitor)?;
                        sqlparser::ast::Visit::visit(&self.catalog, visitor)?;
                        sqlparser::ast::Visit::visit(&self.catalog_sync, visitor)?;
                        sqlparser::ast::Visit::visit(&self.storage_serialization_policy,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.target_lag, visitor)?;
                        sqlparser::ast::Visit::visit(&self.warehouse, visitor)?;
                        sqlparser::ast::Visit::visit(&self.refresh_mode, visitor)?;
                        sqlparser::ast::Visit::visit(&self.initialize, visitor)?;
                        sqlparser::ast::Visit::visit(&self.require_user, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateTable {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.or_replace,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.temporary,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.external,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.dynamic,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.global, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.transient,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.volatile,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.iceberg,
                                visitor)?;
                        visitor.pre_visit_relation(&mut self.name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        visitor.post_visit_relation(&mut self.name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.columns,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.constraints,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.hive_distribution,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.hive_formats,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_options,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.file_format,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.location,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.query, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.without_rowid,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.like, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.clone, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.version,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.comment,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.on_commit,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.on_cluster,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.primary_key,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.order_by,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.partition_by,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.cluster_by,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.clustered_by,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.inherits,
                                visitor)?;
                        if let Some(value) = &mut self.partition_of {
                            visitor.pre_visit_relation(value)?;
                            sqlparser::ast::VisitMut::visit(value, visitor)?;
                            visitor.post_visit_relation(value)?;
                        }
                        sqlparser::ast::VisitMut::visit(&mut self.for_values,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.strict, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.copy_grants,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.enable_schema_evolution,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.change_tracking,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.data_retention_time_in_days,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.max_data_extension_time_in_days,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.default_ddl_collation,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.with_aggregation_policy,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.with_row_access_policy,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.with_tags,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.external_volume,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.base_location,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.catalog,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.catalog_sync,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.storage_serialization_policy,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.target_lag,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.warehouse,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.refresh_mode,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.initialize,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.require_user,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
2887pub struct CreateTable {
2888    /// `OR REPLACE` clause
2889    pub or_replace: bool,
2890    /// `TEMP` or `TEMPORARY` clause
2891    pub temporary: bool,
2892    /// `EXTERNAL` clause
2893    pub external: bool,
2894    /// `DYNAMIC` clause
2895    pub dynamic: bool,
2896    /// `GLOBAL` clause
2897    pub global: Option<bool>,
2898    /// `IF NOT EXISTS` clause
2899    pub if_not_exists: bool,
2900    /// `TRANSIENT` clause
2901    pub transient: bool,
2902    /// `VOLATILE` clause
2903    pub volatile: bool,
2904    /// `ICEBERG` clause
2905    pub iceberg: bool,
2906    /// Table name
2907    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
2908    pub name: ObjectName,
2909    /// Column definitions
2910    pub columns: Vec<ColumnDef>,
2911    /// Table constraints
2912    pub constraints: Vec<TableConstraint>,
2913    /// Hive-specific distribution style
2914    pub hive_distribution: HiveDistributionStyle,
2915    /// Hive-specific formats like `ROW FORMAT DELIMITED` or `ROW FORMAT SERDE 'serde_class' WITH SERDEPROPERTIES (...)`
2916    pub hive_formats: Option<HiveFormat>,
2917    /// Table options
2918    pub table_options: CreateTableOptions,
2919    /// General comment for the table
2920    pub file_format: Option<FileFormat>,
2921    /// Location of the table data
2922    pub location: Option<String>,
2923    /// Query used to populate the table
2924    pub query: Option<Box<Query>>,
2925    /// If the table should be created without a rowid (SQLite)
2926    pub without_rowid: bool,
2927    /// `LIKE` clause
2928    pub like: Option<CreateTableLikeKind>,
2929    /// `CLONE` clause
2930    pub clone: Option<ObjectName>,
2931    /// Table version (for systems that support versioned tables)
2932    pub version: Option<TableVersion>,
2933    /// For Hive dialect, the table comment is after the column definitions without `=`,
2934    /// so the `comment` field is optional and different than the comment field in the general options list.
2935    /// [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable)
2936    pub comment: Option<CommentDef>,
2937    /// ClickHouse "ON COMMIT" clause:
2938    /// <https://clickhouse.com/docs/en/sql-reference/statements/create/table/>
2939    pub on_commit: Option<OnCommit>,
2940    /// ClickHouse "ON CLUSTER" clause:
2941    /// <https://clickhouse.com/docs/en/sql-reference/distributed-ddl/>
2942    pub on_cluster: Option<Ident>,
2943    /// ClickHouse "PRIMARY KEY " clause.
2944    /// <https://clickhouse.com/docs/en/sql-reference/statements/create/table/>
2945    pub primary_key: Option<Box<Expr>>,
2946    /// ClickHouse "ORDER BY " clause. Note that omitted ORDER BY is different
2947    /// than empty (represented as ()), the latter meaning "no sorting".
2948    /// <https://clickhouse.com/docs/en/sql-reference/statements/create/table/>
2949    pub order_by: Option<OneOrManyWithParens<Expr>>,
2950    /// BigQuery: A partition expression for the table.
2951    /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#partition_expression>
2952    pub partition_by: Option<Box<Expr>>,
2953    /// BigQuery: Table clustering column list.
2954    /// <https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#table_option_list>
2955    /// Snowflake: Table clustering list which contains base column, expressions on base columns.
2956    /// <https://docs.snowflake.com/en/user-guide/tables-clustering-keys#defining-a-clustering-key-for-a-table>
2957    pub cluster_by: Option<WrappedCollection<Vec<Expr>>>,
2958    /// Hive: Table clustering column list.
2959    /// <https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable>
2960    pub clustered_by: Option<ClusteredBy>,
2961    /// Postgres `INHERITs` clause, which contains the list of tables from which
2962    /// the new table inherits.
2963    /// <https://www.postgresql.org/docs/current/ddl-inherit.html>
2964    /// <https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-PARMS-INHERITS>
2965    pub inherits: Option<Vec<ObjectName>>,
2966    /// PostgreSQL `PARTITION OF` clause to create a partition of a parent table.
2967    /// Contains the parent table name.
2968    /// <https://www.postgresql.org/docs/current/sql-createtable.html>
2969    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
2970    pub partition_of: Option<ObjectName>,
2971    /// PostgreSQL partition bound specification for PARTITION OF.
2972    /// <https://www.postgresql.org/docs/current/sql-createtable.html>
2973    pub for_values: Option<ForValues>,
2974    /// SQLite "STRICT" clause.
2975    /// if the "STRICT" table-option keyword is added to the end, after the closing ")",
2976    /// then strict typing rules apply to that table.
2977    pub strict: bool,
2978    /// Snowflake "COPY GRANTS" clause
2979    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
2980    pub copy_grants: bool,
2981    /// Snowflake "ENABLE_SCHEMA_EVOLUTION" clause
2982    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
2983    pub enable_schema_evolution: Option<bool>,
2984    /// Snowflake "CHANGE_TRACKING" clause
2985    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
2986    pub change_tracking: Option<bool>,
2987    /// Snowflake "DATA_RETENTION_TIME_IN_DAYS" clause
2988    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
2989    pub data_retention_time_in_days: Option<u64>,
2990    /// Snowflake "MAX_DATA_EXTENSION_TIME_IN_DAYS" clause
2991    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
2992    pub max_data_extension_time_in_days: Option<u64>,
2993    /// Snowflake "DEFAULT_DDL_COLLATION" clause
2994    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
2995    pub default_ddl_collation: Option<String>,
2996    /// Snowflake "WITH AGGREGATION POLICY" clause
2997    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
2998    pub with_aggregation_policy: Option<ObjectName>,
2999    /// Snowflake "WITH ROW ACCESS POLICY" clause
3000    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
3001    pub with_row_access_policy: Option<RowAccessPolicy>,
3002    /// Snowflake "WITH TAG" clause
3003    /// <https://docs.snowflake.com/en/sql-reference/sql/create-table>
3004    pub with_tags: Option<Vec<Tag>>,
3005    /// Snowflake "EXTERNAL_VOLUME" clause for Iceberg tables
3006    /// <https://docs.snowflake.com/en/sql-reference/sql/create-iceberg-table>
3007    pub external_volume: Option<String>,
3008    /// Snowflake "BASE_LOCATION" clause for Iceberg tables
3009    /// <https://docs.snowflake.com/en/sql-reference/sql/create-iceberg-table>
3010    pub base_location: Option<String>,
3011    /// Snowflake "CATALOG" clause for Iceberg tables
3012    /// <https://docs.snowflake.com/en/sql-reference/sql/create-iceberg-table>
3013    pub catalog: Option<String>,
3014    /// Snowflake "CATALOG_SYNC" clause for Iceberg tables
3015    /// <https://docs.snowflake.com/en/sql-reference/sql/create-iceberg-table>
3016    pub catalog_sync: Option<String>,
3017    /// Snowflake "STORAGE_SERIALIZATION_POLICY" clause for Iceberg tables
3018    /// <https://docs.snowflake.com/en/sql-reference/sql/create-iceberg-table>
3019    pub storage_serialization_policy: Option<StorageSerializationPolicy>,
3020    /// Snowflake "TARGET_LAG" clause for dybamic tables
3021    /// <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table>
3022    pub target_lag: Option<String>,
3023    /// Snowflake "WAREHOUSE" clause for dybamic tables
3024    /// <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table>
3025    pub warehouse: Option<Ident>,
3026    /// Snowflake "REFRESH_MODE" clause for dybamic tables
3027    /// <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table>
3028    pub refresh_mode: Option<RefreshModeKind>,
3029    /// Snowflake "INITIALIZE" clause for dybamic tables
3030    /// <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table>
3031    pub initialize: Option<InitializeKind>,
3032    /// Snowflake "REQUIRE USER" clause for dybamic tables
3033    /// <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table>
3034    pub require_user: bool,
3035}
3036
3037impl fmt::Display for CreateTable {
3038    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3039        // We want to allow the following options
3040        // Empty column list, allowed by PostgreSQL:
3041        //   `CREATE TABLE t ()`
3042        // No columns provided for CREATE TABLE AS:
3043        //   `CREATE TABLE t AS SELECT a from t2`
3044        // Columns provided for CREATE TABLE AS:
3045        //   `CREATE TABLE t (a INT) AS SELECT a from t2`
3046        f.write_fmt(format_args!("CREATE {0}{1}{2}{4}{5}{6}{8}{7}TABLE {3}{9}",
        if self.or_replace { "OR REPLACE " } else { "" },
        if self.external { "EXTERNAL " } else { "" },
        self.global.map(|global|
                    {
                        if global { "GLOBAL " } else { "LOCAL " }
                    }).unwrap_or(""),
        if self.if_not_exists { "IF NOT EXISTS " } else { "" },
        if self.temporary { "TEMPORARY " } else { "" },
        if self.transient { "TRANSIENT " } else { "" },
        if self.volatile { "VOLATILE " } else { "" },
        if self.iceberg { "ICEBERG " } else { "" },
        if self.dynamic { "DYNAMIC " } else { "" }, self.name))write!(
3047            f,
3048            "CREATE {or_replace}{external}{global}{temporary}{transient}{volatile}{dynamic}{iceberg}TABLE {if_not_exists}{name}",
3049            or_replace = if self.or_replace { "OR REPLACE " } else { "" },
3050            external = if self.external { "EXTERNAL " } else { "" },
3051            global = self.global
3052                .map(|global| {
3053                    if global {
3054                        "GLOBAL "
3055                    } else {
3056                        "LOCAL "
3057                    }
3058                })
3059                .unwrap_or(""),
3060            if_not_exists = if self.if_not_exists { "IF NOT EXISTS " } else { "" },
3061            temporary = if self.temporary { "TEMPORARY " } else { "" },
3062            transient = if self.transient { "TRANSIENT " } else { "" },
3063            volatile = if self.volatile { "VOLATILE " } else { "" },
3064            // Only for Snowflake
3065            iceberg = if self.iceberg { "ICEBERG " } else { "" },
3066            dynamic = if self.dynamic { "DYNAMIC " } else { "" },
3067            name = self.name,
3068        )?;
3069        if let Some(partition_of) = &self.partition_of {
3070            f.write_fmt(format_args!(" PARTITION OF {0}", partition_of))write!(f, " PARTITION OF {partition_of}")?;
3071        }
3072        if let Some(on_cluster) = &self.on_cluster {
3073            f.write_fmt(format_args!(" ON CLUSTER {0}", on_cluster))write!(f, " ON CLUSTER {on_cluster}")?;
3074        }
3075        if !self.columns.is_empty() || !self.constraints.is_empty() {
3076            f.write_str(" (")?;
3077            NewLine.fmt(f)?;
3078            Indent(DisplayCommaSeparated(&self.columns)).fmt(f)?;
3079            if !self.columns.is_empty() && !self.constraints.is_empty() {
3080                f.write_str(",")?;
3081                SpaceOrNewline.fmt(f)?;
3082            }
3083            Indent(DisplayCommaSeparated(&self.constraints)).fmt(f)?;
3084            NewLine.fmt(f)?;
3085            f.write_str(")")?;
3086        } else if self.query.is_none()
3087            && self.like.is_none()
3088            && self.clone.is_none()
3089            && self.partition_of.is_none()
3090        {
3091            // PostgreSQL allows `CREATE TABLE t ();`, but requires empty parens
3092            f.write_str(" ()")?;
3093        } else if let Some(CreateTableLikeKind::Parenthesized(like_in_columns_list)) = &self.like {
3094            f.write_fmt(format_args!(" ({0})", like_in_columns_list))write!(f, " ({like_in_columns_list})")?;
3095        }
3096        if let Some(for_values) = &self.for_values {
3097            f.write_fmt(format_args!(" {0}", for_values))write!(f, " {for_values}")?;
3098        }
3099
3100        // Hive table comment should be after column definitions, please refer to:
3101        // [Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable)
3102        if let Some(comment) = &self.comment {
3103            f.write_fmt(format_args!(" COMMENT \'{0}\'", comment))write!(f, " COMMENT '{comment}'")?;
3104        }
3105
3106        // Only for SQLite
3107        if self.without_rowid {
3108            f.write_fmt(format_args!(" WITHOUT ROWID"))write!(f, " WITHOUT ROWID")?;
3109        }
3110
3111        if let Some(CreateTableLikeKind::Plain(like)) = &self.like {
3112            f.write_fmt(format_args!(" {0}", like))write!(f, " {like}")?;
3113        }
3114
3115        if let Some(c) = &self.clone {
3116            f.write_fmt(format_args!(" CLONE {0}", c))write!(f, " CLONE {c}")?;
3117        }
3118
3119        if let Some(version) = &self.version {
3120            f.write_fmt(format_args!(" {0}", version))write!(f, " {version}")?;
3121        }
3122
3123        match &self.hive_distribution {
3124            HiveDistributionStyle::PARTITIONED { columns } => {
3125                f.write_fmt(format_args!(" PARTITIONED BY ({0})",
        display_comma_separated(columns)))write!(f, " PARTITIONED BY ({})", display_comma_separated(columns))?;
3126            }
3127            HiveDistributionStyle::SKEWED {
3128                columns,
3129                on,
3130                stored_as_directories,
3131            } => {
3132                f.write_fmt(format_args!(" SKEWED BY ({0})) ON ({1})",
        display_comma_separated(columns), display_comma_separated(on)))write!(
3133                    f,
3134                    " SKEWED BY ({})) ON ({})",
3135                    display_comma_separated(columns),
3136                    display_comma_separated(on)
3137                )?;
3138                if *stored_as_directories {
3139                    f.write_fmt(format_args!(" STORED AS DIRECTORIES"))write!(f, " STORED AS DIRECTORIES")?;
3140                }
3141            }
3142            _ => (),
3143        }
3144
3145        if let Some(clustered_by) = &self.clustered_by {
3146            f.write_fmt(format_args!(" {0}", clustered_by))write!(f, " {clustered_by}")?;
3147        }
3148
3149        if let Some(HiveFormat {
3150            row_format,
3151            serde_properties,
3152            storage,
3153            location,
3154        }) = &self.hive_formats
3155        {
3156            match row_format {
3157                Some(HiveRowFormat::SERDE { class }) => f.write_fmt(format_args!(" ROW FORMAT SERDE \'{0}\'", class))write!(f, " ROW FORMAT SERDE '{class}'")?,
3158                Some(HiveRowFormat::DELIMITED { delimiters }) => {
3159                    f.write_fmt(format_args!(" ROW FORMAT DELIMITED"))write!(f, " ROW FORMAT DELIMITED")?;
3160                    if !delimiters.is_empty() {
3161                        f.write_fmt(format_args!(" {0}", display_separated(delimiters, " ")))write!(f, " {}", display_separated(delimiters, " "))?;
3162                    }
3163                }
3164                None => (),
3165            }
3166            match storage {
3167                Some(HiveIOFormat::IOF {
3168                    input_format,
3169                    output_format,
3170                }) => f.write_fmt(format_args!(" STORED AS INPUTFORMAT {0} OUTPUTFORMAT {1}",
        input_format, output_format))write!(
3171                    f,
3172                    " STORED AS INPUTFORMAT {input_format} OUTPUTFORMAT {output_format}"
3173                )?,
3174                Some(HiveIOFormat::FileFormat { format }) if !self.external => {
3175                    f.write_fmt(format_args!(" STORED AS {0}", format))write!(f, " STORED AS {format}")?
3176                }
3177                _ => (),
3178            }
3179            if let Some(serde_properties) = serde_properties.as_ref() {
3180                f.write_fmt(format_args!(" WITH SERDEPROPERTIES ({0})",
        display_comma_separated(serde_properties)))write!(
3181                    f,
3182                    " WITH SERDEPROPERTIES ({})",
3183                    display_comma_separated(serde_properties)
3184                )?;
3185            }
3186            if !self.external {
3187                if let Some(loc) = location {
3188                    f.write_fmt(format_args!(" LOCATION \'{0}\'", loc))write!(f, " LOCATION '{loc}'")?;
3189                }
3190            }
3191        }
3192        if self.external {
3193            if let Some(file_format) = self.file_format {
3194                f.write_fmt(format_args!(" STORED AS {0}", file_format))write!(f, " STORED AS {file_format}")?;
3195            }
3196            if let Some(location) = &self.location {
3197                f.write_fmt(format_args!(" LOCATION \'{0}\'", location))write!(f, " LOCATION '{location}'")?;
3198            }
3199        }
3200
3201        match &self.table_options {
3202            options @ CreateTableOptions::With(_)
3203            | options @ CreateTableOptions::Plain(_)
3204            | options @ CreateTableOptions::TableProperties(_) => f.write_fmt(format_args!(" {0}", options))write!(f, " {options}")?,
3205            _ => (),
3206        }
3207
3208        if let Some(primary_key) = &self.primary_key {
3209            f.write_fmt(format_args!(" PRIMARY KEY {0}", primary_key))write!(f, " PRIMARY KEY {primary_key}")?;
3210        }
3211        if let Some(order_by) = &self.order_by {
3212            f.write_fmt(format_args!(" ORDER BY {0}", order_by))write!(f, " ORDER BY {order_by}")?;
3213        }
3214        if let Some(inherits) = &self.inherits {
3215            f.write_fmt(format_args!(" INHERITS ({0})",
        display_comma_separated(inherits)))write!(f, " INHERITS ({})", display_comma_separated(inherits))?;
3216        }
3217        if let Some(partition_by) = self.partition_by.as_ref() {
3218            f.write_fmt(format_args!(" PARTITION BY {0}", partition_by))write!(f, " PARTITION BY {partition_by}")?;
3219        }
3220        if let Some(cluster_by) = self.cluster_by.as_ref() {
3221            f.write_fmt(format_args!(" CLUSTER BY {0}", cluster_by))write!(f, " CLUSTER BY {cluster_by}")?;
3222        }
3223        if let options @ CreateTableOptions::Options(_) = &self.table_options {
3224            f.write_fmt(format_args!(" {0}", options))write!(f, " {options}")?;
3225        }
3226        if let Some(external_volume) = self.external_volume.as_ref() {
3227            f.write_fmt(format_args!(" EXTERNAL_VOLUME=\'{0}\'", external_volume))write!(f, " EXTERNAL_VOLUME='{external_volume}'")?;
3228        }
3229
3230        if let Some(catalog) = self.catalog.as_ref() {
3231            f.write_fmt(format_args!(" CATALOG=\'{0}\'", catalog))write!(f, " CATALOG='{catalog}'")?;
3232        }
3233
3234        if self.iceberg {
3235            if let Some(base_location) = self.base_location.as_ref() {
3236                f.write_fmt(format_args!(" BASE_LOCATION=\'{0}\'", base_location))write!(f, " BASE_LOCATION='{base_location}'")?;
3237            }
3238        }
3239
3240        if let Some(catalog_sync) = self.catalog_sync.as_ref() {
3241            f.write_fmt(format_args!(" CATALOG_SYNC=\'{0}\'", catalog_sync))write!(f, " CATALOG_SYNC='{catalog_sync}'")?;
3242        }
3243
3244        if let Some(storage_serialization_policy) = self.storage_serialization_policy.as_ref() {
3245            f.write_fmt(format_args!(" STORAGE_SERIALIZATION_POLICY={0}",
        storage_serialization_policy))write!(
3246                f,
3247                " STORAGE_SERIALIZATION_POLICY={storage_serialization_policy}"
3248            )?;
3249        }
3250
3251        if self.copy_grants {
3252            f.write_fmt(format_args!(" COPY GRANTS"))write!(f, " COPY GRANTS")?;
3253        }
3254
3255        if let Some(is_enabled) = self.enable_schema_evolution {
3256            f.write_fmt(format_args!(" ENABLE_SCHEMA_EVOLUTION={0}",
        if is_enabled { "TRUE" } else { "FALSE" }))write!(
3257                f,
3258                " ENABLE_SCHEMA_EVOLUTION={}",
3259                if is_enabled { "TRUE" } else { "FALSE" }
3260            )?;
3261        }
3262
3263        if let Some(is_enabled) = self.change_tracking {
3264            f.write_fmt(format_args!(" CHANGE_TRACKING={0}",
        if is_enabled { "TRUE" } else { "FALSE" }))write!(
3265                f,
3266                " CHANGE_TRACKING={}",
3267                if is_enabled { "TRUE" } else { "FALSE" }
3268            )?;
3269        }
3270
3271        if let Some(data_retention_time_in_days) = self.data_retention_time_in_days {
3272            f.write_fmt(format_args!(" DATA_RETENTION_TIME_IN_DAYS={0}",
        data_retention_time_in_days))write!(
3273                f,
3274                " DATA_RETENTION_TIME_IN_DAYS={data_retention_time_in_days}",
3275            )?;
3276        }
3277
3278        if let Some(max_data_extension_time_in_days) = self.max_data_extension_time_in_days {
3279            f.write_fmt(format_args!(" MAX_DATA_EXTENSION_TIME_IN_DAYS={0}",
        max_data_extension_time_in_days))write!(
3280                f,
3281                " MAX_DATA_EXTENSION_TIME_IN_DAYS={max_data_extension_time_in_days}",
3282            )?;
3283        }
3284
3285        if let Some(default_ddl_collation) = &self.default_ddl_collation {
3286            f.write_fmt(format_args!(" DEFAULT_DDL_COLLATION=\'{0}\'",
        default_ddl_collation))write!(f, " DEFAULT_DDL_COLLATION='{default_ddl_collation}'",)?;
3287        }
3288
3289        if let Some(with_aggregation_policy) = &self.with_aggregation_policy {
3290            f.write_fmt(format_args!(" WITH AGGREGATION POLICY {0}",
        with_aggregation_policy))write!(f, " WITH AGGREGATION POLICY {with_aggregation_policy}",)?;
3291        }
3292
3293        if let Some(row_access_policy) = &self.with_row_access_policy {
3294            f.write_fmt(format_args!(" {0}", row_access_policy))write!(f, " {row_access_policy}",)?;
3295        }
3296
3297        if let Some(tag) = &self.with_tags {
3298            f.write_fmt(format_args!(" WITH TAG ({0})",
        display_comma_separated(tag.as_slice())))write!(f, " WITH TAG ({})", display_comma_separated(tag.as_slice()))?;
3299        }
3300
3301        if let Some(target_lag) = &self.target_lag {
3302            f.write_fmt(format_args!(" TARGET_LAG=\'{0}\'", target_lag))write!(f, " TARGET_LAG='{target_lag}'")?;
3303        }
3304
3305        if let Some(warehouse) = &self.warehouse {
3306            f.write_fmt(format_args!(" WAREHOUSE={0}", warehouse))write!(f, " WAREHOUSE={warehouse}")?;
3307        }
3308
3309        if let Some(refresh_mode) = &self.refresh_mode {
3310            f.write_fmt(format_args!(" REFRESH_MODE={0}", refresh_mode))write!(f, " REFRESH_MODE={refresh_mode}")?;
3311        }
3312
3313        if let Some(initialize) = &self.initialize {
3314            f.write_fmt(format_args!(" INITIALIZE={0}", initialize))write!(f, " INITIALIZE={initialize}")?;
3315        }
3316
3317        if self.require_user {
3318            f.write_fmt(format_args!(" REQUIRE USER"))write!(f, " REQUIRE USER")?;
3319        }
3320
3321        if self.on_commit.is_some() {
3322            let on_commit = match self.on_commit {
3323                Some(OnCommit::DeleteRows) => "ON COMMIT DELETE ROWS",
3324                Some(OnCommit::PreserveRows) => "ON COMMIT PRESERVE ROWS",
3325                Some(OnCommit::Drop) => "ON COMMIT DROP",
3326                None => "",
3327            };
3328            f.write_fmt(format_args!(" {0}", on_commit))write!(f, " {on_commit}")?;
3329        }
3330        if self.strict {
3331            f.write_fmt(format_args!(" STRICT"))write!(f, " STRICT")?;
3332        }
3333        if let Some(query) = &self.query {
3334            f.write_fmt(format_args!(" AS {0}", query))write!(f, " AS {query}")?;
3335        }
3336        Ok(())
3337    }
3338}
3339
3340/// PostgreSQL partition bound specification for `PARTITION OF`.
3341///
3342/// Specifies partition bounds for a child partition table.
3343///
3344/// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-createtable.html)
3345#[derive(#[automatically_derived]
impl ::core::fmt::Debug for ForValues {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            ForValues::In(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "In",
                    &__self_0),
            ForValues::From { from: __self_0, to: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f, "From",
                    "from", __self_0, "to", &__self_1),
            ForValues::With { modulus: __self_0, remainder: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f, "With",
                    "modulus", __self_0, "remainder", &__self_1),
            ForValues::Default =>
                ::core::fmt::Formatter::write_str(f, "Default"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for ForValues {
    #[inline]
    fn clone(&self) -> ForValues {
        match self {
            ForValues::In(__self_0) =>
                ForValues::In(::core::clone::Clone::clone(__self_0)),
            ForValues::From { from: __self_0, to: __self_1 } =>
                ForValues::From {
                    from: ::core::clone::Clone::clone(__self_0),
                    to: ::core::clone::Clone::clone(__self_1),
                },
            ForValues::With { modulus: __self_0, remainder: __self_1 } =>
                ForValues::With {
                    modulus: ::core::clone::Clone::clone(__self_0),
                    remainder: ::core::clone::Clone::clone(__self_1),
                },
            ForValues::Default => ForValues::Default,
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for ForValues {
    #[inline]
    fn eq(&self, other: &ForValues) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (ForValues::In(__self_0), ForValues::In(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (ForValues::From { from: __self_0, to: __self_1 },
                    ForValues::From { from: __arg1_0, to: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (ForValues::With { modulus: __self_0, remainder: __self_1 },
                    ForValues::With { modulus: __arg1_0, remainder: __arg1_1 })
                    => __self_0 == __arg1_0 && __self_1 == __arg1_1,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for ForValues {
    #[inline]
    fn partial_cmp(&self, other: &ForValues)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (ForValues::In(__self_0), ForValues::In(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (ForValues::From { from: __self_0, to: __self_1 },
                ForValues::From { from: __arg1_0, to: __arg1_1 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                    cmp => cmp,
                },
            (ForValues::With { modulus: __self_0, remainder: __self_1 },
                ForValues::With { modulus: __arg1_0, remainder: __arg1_1 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                    cmp => cmp,
                },
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for ForValues {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Vec<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<PartitionBoundValue>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<PartitionBoundValue>>;
        let _: ::core::cmp::AssertParamIsEq<u64>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for ForValues {
    #[inline]
    fn cmp(&self, other: &ForValues) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (ForValues::In(__self_0), ForValues::In(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (ForValues::From { from: __self_0, to: __self_1 },
                        ForValues::From { from: __arg1_0, to: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (ForValues::With { modulus: __self_0, remainder: __self_1 },
                        ForValues::With { modulus: __arg1_0, remainder: __arg1_1 })
                        =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for ForValues {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            ForValues::In(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            ForValues::From { from: __self_0, to: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            ForValues::With { modulus: __self_0, remainder: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            _ => {}
        }
    }
}Hash)]
3346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3347#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for ForValues {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::In(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::From { from, to } => {
                                sqlparser::ast::Visit::visit(from, visitor)?;
                                sqlparser::ast::Visit::visit(to, visitor)?;
                            }
                            Self::With { modulus, remainder } => {
                                sqlparser::ast::Visit::visit(modulus, visitor)?;
                                sqlparser::ast::Visit::visit(remainder, visitor)?;
                            }
                            Self::Default => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for ForValues {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::In(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::From { from, to } => {
                                sqlparser::ast::VisitMut::visit(from, visitor)?;
                                sqlparser::ast::VisitMut::visit(to, visitor)?;
                            }
                            Self::With { modulus, remainder } => {
                                sqlparser::ast::VisitMut::visit(modulus, visitor)?;
                                sqlparser::ast::VisitMut::visit(remainder, visitor)?;
                            }
                            Self::Default => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3348pub enum ForValues {
3349    /// `FOR VALUES IN (expr, ...)`
3350    In(Vec<Expr>),
3351    /// `FOR VALUES FROM (expr|MINVALUE|MAXVALUE, ...) TO (expr|MINVALUE|MAXVALUE, ...)`
3352    From {
3353        /// The lower bound values for the partition.
3354        from: Vec<PartitionBoundValue>,
3355        /// The upper bound values for the partition.
3356        to: Vec<PartitionBoundValue>,
3357    },
3358    /// `FOR VALUES WITH (MODULUS n, REMAINDER r)`
3359    With {
3360        /// The modulus value for hash partitioning.
3361        modulus: u64,
3362        /// The remainder value for hash partitioning.
3363        remainder: u64,
3364    },
3365    /// `DEFAULT`
3366    Default,
3367}
3368
3369impl fmt::Display for ForValues {
3370    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3371        match self {
3372            ForValues::In(values) => {
3373                f.write_fmt(format_args!("FOR VALUES IN ({0})",
        display_comma_separated(values)))write!(f, "FOR VALUES IN ({})", display_comma_separated(values))
3374            }
3375            ForValues::From { from, to } => {
3376                f.write_fmt(format_args!("FOR VALUES FROM ({0}) TO ({1})",
        display_comma_separated(from), display_comma_separated(to)))write!(
3377                    f,
3378                    "FOR VALUES FROM ({}) TO ({})",
3379                    display_comma_separated(from),
3380                    display_comma_separated(to)
3381                )
3382            }
3383            ForValues::With { modulus, remainder } => {
3384                f.write_fmt(format_args!("FOR VALUES WITH (MODULUS {0}, REMAINDER {1})",
        modulus, remainder))write!(
3385                    f,
3386                    "FOR VALUES WITH (MODULUS {modulus}, REMAINDER {remainder})"
3387                )
3388            }
3389            ForValues::Default => f.write_fmt(format_args!("DEFAULT"))write!(f, "DEFAULT"),
3390        }
3391    }
3392}
3393
3394/// A value in a partition bound specification.
3395///
3396/// Used in RANGE partition bounds where values can be expressions,
3397/// MINVALUE (negative infinity), or MAXVALUE (positive infinity).
3398#[derive(#[automatically_derived]
impl ::core::fmt::Debug for PartitionBoundValue {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            PartitionBoundValue::Expr(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "Expr",
                    &__self_0),
            PartitionBoundValue::MinValue =>
                ::core::fmt::Formatter::write_str(f, "MinValue"),
            PartitionBoundValue::MaxValue =>
                ::core::fmt::Formatter::write_str(f, "MaxValue"),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for PartitionBoundValue {
    #[inline]
    fn clone(&self) -> PartitionBoundValue {
        match self {
            PartitionBoundValue::Expr(__self_0) =>
                PartitionBoundValue::Expr(::core::clone::Clone::clone(__self_0)),
            PartitionBoundValue::MinValue => PartitionBoundValue::MinValue,
            PartitionBoundValue::MaxValue => PartitionBoundValue::MaxValue,
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for PartitionBoundValue {
    #[inline]
    fn eq(&self, other: &PartitionBoundValue) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (PartitionBoundValue::Expr(__self_0),
                    PartitionBoundValue::Expr(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for PartitionBoundValue {
    #[inline]
    fn partial_cmp(&self, other: &PartitionBoundValue)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (PartitionBoundValue::Expr(__self_0),
                PartitionBoundValue::Expr(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for PartitionBoundValue {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Expr>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for PartitionBoundValue {
    #[inline]
    fn cmp(&self, other: &PartitionBoundValue) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (PartitionBoundValue::Expr(__self_0),
                        PartitionBoundValue::Expr(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for PartitionBoundValue {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            PartitionBoundValue::Expr(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
3399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3400#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for PartitionBoundValue {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Expr(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::MinValue => {}
                            Self::MaxValue => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for PartitionBoundValue {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Expr(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::MinValue => {}
                            Self::MaxValue => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3401pub enum PartitionBoundValue {
3402    /// An expression representing a partition bound value.
3403    Expr(Expr),
3404    /// Represents negative infinity in partition bounds.
3405    MinValue,
3406    /// Represents positive infinity in partition bounds.
3407    MaxValue,
3408}
3409
3410impl fmt::Display for PartitionBoundValue {
3411    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3412        match self {
3413            PartitionBoundValue::Expr(expr) => f.write_fmt(format_args!("{0}", expr))write!(f, "{expr}"),
3414            PartitionBoundValue::MinValue => f.write_fmt(format_args!("MINVALUE"))write!(f, "MINVALUE"),
3415            PartitionBoundValue::MaxValue => f.write_fmt(format_args!("MAXVALUE"))write!(f, "MAXVALUE"),
3416        }
3417    }
3418}
3419
3420#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateDomain {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f, "CreateDomain",
            "name", &self.name, "data_type", &self.data_type, "collation",
            &self.collation, "default", &self.default, "constraints",
            &&self.constraints)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateDomain {
    #[inline]
    fn clone(&self) -> CreateDomain {
        CreateDomain {
            name: ::core::clone::Clone::clone(&self.name),
            data_type: ::core::clone::Clone::clone(&self.data_type),
            collation: ::core::clone::Clone::clone(&self.collation),
            default: ::core::clone::Clone::clone(&self.default),
            constraints: ::core::clone::Clone::clone(&self.constraints),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateDomain {
    #[inline]
    fn eq(&self, other: &CreateDomain) -> bool {
        self.name == other.name && self.data_type == other.data_type &&
                    self.collation == other.collation &&
                self.default == other.default &&
            self.constraints == other.constraints
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateDomain {
    #[inline]
    fn partial_cmp(&self, other: &CreateDomain)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.data_type,
                        &other.data_type) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.collation,
                                &other.collation) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.default,
                                        &other.default) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        ::core::cmp::PartialOrd::partial_cmp(&self.constraints,
                                            &other.constraints),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateDomain {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<TableConstraint>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateDomain {
    #[inline]
    fn cmp(&self, other: &CreateDomain) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.data_type, &other.data_type)
                    {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.collation,
                                &other.collation) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.default, &other.default) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(&self.constraints,
                                            &other.constraints),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateDomain {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.data_type, state);
        ::core::hash::Hash::hash(&self.collation, state);
        ::core::hash::Hash::hash(&self.default, state);
        ::core::hash::Hash::hash(&self.constraints, state)
    }
}Hash)]
3421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3422#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateDomain {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.data_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.collation, visitor)?;
                        sqlparser::ast::Visit::visit(&self.default, visitor)?;
                        sqlparser::ast::Visit::visit(&self.constraints, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateDomain {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.data_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.collation,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.default,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.constraints,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3423/// ```sql
3424/// CREATE DOMAIN name [ AS ] data_type
3425///         [ COLLATE collation ]
3426///         [ DEFAULT expression ]
3427///         [ domain_constraint [ ... ] ]
3428///
3429///     where domain_constraint is:
3430///
3431///     [ CONSTRAINT constraint_name ]
3432///     { NOT NULL | NULL | CHECK (expression) }
3433/// ```
3434/// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-createdomain.html)
3435pub struct CreateDomain {
3436    /// The name of the domain to be created.
3437    pub name: ObjectName,
3438    /// The data type of the domain.
3439    pub data_type: DataType,
3440    /// The collation of the domain.
3441    pub collation: Option<Ident>,
3442    /// The default value of the domain.
3443    pub default: Option<Expr>,
3444    /// The constraints of the domain.
3445    pub constraints: Vec<TableConstraint>,
3446}
3447
3448impl fmt::Display for CreateDomain {
3449    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3450        f.write_fmt(format_args!("CREATE DOMAIN {0} AS {1}", self.name,
        self.data_type))write!(
3451            f,
3452            "CREATE DOMAIN {name} AS {data_type}",
3453            name = self.name,
3454            data_type = self.data_type
3455        )?;
3456        if let Some(collation) = &self.collation {
3457            f.write_fmt(format_args!(" COLLATE {0}", collation))write!(f, " COLLATE {collation}")?;
3458        }
3459        if let Some(default) = &self.default {
3460            f.write_fmt(format_args!(" DEFAULT {0}", default))write!(f, " DEFAULT {default}")?;
3461        }
3462        if !self.constraints.is_empty() {
3463            f.write_fmt(format_args!(" {0}", display_separated(&self.constraints, " ")))write!(f, " {}", display_separated(&self.constraints, " "))?;
3464        }
3465        Ok(())
3466    }
3467}
3468
3469#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateFunction {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["or_alter", "or_replace", "temporary", "if_not_exists", "name",
                        "args", "return_type", "function_body", "behavior",
                        "called_on_null", "parallel", "security", "set_params",
                        "using", "language", "determinism_specifier", "options",
                        "remote_connection"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.or_alter, &self.or_replace, &self.temporary,
                        &self.if_not_exists, &self.name, &self.args,
                        &self.return_type, &self.function_body, &self.behavior,
                        &self.called_on_null, &self.parallel, &self.security,
                        &self.set_params, &self.using, &self.language,
                        &self.determinism_specifier, &self.options,
                        &&self.remote_connection];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "CreateFunction", names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateFunction {
    #[inline]
    fn clone(&self) -> CreateFunction {
        CreateFunction {
            or_alter: ::core::clone::Clone::clone(&self.or_alter),
            or_replace: ::core::clone::Clone::clone(&self.or_replace),
            temporary: ::core::clone::Clone::clone(&self.temporary),
            if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
            name: ::core::clone::Clone::clone(&self.name),
            args: ::core::clone::Clone::clone(&self.args),
            return_type: ::core::clone::Clone::clone(&self.return_type),
            function_body: ::core::clone::Clone::clone(&self.function_body),
            behavior: ::core::clone::Clone::clone(&self.behavior),
            called_on_null: ::core::clone::Clone::clone(&self.called_on_null),
            parallel: ::core::clone::Clone::clone(&self.parallel),
            security: ::core::clone::Clone::clone(&self.security),
            set_params: ::core::clone::Clone::clone(&self.set_params),
            using: ::core::clone::Clone::clone(&self.using),
            language: ::core::clone::Clone::clone(&self.language),
            determinism_specifier: ::core::clone::Clone::clone(&self.determinism_specifier),
            options: ::core::clone::Clone::clone(&self.options),
            remote_connection: ::core::clone::Clone::clone(&self.remote_connection),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateFunction {
    #[inline]
    fn eq(&self, other: &CreateFunction) -> bool {
        self.or_alter == other.or_alter && self.or_replace == other.or_replace
                                                                        && self.temporary == other.temporary &&
                                                                    self.if_not_exists == other.if_not_exists &&
                                                                self.name == other.name && self.args == other.args &&
                                                        self.return_type == other.return_type &&
                                                    self.function_body == other.function_body &&
                                                self.behavior == other.behavior &&
                                            self.called_on_null == other.called_on_null &&
                                        self.parallel == other.parallel &&
                                    self.security == other.security &&
                                self.set_params == other.set_params &&
                            self.using == other.using && self.language == other.language
                    && self.determinism_specifier == other.determinism_specifier
                && self.options == other.options &&
            self.remote_connection == other.remote_connection
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateFunction {
    #[inline]
    fn partial_cmp(&self, other: &CreateFunction)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.or_alter,
                &other.or_alter) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.or_replace,
                        &other.or_replace) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.temporary,
                                &other.temporary) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
                                        &other.if_not_exists) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.name,
                                                &other.name) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.args,
                                                        &other.args) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.return_type,
                                                                &other.return_type) {
                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                =>
                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.function_body,
                                                                        &other.function_body) {
                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                        =>
                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.behavior,
                                                                                &other.behavior) {
                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                =>
                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.called_on_null,
                                                                                        &other.called_on_null) {
                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                        =>
                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.parallel,
                                                                                                &other.parallel) {
                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                =>
                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.security,
                                                                                                        &other.security) {
                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                        =>
                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.set_params,
                                                                                                                &other.set_params) {
                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                =>
                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                                                                                                                        &other.using) {
                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                        =>
                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.language,
                                                                                                                                &other.language) {
                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                =>
                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.determinism_specifier,
                                                                                                                                        &other.determinism_specifier) {
                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                        =>
                                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.options,
                                                                                                                                                &other.options) {
                                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                                =>
                                                                                                                                                ::core::cmp::PartialOrd::partial_cmp(&self.remote_connection,
                                                                                                                                                    &other.remote_connection),
                                                                                                                                            cmp => cmp,
                                                                                                                                        },
                                                                                                                                    cmp => cmp,
                                                                                                                                },
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateFunction {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<OperateFunctionArg>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<Option<CreateFunctionBody>>;
        let _: ::core::cmp::AssertParamIsEq<Option<FunctionBehavior>>;
        let _: ::core::cmp::AssertParamIsEq<Option<FunctionCalledOnNull>>;
        let _: ::core::cmp::AssertParamIsEq<Option<FunctionParallel>>;
        let _: ::core::cmp::AssertParamIsEq<Option<FunctionSecurity>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<FunctionDefinitionSetParam>>;
        let _: ::core::cmp::AssertParamIsEq<Option<CreateFunctionUsing>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _:
                ::core::cmp::AssertParamIsEq<Option<FunctionDeterminismSpecifier>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateFunction {
    #[inline]
    fn cmp(&self, other: &CreateFunction) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.or_alter, &other.or_alter) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.or_replace,
                        &other.or_replace) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.temporary,
                                &other.temporary) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.if_not_exists,
                                        &other.if_not_exists) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.args, &other.args) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        match ::core::cmp::Ord::cmp(&self.return_type,
                                                                &other.return_type) {
                                                            ::core::cmp::Ordering::Equal =>
                                                                match ::core::cmp::Ord::cmp(&self.function_body,
                                                                        &other.function_body) {
                                                                    ::core::cmp::Ordering::Equal =>
                                                                        match ::core::cmp::Ord::cmp(&self.behavior, &other.behavior)
                                                                            {
                                                                            ::core::cmp::Ordering::Equal =>
                                                                                match ::core::cmp::Ord::cmp(&self.called_on_null,
                                                                                        &other.called_on_null) {
                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                        match ::core::cmp::Ord::cmp(&self.parallel, &other.parallel)
                                                                                            {
                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                match ::core::cmp::Ord::cmp(&self.security, &other.security)
                                                                                                    {
                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                        match ::core::cmp::Ord::cmp(&self.set_params,
                                                                                                                &other.set_params) {
                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                        match ::core::cmp::Ord::cmp(&self.language, &other.language)
                                                                                                                            {
                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                match ::core::cmp::Ord::cmp(&self.determinism_specifier,
                                                                                                                                        &other.determinism_specifier) {
                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                        match ::core::cmp::Ord::cmp(&self.options, &other.options) {
                                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                                ::core::cmp::Ord::cmp(&self.remote_connection,
                                                                                                                                                    &other.remote_connection),
                                                                                                                                            cmp => cmp,
                                                                                                                                        },
                                                                                                                                    cmp => cmp,
                                                                                                                                },
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateFunction {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.or_alter, state);
        ::core::hash::Hash::hash(&self.or_replace, state);
        ::core::hash::Hash::hash(&self.temporary, state);
        ::core::hash::Hash::hash(&self.if_not_exists, state);
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.args, state);
        ::core::hash::Hash::hash(&self.return_type, state);
        ::core::hash::Hash::hash(&self.function_body, state);
        ::core::hash::Hash::hash(&self.behavior, state);
        ::core::hash::Hash::hash(&self.called_on_null, state);
        ::core::hash::Hash::hash(&self.parallel, state);
        ::core::hash::Hash::hash(&self.security, state);
        ::core::hash::Hash::hash(&self.set_params, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.language, state);
        ::core::hash::Hash::hash(&self.determinism_specifier, state);
        ::core::hash::Hash::hash(&self.options, state);
        ::core::hash::Hash::hash(&self.remote_connection, state)
    }
}Hash)]
3470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3471#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateFunction {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.or_alter, visitor)?;
                        sqlparser::ast::Visit::visit(&self.or_replace, visitor)?;
                        sqlparser::ast::Visit::visit(&self.temporary, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.args, visitor)?;
                        sqlparser::ast::Visit::visit(&self.return_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.function_body, visitor)?;
                        sqlparser::ast::Visit::visit(&self.behavior, visitor)?;
                        sqlparser::ast::Visit::visit(&self.called_on_null,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.parallel, visitor)?;
                        sqlparser::ast::Visit::visit(&self.security, visitor)?;
                        sqlparser::ast::Visit::visit(&self.set_params, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.language, visitor)?;
                        sqlparser::ast::Visit::visit(&self.determinism_specifier,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.options, visitor)?;
                        sqlparser::ast::Visit::visit(&self.remote_connection,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateFunction {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.or_alter,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.or_replace,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.temporary,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.args, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.return_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.function_body,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.behavior,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.called_on_null,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.parallel,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.security,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.set_params,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.language,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.determinism_specifier,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.options,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.remote_connection,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3472/// CREATE FUNCTION statement
3473pub struct CreateFunction {
3474    /// True if this is a `CREATE OR ALTER FUNCTION` statement
3475    ///
3476    /// [MsSql](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-function-transact-sql?view=sql-server-ver16#or-alter)
3477    pub or_alter: bool,
3478    /// True if this is a `CREATE OR REPLACE FUNCTION` statement
3479    pub or_replace: bool,
3480    /// True if this is a `CREATE TEMPORARY FUNCTION` statement
3481    pub temporary: bool,
3482    /// True if this is a `CREATE IF NOT EXISTS FUNCTION` statement
3483    pub if_not_exists: bool,
3484    /// Name of the function to be created.
3485    pub name: ObjectName,
3486    /// List of arguments for the function.
3487    pub args: Option<Vec<OperateFunctionArg>>,
3488    /// The return type of the function.
3489    pub return_type: Option<DataType>,
3490    /// The expression that defines the function.
3491    ///
3492    /// Examples:
3493    /// ```sql
3494    /// AS ((SELECT 1))
3495    /// AS "console.log();"
3496    /// ```
3497    pub function_body: Option<CreateFunctionBody>,
3498    /// Behavior attribute for the function
3499    ///
3500    /// IMMUTABLE | STABLE | VOLATILE
3501    ///
3502    /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
3503    pub behavior: Option<FunctionBehavior>,
3504    /// CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT | STRICT
3505    ///
3506    /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
3507    pub called_on_null: Option<FunctionCalledOnNull>,
3508    /// PARALLEL { UNSAFE | RESTRICTED | SAFE }
3509    ///
3510    /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
3511    pub parallel: Option<FunctionParallel>,
3512    /// SECURITY { DEFINER | INVOKER }
3513    ///
3514    /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
3515    pub security: Option<FunctionSecurity>,
3516    /// SET configuration_parameter clauses
3517    ///
3518    /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createfunction.html)
3519    pub set_params: Vec<FunctionDefinitionSetParam>,
3520    /// USING ... (Hive only)
3521    pub using: Option<CreateFunctionUsing>,
3522    /// Language used in a UDF definition.
3523    ///
3524    /// Example:
3525    /// ```sql
3526    /// CREATE FUNCTION foo() LANGUAGE js AS "console.log();"
3527    /// ```
3528    /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_a_javascript_udf)
3529    pub language: Option<Ident>,
3530    /// Determinism keyword used for non-sql UDF definitions.
3531    ///
3532    /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#syntax_11)
3533    pub determinism_specifier: Option<FunctionDeterminismSpecifier>,
3534    /// List of options for creating the function.
3535    ///
3536    /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#syntax_11)
3537    pub options: Option<Vec<SqlOption>>,
3538    /// Connection resource for a remote function.
3539    ///
3540    /// Example:
3541    /// ```sql
3542    /// CREATE FUNCTION foo()
3543    /// RETURNS FLOAT64
3544    /// REMOTE WITH CONNECTION us.myconnection
3545    /// ```
3546    /// [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_a_remote_function)
3547    pub remote_connection: Option<ObjectName>,
3548}
3549
3550impl fmt::Display for CreateFunction {
3551    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3552        f.write_fmt(format_args!("CREATE {2}{3}{1}FUNCTION {4}{0}", self.name,
        if self.temporary { "TEMPORARY " } else { "" },
        if self.or_alter { "OR ALTER " } else { "" },
        if self.or_replace { "OR REPLACE " } else { "" },
        if self.if_not_exists { "IF NOT EXISTS " } else { "" }))write!(
3553            f,
3554            "CREATE {or_alter}{or_replace}{temp}FUNCTION {if_not_exists}{name}",
3555            name = self.name,
3556            temp = if self.temporary { "TEMPORARY " } else { "" },
3557            or_alter = if self.or_alter { "OR ALTER " } else { "" },
3558            or_replace = if self.or_replace { "OR REPLACE " } else { "" },
3559            if_not_exists = if self.if_not_exists {
3560                "IF NOT EXISTS "
3561            } else {
3562                ""
3563            },
3564        )?;
3565        if let Some(args) = &self.args {
3566            f.write_fmt(format_args!("({0})", display_comma_separated(args)))write!(f, "({})", display_comma_separated(args))?;
3567        }
3568        if let Some(return_type) = &self.return_type {
3569            f.write_fmt(format_args!(" RETURNS {0}", return_type))write!(f, " RETURNS {return_type}")?;
3570        }
3571        if let Some(determinism_specifier) = &self.determinism_specifier {
3572            f.write_fmt(format_args!(" {0}", determinism_specifier))write!(f, " {determinism_specifier}")?;
3573        }
3574        if let Some(language) = &self.language {
3575            f.write_fmt(format_args!(" LANGUAGE {0}", language))write!(f, " LANGUAGE {language}")?;
3576        }
3577        if let Some(behavior) = &self.behavior {
3578            f.write_fmt(format_args!(" {0}", behavior))write!(f, " {behavior}")?;
3579        }
3580        if let Some(called_on_null) = &self.called_on_null {
3581            f.write_fmt(format_args!(" {0}", called_on_null))write!(f, " {called_on_null}")?;
3582        }
3583        if let Some(parallel) = &self.parallel {
3584            f.write_fmt(format_args!(" {0}", parallel))write!(f, " {parallel}")?;
3585        }
3586        if let Some(security) = &self.security {
3587            f.write_fmt(format_args!(" {0}", security))write!(f, " {security}")?;
3588        }
3589        for set_param in &self.set_params {
3590            f.write_fmt(format_args!(" {0}", set_param))write!(f, " {set_param}")?;
3591        }
3592        if let Some(remote_connection) = &self.remote_connection {
3593            f.write_fmt(format_args!(" REMOTE WITH CONNECTION {0}", remote_connection))write!(f, " REMOTE WITH CONNECTION {remote_connection}")?;
3594        }
3595        if let Some(CreateFunctionBody::AsBeforeOptions { body, link_symbol }) = &self.function_body
3596        {
3597            f.write_fmt(format_args!(" AS {0}", body))write!(f, " AS {body}")?;
3598            if let Some(link_symbol) = link_symbol {
3599                f.write_fmt(format_args!(", {0}", link_symbol))write!(f, ", {link_symbol}")?;
3600            }
3601        }
3602        if let Some(CreateFunctionBody::Return(function_body)) = &self.function_body {
3603            f.write_fmt(format_args!(" RETURN {0}", function_body))write!(f, " RETURN {function_body}")?;
3604        }
3605        if let Some(CreateFunctionBody::AsReturnExpr(function_body)) = &self.function_body {
3606            f.write_fmt(format_args!(" AS RETURN {0}", function_body))write!(f, " AS RETURN {function_body}")?;
3607        }
3608        if let Some(CreateFunctionBody::AsReturnSelect(function_body)) = &self.function_body {
3609            f.write_fmt(format_args!(" AS RETURN {0}", function_body))write!(f, " AS RETURN {function_body}")?;
3610        }
3611        if let Some(using) = &self.using {
3612            f.write_fmt(format_args!(" {0}", using))write!(f, " {using}")?;
3613        }
3614        if let Some(options) = &self.options {
3615            f.write_fmt(format_args!(" OPTIONS({0})",
        display_comma_separated(options.as_slice())))write!(
3616                f,
3617                " OPTIONS({})",
3618                display_comma_separated(options.as_slice())
3619            )?;
3620        }
3621        if let Some(CreateFunctionBody::AsAfterOptions(function_body)) = &self.function_body {
3622            f.write_fmt(format_args!(" AS {0}", function_body))write!(f, " AS {function_body}")?;
3623        }
3624        if let Some(CreateFunctionBody::AsBeginEnd(bes)) = &self.function_body {
3625            f.write_fmt(format_args!(" AS {0}", bes))write!(f, " AS {bes}")?;
3626        }
3627        Ok(())
3628    }
3629}
3630
3631/// ```sql
3632/// CREATE CONNECTOR [IF NOT EXISTS] connector_name
3633/// [TYPE datasource_type]
3634/// [URL datasource_url]
3635/// [COMMENT connector_comment]
3636/// [WITH DCPROPERTIES(property_name=property_value, ...)]
3637/// ```
3638///
3639/// [Hive](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=27362034#LanguageManualDDL-CreateDataConnectorCreateConnector)
3640#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateConnector {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "if_not_exists", "connector_type", "url", "comment",
                        "with_dcproperties"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.if_not_exists, &self.connector_type,
                        &self.url, &self.comment, &&self.with_dcproperties];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "CreateConnector", names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateConnector {
    #[inline]
    fn clone(&self) -> CreateConnector {
        CreateConnector {
            name: ::core::clone::Clone::clone(&self.name),
            if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
            connector_type: ::core::clone::Clone::clone(&self.connector_type),
            url: ::core::clone::Clone::clone(&self.url),
            comment: ::core::clone::Clone::clone(&self.comment),
            with_dcproperties: ::core::clone::Clone::clone(&self.with_dcproperties),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateConnector {
    #[inline]
    fn eq(&self, other: &CreateConnector) -> bool {
        self.if_not_exists == other.if_not_exists && self.name == other.name
                        && self.connector_type == other.connector_type &&
                    self.url == other.url && self.comment == other.comment &&
            self.with_dcproperties == other.with_dcproperties
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateConnector {
    #[inline]
    fn partial_cmp(&self, other: &CreateConnector)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
                        &other.if_not_exists) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.connector_type,
                                &other.connector_type) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.url,
                                        &other.url) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.comment,
                                                &other.comment) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                ::core::cmp::PartialOrd::partial_cmp(&self.with_dcproperties,
                                                    &other.with_dcproperties),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateConnector {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<CommentDef>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateConnector {
    #[inline]
    fn cmp(&self, other: &CreateConnector) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.if_not_exists,
                        &other.if_not_exists) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.connector_type,
                                &other.connector_type) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.url, &other.url) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.comment, &other.comment) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(&self.with_dcproperties,
                                                    &other.with_dcproperties),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateConnector {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.if_not_exists, state);
        ::core::hash::Hash::hash(&self.connector_type, state);
        ::core::hash::Hash::hash(&self.url, state);
        ::core::hash::Hash::hash(&self.comment, state);
        ::core::hash::Hash::hash(&self.with_dcproperties, state)
    }
}Hash)]
3641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3642#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateConnector {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.connector_type,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.url, visitor)?;
                        sqlparser::ast::Visit::visit(&self.comment, visitor)?;
                        sqlparser::ast::Visit::visit(&self.with_dcproperties,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateConnector {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.connector_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.url, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.comment,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.with_dcproperties,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3643pub struct CreateConnector {
3644    /// The name of the connector to be created.
3645    pub name: Ident,
3646    /// Whether `IF NOT EXISTS` was specified.
3647    pub if_not_exists: bool,
3648    /// The type of the connector.
3649    pub connector_type: Option<String>,
3650    /// The URL of the connector.
3651    pub url: Option<String>,
3652    /// The comment for the connector.
3653    pub comment: Option<CommentDef>,
3654    /// The DC properties for the connector.
3655    pub with_dcproperties: Option<Vec<SqlOption>>,
3656}
3657
3658impl fmt::Display for CreateConnector {
3659    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3660        f.write_fmt(format_args!("CREATE CONNECTOR {0}{1}",
        if self.if_not_exists { "IF NOT EXISTS " } else { "" }, self.name))write!(
3661            f,
3662            "CREATE CONNECTOR {if_not_exists}{name}",
3663            if_not_exists = if self.if_not_exists {
3664                "IF NOT EXISTS "
3665            } else {
3666                ""
3667            },
3668            name = self.name,
3669        )?;
3670
3671        if let Some(connector_type) = &self.connector_type {
3672            f.write_fmt(format_args!(" TYPE \'{0}\'", connector_type))write!(f, " TYPE '{connector_type}'")?;
3673        }
3674
3675        if let Some(url) = &self.url {
3676            f.write_fmt(format_args!(" URL \'{0}\'", url))write!(f, " URL '{url}'")?;
3677        }
3678
3679        if let Some(comment) = &self.comment {
3680            f.write_fmt(format_args!(" COMMENT = \'{0}\'", comment))write!(f, " COMMENT = '{comment}'")?;
3681        }
3682
3683        if let Some(with_dcproperties) = &self.with_dcproperties {
3684            f.write_fmt(format_args!(" WITH DCPROPERTIES({0})",
        display_comma_separated(with_dcproperties)))write!(
3685                f,
3686                " WITH DCPROPERTIES({})",
3687                display_comma_separated(with_dcproperties)
3688            )?;
3689        }
3690
3691        Ok(())
3692    }
3693}
3694
3695/// An `ALTER SCHEMA` (`Statement::AlterSchema`) operation.
3696///
3697/// See [BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_schema_collate_statement)
3698/// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-alterschema.html)
3699#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterSchemaOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterSchemaOperation::SetDefaultCollate { collate: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetDefaultCollate", "collate", &__self_0),
            AlterSchemaOperation::AddReplica {
                replica: __self_0, options: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "AddReplica", "replica", __self_0, "options", &__self_1),
            AlterSchemaOperation::DropReplica { replica: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "DropReplica", "replica", &__self_0),
            AlterSchemaOperation::SetOptionsParens { options: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetOptionsParens", "options", &__self_0),
            AlterSchemaOperation::Rename { name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "Rename", "name", &__self_0),
            AlterSchemaOperation::OwnerTo { owner: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "OwnerTo", "owner", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterSchemaOperation {
    #[inline]
    fn clone(&self) -> AlterSchemaOperation {
        match self {
            AlterSchemaOperation::SetDefaultCollate { collate: __self_0 } =>
                AlterSchemaOperation::SetDefaultCollate {
                    collate: ::core::clone::Clone::clone(__self_0),
                },
            AlterSchemaOperation::AddReplica {
                replica: __self_0, options: __self_1 } =>
                AlterSchemaOperation::AddReplica {
                    replica: ::core::clone::Clone::clone(__self_0),
                    options: ::core::clone::Clone::clone(__self_1),
                },
            AlterSchemaOperation::DropReplica { replica: __self_0 } =>
                AlterSchemaOperation::DropReplica {
                    replica: ::core::clone::Clone::clone(__self_0),
                },
            AlterSchemaOperation::SetOptionsParens { options: __self_0 } =>
                AlterSchemaOperation::SetOptionsParens {
                    options: ::core::clone::Clone::clone(__self_0),
                },
            AlterSchemaOperation::Rename { name: __self_0 } =>
                AlterSchemaOperation::Rename {
                    name: ::core::clone::Clone::clone(__self_0),
                },
            AlterSchemaOperation::OwnerTo { owner: __self_0 } =>
                AlterSchemaOperation::OwnerTo {
                    owner: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterSchemaOperation {
    #[inline]
    fn eq(&self, other: &AlterSchemaOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterSchemaOperation::SetDefaultCollate { collate: __self_0
                    }, AlterSchemaOperation::SetDefaultCollate {
                    collate: __arg1_0 }) => __self_0 == __arg1_0,
                (AlterSchemaOperation::AddReplica {
                    replica: __self_0, options: __self_1 },
                    AlterSchemaOperation::AddReplica {
                    replica: __arg1_0, options: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (AlterSchemaOperation::DropReplica { replica: __self_0 },
                    AlterSchemaOperation::DropReplica { replica: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterSchemaOperation::SetOptionsParens { options: __self_0 },
                    AlterSchemaOperation::SetOptionsParens { options: __arg1_0
                    }) => __self_0 == __arg1_0,
                (AlterSchemaOperation::Rename { name: __self_0 },
                    AlterSchemaOperation::Rename { name: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterSchemaOperation::OwnerTo { owner: __self_0 },
                    AlterSchemaOperation::OwnerTo { owner: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterSchemaOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterSchemaOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterSchemaOperation::SetDefaultCollate { collate: __self_0 },
                AlterSchemaOperation::SetDefaultCollate { collate: __arg1_0 })
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterSchemaOperation::AddReplica {
                replica: __self_0, options: __self_1 },
                AlterSchemaOperation::AddReplica {
                replica: __arg1_0, options: __arg1_1 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                    cmp => cmp,
                },
            (AlterSchemaOperation::DropReplica { replica: __self_0 },
                AlterSchemaOperation::DropReplica { replica: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterSchemaOperation::SetOptionsParens { options: __self_0 },
                AlterSchemaOperation::SetOptionsParens { options: __arg1_0 })
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterSchemaOperation::Rename { name: __self_0 },
                AlterSchemaOperation::Rename { name: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterSchemaOperation::OwnerTo { owner: __self_0 },
                AlterSchemaOperation::OwnerTo { owner: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterSchemaOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Expr>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<SqlOption>>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<SqlOption>>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Owner>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterSchemaOperation {
    #[inline]
    fn cmp(&self, other: &AlterSchemaOperation) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterSchemaOperation::SetDefaultCollate { collate: __self_0
                        }, AlterSchemaOperation::SetDefaultCollate {
                        collate: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterSchemaOperation::AddReplica {
                        replica: __self_0, options: __self_1 },
                        AlterSchemaOperation::AddReplica {
                        replica: __arg1_0, options: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (AlterSchemaOperation::DropReplica { replica: __self_0 },
                        AlterSchemaOperation::DropReplica { replica: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterSchemaOperation::SetOptionsParens { options: __self_0
                        }, AlterSchemaOperation::SetOptionsParens {
                        options: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterSchemaOperation::Rename { name: __self_0 },
                        AlterSchemaOperation::Rename { name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterSchemaOperation::OwnerTo { owner: __self_0 },
                        AlterSchemaOperation::OwnerTo { owner: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterSchemaOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterSchemaOperation::SetDefaultCollate { collate: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterSchemaOperation::AddReplica {
                replica: __self_0, options: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            AlterSchemaOperation::DropReplica { replica: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterSchemaOperation::SetOptionsParens { options: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterSchemaOperation::Rename { name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterSchemaOperation::OwnerTo { owner: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
3700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3701#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterSchemaOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::SetDefaultCollate { collate } => {
                                sqlparser::ast::Visit::visit(collate, visitor)?;
                            }
                            Self::AddReplica { replica, options } => {
                                sqlparser::ast::Visit::visit(replica, visitor)?;
                                sqlparser::ast::Visit::visit(options, visitor)?;
                            }
                            Self::DropReplica { replica } => {
                                sqlparser::ast::Visit::visit(replica, visitor)?;
                            }
                            Self::SetOptionsParens { options } => {
                                sqlparser::ast::Visit::visit(options, visitor)?;
                            }
                            Self::Rename { name } => {
                                sqlparser::ast::Visit::visit(name, visitor)?;
                            }
                            Self::OwnerTo { owner } => {
                                sqlparser::ast::Visit::visit(owner, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterSchemaOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::SetDefaultCollate { collate } => {
                                sqlparser::ast::VisitMut::visit(collate, visitor)?;
                            }
                            Self::AddReplica { replica, options } => {
                                sqlparser::ast::VisitMut::visit(replica, visitor)?;
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                            }
                            Self::DropReplica { replica } => {
                                sqlparser::ast::VisitMut::visit(replica, visitor)?;
                            }
                            Self::SetOptionsParens { options } => {
                                sqlparser::ast::VisitMut::visit(options, visitor)?;
                            }
                            Self::Rename { name } => {
                                sqlparser::ast::VisitMut::visit(name, visitor)?;
                            }
                            Self::OwnerTo { owner } => {
                                sqlparser::ast::VisitMut::visit(owner, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3702pub enum AlterSchemaOperation {
3703    /// Set the default collation for the schema.
3704    SetDefaultCollate {
3705        /// The collation to set as default.
3706        collate: Expr,
3707    },
3708    /// Add a replica to the schema.
3709    AddReplica {
3710        /// The replica to add.
3711        replica: Ident,
3712        /// Optional options for the replica.
3713        options: Option<Vec<SqlOption>>,
3714    },
3715    /// Drop a replica from the schema.
3716    DropReplica {
3717        /// The replica to drop.
3718        replica: Ident,
3719    },
3720    /// Set options for the schema.
3721    SetOptionsParens {
3722        /// The options to set.
3723        options: Vec<SqlOption>,
3724    },
3725    /// Rename the schema.
3726    Rename {
3727        /// The new name for the schema.
3728        name: ObjectName,
3729    },
3730    /// Change the owner of the schema.
3731    OwnerTo {
3732        /// The new owner of the schema.
3733        owner: Owner,
3734    },
3735}
3736
3737impl fmt::Display for AlterSchemaOperation {
3738    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3739        match self {
3740            AlterSchemaOperation::SetDefaultCollate { collate } => {
3741                f.write_fmt(format_args!("SET DEFAULT COLLATE {0}", collate))write!(f, "SET DEFAULT COLLATE {collate}")
3742            }
3743            AlterSchemaOperation::AddReplica { replica, options } => {
3744                f.write_fmt(format_args!("ADD REPLICA {0}", replica))write!(f, "ADD REPLICA {replica}")?;
3745                if let Some(options) = options {
3746                    f.write_fmt(format_args!(" OPTIONS ({0})", display_comma_separated(options)))write!(f, " OPTIONS ({})", display_comma_separated(options))?;
3747                }
3748                Ok(())
3749            }
3750            AlterSchemaOperation::DropReplica { replica } => f.write_fmt(format_args!("DROP REPLICA {0}", replica))write!(f, "DROP REPLICA {replica}"),
3751            AlterSchemaOperation::SetOptionsParens { options } => {
3752                f.write_fmt(format_args!("SET OPTIONS ({0})",
        display_comma_separated(options)))write!(f, "SET OPTIONS ({})", display_comma_separated(options))
3753            }
3754            AlterSchemaOperation::Rename { name } => f.write_fmt(format_args!("RENAME TO {0}", name))write!(f, "RENAME TO {name}"),
3755            AlterSchemaOperation::OwnerTo { owner } => f.write_fmt(format_args!("OWNER TO {0}", owner))write!(f, "OWNER TO {owner}"),
3756        }
3757    }
3758}
3759/// `RenameTableNameKind` is the kind used in an `ALTER TABLE _ RENAME` statement.
3760///
3761/// Note: [MySQL] is the only database that supports the AS keyword for this operation.
3762///
3763/// [MySQL]: https://dev.mysql.com/doc/refman/8.4/en/alter-table.html
3764#[derive(#[automatically_derived]
impl ::core::fmt::Debug for RenameTableNameKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            RenameTableNameKind::As(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "As",
                    &__self_0),
            RenameTableNameKind::To(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "To",
                    &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for RenameTableNameKind {
    #[inline]
    fn clone(&self) -> RenameTableNameKind {
        match self {
            RenameTableNameKind::As(__self_0) =>
                RenameTableNameKind::As(::core::clone::Clone::clone(__self_0)),
            RenameTableNameKind::To(__self_0) =>
                RenameTableNameKind::To(::core::clone::Clone::clone(__self_0)),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for RenameTableNameKind {
    #[inline]
    fn eq(&self, other: &RenameTableNameKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (RenameTableNameKind::As(__self_0),
                    RenameTableNameKind::As(__arg1_0)) => __self_0 == __arg1_0,
                (RenameTableNameKind::To(__self_0),
                    RenameTableNameKind::To(__arg1_0)) => __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for RenameTableNameKind {
    #[inline]
    fn partial_cmp(&self, other: &RenameTableNameKind)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (RenameTableNameKind::As(__self_0),
                RenameTableNameKind::As(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (RenameTableNameKind::To(__self_0),
                RenameTableNameKind::To(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for RenameTableNameKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for RenameTableNameKind {
    #[inline]
    fn cmp(&self, other: &RenameTableNameKind) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (RenameTableNameKind::As(__self_0),
                        RenameTableNameKind::As(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (RenameTableNameKind::To(__self_0),
                        RenameTableNameKind::To(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for RenameTableNameKind {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            RenameTableNameKind::As(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            RenameTableNameKind::To(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
3765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3766#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for RenameTableNameKind {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::As(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::To(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for RenameTableNameKind {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::As(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::To(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3767pub enum RenameTableNameKind {
3768    /// `AS new_table_name`
3769    As(ObjectName),
3770    /// `TO new_table_name`
3771    To(ObjectName),
3772}
3773
3774impl fmt::Display for RenameTableNameKind {
3775    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3776        match self {
3777            RenameTableNameKind::As(name) => f.write_fmt(format_args!("AS {0}", name))write!(f, "AS {name}"),
3778            RenameTableNameKind::To(name) => f.write_fmt(format_args!("TO {0}", name))write!(f, "TO {name}"),
3779        }
3780    }
3781}
3782
3783#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterSchema {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "AlterSchema",
            "name", &self.name, "if_exists", &self.if_exists, "operations",
            &&self.operations)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterSchema {
    #[inline]
    fn clone(&self) -> AlterSchema {
        AlterSchema {
            name: ::core::clone::Clone::clone(&self.name),
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            operations: ::core::clone::Clone::clone(&self.operations),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterSchema {
    #[inline]
    fn eq(&self, other: &AlterSchema) -> bool {
        self.if_exists == other.if_exists && self.name == other.name &&
            self.operations == other.operations
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterSchema {
    #[inline]
    fn partial_cmp(&self, other: &AlterSchema)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                        &other.if_exists) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.operations,
                            &other.operations),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterSchema {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<AlterSchemaOperation>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterSchema {
    #[inline]
    fn cmp(&self, other: &AlterSchema) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.operations, &other.operations),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterSchema {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.operations, state)
    }
}Hash)]
3784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3785#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterSchema {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operations, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterSchema {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operations,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3786/// An `ALTER SCHEMA` (`Statement::AlterSchema`) statement.
3787pub struct AlterSchema {
3788    /// The schema name to alter.
3789    pub name: ObjectName,
3790    /// Whether `IF EXISTS` was specified.
3791    pub if_exists: bool,
3792    /// The list of operations to perform on the schema.
3793    pub operations: Vec<AlterSchemaOperation>,
3794}
3795
3796impl fmt::Display for AlterSchema {
3797    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3798        f.write_fmt(format_args!("ALTER SCHEMA "))write!(f, "ALTER SCHEMA ")?;
3799        if self.if_exists {
3800            f.write_fmt(format_args!("IF EXISTS "))write!(f, "IF EXISTS ")?;
3801        }
3802        f.write_fmt(format_args!("{0}", self.name))write!(f, "{}", self.name)?;
3803        for operation in &self.operations {
3804            f.write_fmt(format_args!(" {0}", operation))write!(f, " {operation}")?;
3805        }
3806
3807        Ok(())
3808    }
3809}
3810
3811impl Spanned for RenameTableNameKind {
3812    fn span(&self) -> Span {
3813        match self {
3814            RenameTableNameKind::As(name) => name.span(),
3815            RenameTableNameKind::To(name) => name.span(),
3816        }
3817    }
3818}
3819
3820#[derive(#[automatically_derived]
impl ::core::fmt::Debug for TriggerObjectKind {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            TriggerObjectKind::For(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f, "For",
                    &__self_0),
            TriggerObjectKind::ForEach(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "ForEach", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for TriggerObjectKind {
    #[inline]
    fn clone(&self) -> TriggerObjectKind {
        let _: ::core::clone::AssertParamIsClone<TriggerObject>;
        *self
    }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for TriggerObjectKind { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for TriggerObjectKind {
    #[inline]
    fn eq(&self, other: &TriggerObjectKind) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (TriggerObjectKind::For(__self_0),
                    TriggerObjectKind::For(__arg1_0)) => __self_0 == __arg1_0,
                (TriggerObjectKind::ForEach(__self_0),
                    TriggerObjectKind::ForEach(__arg1_0)) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for TriggerObjectKind {
    #[inline]
    fn partial_cmp(&self, other: &TriggerObjectKind)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (TriggerObjectKind::For(__self_0),
                TriggerObjectKind::For(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (TriggerObjectKind::ForEach(__self_0),
                TriggerObjectKind::ForEach(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for TriggerObjectKind {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<TriggerObject>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for TriggerObjectKind {
    #[inline]
    fn cmp(&self, other: &TriggerObjectKind) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (TriggerObjectKind::For(__self_0),
                        TriggerObjectKind::For(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (TriggerObjectKind::ForEach(__self_0),
                        TriggerObjectKind::ForEach(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for TriggerObjectKind {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            TriggerObjectKind::For(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            TriggerObjectKind::ForEach(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
3821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3822#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for TriggerObjectKind {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::For(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::ForEach(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for TriggerObjectKind {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::For(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::ForEach(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3823/// Whether the syntax used for the trigger object (ROW or STATEMENT) is `FOR` or `FOR EACH`.
3824pub enum TriggerObjectKind {
3825    /// The `FOR` syntax is used.
3826    For(TriggerObject),
3827    /// The `FOR EACH` syntax is used.
3828    ForEach(TriggerObject),
3829}
3830
3831impl Display for TriggerObjectKind {
3832    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3833        match self {
3834            TriggerObjectKind::For(obj) => f.write_fmt(format_args!("FOR {0}", obj))write!(f, "FOR {obj}"),
3835            TriggerObjectKind::ForEach(obj) => f.write_fmt(format_args!("FOR EACH {0}", obj))write!(f, "FOR EACH {obj}"),
3836        }
3837    }
3838}
3839
3840#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateTrigger {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["or_alter", "temporary", "or_replace", "is_constraint", "name",
                        "period", "period_before_table", "events", "table_name",
                        "referenced_table_name", "referencing", "trigger_object",
                        "condition", "exec_body", "statements_as", "statements",
                        "characteristics"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.or_alter, &self.temporary, &self.or_replace,
                        &self.is_constraint, &self.name, &self.period,
                        &self.period_before_table, &self.events, &self.table_name,
                        &self.referenced_table_name, &self.referencing,
                        &self.trigger_object, &self.condition, &self.exec_body,
                        &self.statements_as, &self.statements,
                        &&self.characteristics];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "CreateTrigger",
            names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateTrigger {
    #[inline]
    fn clone(&self) -> CreateTrigger {
        CreateTrigger {
            or_alter: ::core::clone::Clone::clone(&self.or_alter),
            temporary: ::core::clone::Clone::clone(&self.temporary),
            or_replace: ::core::clone::Clone::clone(&self.or_replace),
            is_constraint: ::core::clone::Clone::clone(&self.is_constraint),
            name: ::core::clone::Clone::clone(&self.name),
            period: ::core::clone::Clone::clone(&self.period),
            period_before_table: ::core::clone::Clone::clone(&self.period_before_table),
            events: ::core::clone::Clone::clone(&self.events),
            table_name: ::core::clone::Clone::clone(&self.table_name),
            referenced_table_name: ::core::clone::Clone::clone(&self.referenced_table_name),
            referencing: ::core::clone::Clone::clone(&self.referencing),
            trigger_object: ::core::clone::Clone::clone(&self.trigger_object),
            condition: ::core::clone::Clone::clone(&self.condition),
            exec_body: ::core::clone::Clone::clone(&self.exec_body),
            statements_as: ::core::clone::Clone::clone(&self.statements_as),
            statements: ::core::clone::Clone::clone(&self.statements),
            characteristics: ::core::clone::Clone::clone(&self.characteristics),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateTrigger {
    #[inline]
    fn eq(&self, other: &CreateTrigger) -> bool {
        self.or_alter == other.or_alter && self.temporary == other.temporary
                                                                    && self.or_replace == other.or_replace &&
                                                                self.is_constraint == other.is_constraint &&
                                                            self.period_before_table == other.period_before_table &&
                                                        self.statements_as == other.statements_as &&
                                                    self.name == other.name && self.period == other.period &&
                                            self.events == other.events &&
                                        self.table_name == other.table_name &&
                                    self.referenced_table_name == other.referenced_table_name &&
                                self.referencing == other.referencing &&
                            self.trigger_object == other.trigger_object &&
                        self.condition == other.condition &&
                    self.exec_body == other.exec_body &&
                self.statements == other.statements &&
            self.characteristics == other.characteristics
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateTrigger {
    #[inline]
    fn partial_cmp(&self, other: &CreateTrigger)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.or_alter,
                &other.or_alter) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.temporary,
                        &other.temporary) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.or_replace,
                                &other.or_replace) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.is_constraint,
                                        &other.is_constraint) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.name,
                                                &other.name) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.period,
                                                        &other.period) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.period_before_table,
                                                                &other.period_before_table) {
                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                =>
                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.events,
                                                                        &other.events) {
                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                        =>
                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
                                                                                &other.table_name) {
                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                =>
                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.referenced_table_name,
                                                                                        &other.referenced_table_name) {
                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                        =>
                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.referencing,
                                                                                                &other.referencing) {
                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                =>
                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.trigger_object,
                                                                                                        &other.trigger_object) {
                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                        =>
                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.condition,
                                                                                                                &other.condition) {
                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                =>
                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.exec_body,
                                                                                                                        &other.exec_body) {
                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                        =>
                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.statements_as,
                                                                                                                                &other.statements_as) {
                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                =>
                                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.statements,
                                                                                                                                        &other.statements) {
                                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                        =>
                                                                                                                                        ::core::cmp::PartialOrd::partial_cmp(&self.characteristics,
                                                                                                                                            &other.characteristics),
                                                                                                                                    cmp => cmp,
                                                                                                                                },
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateTrigger {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<TriggerPeriod>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<TriggerEvent>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<TriggerReferencing>>;
        let _: ::core::cmp::AssertParamIsEq<Option<TriggerObjectKind>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Option<TriggerExecBody>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ConditionalStatements>>;
        let _:
                ::core::cmp::AssertParamIsEq<Option<ConstraintCharacteristics>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateTrigger {
    #[inline]
    fn cmp(&self, other: &CreateTrigger) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.or_alter, &other.or_alter) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.temporary, &other.temporary)
                    {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.or_replace,
                                &other.or_replace) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.is_constraint,
                                        &other.is_constraint) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.period, &other.period) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        match ::core::cmp::Ord::cmp(&self.period_before_table,
                                                                &other.period_before_table) {
                                                            ::core::cmp::Ordering::Equal =>
                                                                match ::core::cmp::Ord::cmp(&self.events, &other.events) {
                                                                    ::core::cmp::Ordering::Equal =>
                                                                        match ::core::cmp::Ord::cmp(&self.table_name,
                                                                                &other.table_name) {
                                                                            ::core::cmp::Ordering::Equal =>
                                                                                match ::core::cmp::Ord::cmp(&self.referenced_table_name,
                                                                                        &other.referenced_table_name) {
                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                        match ::core::cmp::Ord::cmp(&self.referencing,
                                                                                                &other.referencing) {
                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                match ::core::cmp::Ord::cmp(&self.trigger_object,
                                                                                                        &other.trigger_object) {
                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                        match ::core::cmp::Ord::cmp(&self.condition,
                                                                                                                &other.condition) {
                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                match ::core::cmp::Ord::cmp(&self.exec_body,
                                                                                                                        &other.exec_body) {
                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                        match ::core::cmp::Ord::cmp(&self.statements_as,
                                                                                                                                &other.statements_as) {
                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                match ::core::cmp::Ord::cmp(&self.statements,
                                                                                                                                        &other.statements) {
                                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                                        ::core::cmp::Ord::cmp(&self.characteristics,
                                                                                                                                            &other.characteristics),
                                                                                                                                    cmp => cmp,
                                                                                                                                },
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateTrigger {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.or_alter, state);
        ::core::hash::Hash::hash(&self.temporary, state);
        ::core::hash::Hash::hash(&self.or_replace, state);
        ::core::hash::Hash::hash(&self.is_constraint, state);
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.period, state);
        ::core::hash::Hash::hash(&self.period_before_table, state);
        ::core::hash::Hash::hash(&self.events, state);
        ::core::hash::Hash::hash(&self.table_name, state);
        ::core::hash::Hash::hash(&self.referenced_table_name, state);
        ::core::hash::Hash::hash(&self.referencing, state);
        ::core::hash::Hash::hash(&self.trigger_object, state);
        ::core::hash::Hash::hash(&self.condition, state);
        ::core::hash::Hash::hash(&self.exec_body, state);
        ::core::hash::Hash::hash(&self.statements_as, state);
        ::core::hash::Hash::hash(&self.statements, state);
        ::core::hash::Hash::hash(&self.characteristics, state)
    }
}Hash)]
3841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3842#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateTrigger {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.or_alter, visitor)?;
                        sqlparser::ast::Visit::visit(&self.temporary, visitor)?;
                        sqlparser::ast::Visit::visit(&self.or_replace, visitor)?;
                        sqlparser::ast::Visit::visit(&self.is_constraint, visitor)?;
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.period, visitor)?;
                        sqlparser::ast::Visit::visit(&self.period_before_table,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.events, visitor)?;
                        sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.referenced_table_name,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.referencing, visitor)?;
                        sqlparser::ast::Visit::visit(&self.trigger_object,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.condition, visitor)?;
                        sqlparser::ast::Visit::visit(&self.exec_body, visitor)?;
                        sqlparser::ast::Visit::visit(&self.statements_as, visitor)?;
                        sqlparser::ast::Visit::visit(&self.statements, visitor)?;
                        sqlparser::ast::Visit::visit(&self.characteristics,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateTrigger {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.or_alter,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.temporary,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.or_replace,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.is_constraint,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.period, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.period_before_table,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.events, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_name,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.referenced_table_name,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.referencing,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.trigger_object,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.condition,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.exec_body,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.statements_as,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.statements,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.characteristics,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
3843/// CREATE TRIGGER
3844///
3845/// Examples:
3846///
3847/// ```sql
3848/// CREATE TRIGGER trigger_name
3849/// BEFORE INSERT ON table_name
3850/// FOR EACH ROW
3851/// EXECUTE FUNCTION trigger_function();
3852/// ```
3853///
3854/// Postgres: <https://www.postgresql.org/docs/current/sql-createtrigger.html>
3855/// SQL Server: <https://learn.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql>
3856pub struct CreateTrigger {
3857    /// True if this is a `CREATE OR ALTER TRIGGER` statement
3858    ///
3859    /// [MsSql](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-trigger-transact-sql?view=sql-server-ver16#arguments)
3860    pub or_alter: bool,
3861    /// True if this is a temporary trigger.
3862    ///
3863    /// Examples:
3864    ///
3865    /// ```sql
3866    /// CREATE TEMP TRIGGER trigger_name
3867    /// ```
3868    ///
3869    /// or
3870    ///
3871    /// ```sql
3872    /// CREATE TEMPORARY TRIGGER trigger_name;
3873    /// CREATE TEMP TRIGGER trigger_name;
3874    /// ```
3875    ///
3876    /// [SQLite](https://sqlite.org/lang_createtrigger.html#temp_triggers_on_non_temp_tables)
3877    pub temporary: bool,
3878    /// The `OR REPLACE` clause is used to re-create the trigger if it already exists.
3879    ///
3880    /// Example:
3881    /// ```sql
3882    /// CREATE OR REPLACE TRIGGER trigger_name
3883    /// AFTER INSERT ON table_name
3884    /// FOR EACH ROW
3885    /// EXECUTE FUNCTION trigger_function();
3886    /// ```
3887    pub or_replace: bool,
3888    /// The `CONSTRAINT` keyword is used to create a trigger as a constraint.
3889    pub is_constraint: bool,
3890    /// The name of the trigger to be created.
3891    pub name: ObjectName,
3892    /// Determines whether the function is called before, after, or instead of the event.
3893    ///
3894    /// Example of BEFORE:
3895    ///
3896    /// ```sql
3897    /// CREATE TRIGGER trigger_name
3898    /// BEFORE INSERT ON table_name
3899    /// FOR EACH ROW
3900    /// EXECUTE FUNCTION trigger_function();
3901    /// ```
3902    ///
3903    /// Example of AFTER:
3904    ///
3905    /// ```sql
3906    /// CREATE TRIGGER trigger_name
3907    /// AFTER INSERT ON table_name
3908    /// FOR EACH ROW
3909    /// EXECUTE FUNCTION trigger_function();
3910    /// ```
3911    ///
3912    /// Example of INSTEAD OF:
3913    ///
3914    /// ```sql
3915    /// CREATE TRIGGER trigger_name
3916    /// INSTEAD OF INSERT ON table_name
3917    /// FOR EACH ROW
3918    /// EXECUTE FUNCTION trigger_function();
3919    /// ```
3920    pub period: Option<TriggerPeriod>,
3921    /// Whether the trigger period was specified before the target table name.
3922    /// This does not refer to whether the period is BEFORE, AFTER, or INSTEAD OF,
3923    /// but rather the position of the period clause in relation to the table name.
3924    ///
3925    /// ```sql
3926    /// -- period_before_table == true: Postgres, MySQL, and standard SQL
3927    /// CREATE TRIGGER t BEFORE INSERT ON table_name ...;
3928    /// -- period_before_table == false: MSSQL
3929    /// CREATE TRIGGER t ON table_name BEFORE INSERT ...;
3930    /// ```
3931    pub period_before_table: bool,
3932    /// Multiple events can be specified using OR, such as `INSERT`, `UPDATE`, `DELETE`, or `TRUNCATE`.
3933    pub events: Vec<TriggerEvent>,
3934    /// The table on which the trigger is to be created.
3935    pub table_name: ObjectName,
3936    /// The optional referenced table name that can be referenced via
3937    /// the `FROM` keyword.
3938    pub referenced_table_name: Option<ObjectName>,
3939    /// This keyword immediately precedes the declaration of one or two relation names that provide access to the transition relations of the triggering statement.
3940    pub referencing: Vec<TriggerReferencing>,
3941    /// This specifies whether the trigger function should be fired once for
3942    /// every row affected by the trigger event, or just once per SQL statement.
3943    /// This is optional in some SQL dialects, such as SQLite, and if not specified, in
3944    /// those cases, the implied default is `FOR EACH ROW`.
3945    pub trigger_object: Option<TriggerObjectKind>,
3946    ///  Triggering conditions
3947    pub condition: Option<Expr>,
3948    /// Execute logic block
3949    pub exec_body: Option<TriggerExecBody>,
3950    /// For MSSQL and dialects where statements are preceded by `AS`
3951    pub statements_as: bool,
3952    /// For SQL dialects with statement(s) for a body
3953    pub statements: Option<ConditionalStatements>,
3954    /// The characteristic of the trigger, which include whether the trigger is `DEFERRABLE`, `INITIALLY DEFERRED`, or `INITIALLY IMMEDIATE`,
3955    pub characteristics: Option<ConstraintCharacteristics>,
3956}
3957
3958impl Display for CreateTrigger {
3959    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
3960        let CreateTrigger {
3961            or_alter,
3962            temporary,
3963            or_replace,
3964            is_constraint,
3965            name,
3966            period_before_table,
3967            period,
3968            events,
3969            table_name,
3970            referenced_table_name,
3971            referencing,
3972            trigger_object,
3973            condition,
3974            exec_body,
3975            statements_as,
3976            statements,
3977            characteristics,
3978        } = self;
3979        f.write_fmt(format_args!("CREATE {0}{1}{2}{3}TRIGGER {4} ",
        if *temporary { "TEMPORARY " } else { "" },
        if *or_alter { "OR ALTER " } else { "" },
        if *or_replace { "OR REPLACE " } else { "" },
        if *is_constraint { "CONSTRAINT " } else { "" }, name))write!(
3980            f,
3981            "CREATE {temporary}{or_alter}{or_replace}{is_constraint}TRIGGER {name} ",
3982            temporary = if *temporary { "TEMPORARY " } else { "" },
3983            or_alter = if *or_alter { "OR ALTER " } else { "" },
3984            or_replace = if *or_replace { "OR REPLACE " } else { "" },
3985            is_constraint = if *is_constraint { "CONSTRAINT " } else { "" },
3986        )?;
3987
3988        if *period_before_table {
3989            if let Some(p) = period {
3990                f.write_fmt(format_args!("{0} ", p))write!(f, "{p} ")?;
3991            }
3992            if !events.is_empty() {
3993                f.write_fmt(format_args!("{0} ", display_separated(events, " OR ")))write!(f, "{} ", display_separated(events, " OR "))?;
3994            }
3995            f.write_fmt(format_args!("ON {0}", table_name))write!(f, "ON {table_name}")?;
3996        } else {
3997            f.write_fmt(format_args!("ON {0} ", table_name))write!(f, "ON {table_name} ")?;
3998            if let Some(p) = period {
3999                f.write_fmt(format_args!("{0}", p))write!(f, "{p}")?;
4000            }
4001            if !events.is_empty() {
4002                f.write_fmt(format_args!(" {0}", display_separated(events, ", ")))write!(f, " {}", display_separated(events, ", "))?;
4003            }
4004        }
4005
4006        if let Some(referenced_table_name) = referenced_table_name {
4007            f.write_fmt(format_args!(" FROM {0}", referenced_table_name))write!(f, " FROM {referenced_table_name}")?;
4008        }
4009
4010        if let Some(characteristics) = characteristics {
4011            f.write_fmt(format_args!(" {0}", characteristics))write!(f, " {characteristics}")?;
4012        }
4013
4014        if !referencing.is_empty() {
4015            f.write_fmt(format_args!(" REFERENCING {0}",
        display_separated(referencing, " ")))write!(f, " REFERENCING {}", display_separated(referencing, " "))?;
4016        }
4017
4018        if let Some(trigger_object) = trigger_object {
4019            f.write_fmt(format_args!(" {0}", trigger_object))write!(f, " {trigger_object}")?;
4020        }
4021        if let Some(condition) = condition {
4022            f.write_fmt(format_args!(" WHEN {0}", condition))write!(f, " WHEN {condition}")?;
4023        }
4024        if let Some(exec_body) = exec_body {
4025            f.write_fmt(format_args!(" EXECUTE {0}", exec_body))write!(f, " EXECUTE {exec_body}")?;
4026        }
4027        if let Some(statements) = statements {
4028            if *statements_as {
4029                f.write_fmt(format_args!(" AS"))write!(f, " AS")?;
4030            }
4031            f.write_fmt(format_args!(" {0}", statements))write!(f, " {statements}")?;
4032        }
4033        Ok(())
4034    }
4035}
4036
4037#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropTrigger {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "DropTrigger",
            "if_exists", &self.if_exists, "trigger_name", &self.trigger_name,
            "table_name", &self.table_name, "option", &&self.option)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropTrigger {
    #[inline]
    fn clone(&self) -> DropTrigger {
        DropTrigger {
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            trigger_name: ::core::clone::Clone::clone(&self.trigger_name),
            table_name: ::core::clone::Clone::clone(&self.table_name),
            option: ::core::clone::Clone::clone(&self.option),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropTrigger {
    #[inline]
    fn eq(&self, other: &DropTrigger) -> bool {
        self.if_exists == other.if_exists &&
                    self.trigger_name == other.trigger_name &&
                self.table_name == other.table_name &&
            self.option == other.option
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropTrigger {
    #[inline]
    fn partial_cmp(&self, other: &DropTrigger)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                &other.if_exists) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.trigger_name,
                        &other.trigger_name) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
                                &other.table_name) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                ::core::cmp::PartialOrd::partial_cmp(&self.option,
                                    &other.option),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropTrigger {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ReferentialAction>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropTrigger {
    #[inline]
    fn cmp(&self, other: &DropTrigger) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.trigger_name,
                        &other.trigger_name) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.table_name,
                                &other.table_name) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(&self.option, &other.option),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropTrigger {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.trigger_name, state);
        ::core::hash::Hash::hash(&self.table_name, state);
        ::core::hash::Hash::hash(&self.option, state)
    }
}Hash)]
4038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4039#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropTrigger {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.trigger_name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.option, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropTrigger {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.trigger_name,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_name,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.option, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4040/// DROP TRIGGER
4041///
4042/// ```sql
4043/// DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]
4044/// ```
4045///
4046pub struct DropTrigger {
4047    /// Whether to include the `IF EXISTS` clause.
4048    pub if_exists: bool,
4049    /// The name of the trigger to be dropped.
4050    pub trigger_name: ObjectName,
4051    /// The name of the table from which the trigger is to be dropped.
4052    pub table_name: Option<ObjectName>,
4053    /// `CASCADE` or `RESTRICT`
4054    pub option: Option<ReferentialAction>,
4055}
4056
4057impl fmt::Display for DropTrigger {
4058    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4059        let DropTrigger {
4060            if_exists,
4061            trigger_name,
4062            table_name,
4063            option,
4064        } = self;
4065        f.write_fmt(format_args!("DROP TRIGGER"))write!(f, "DROP TRIGGER")?;
4066        if *if_exists {
4067            f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
4068        }
4069        match &table_name {
4070            Some(table_name) => f.write_fmt(format_args!(" {0} ON {1}", trigger_name, table_name))write!(f, " {trigger_name} ON {table_name}")?,
4071            None => f.write_fmt(format_args!(" {0}", trigger_name))write!(f, " {trigger_name}")?,
4072        };
4073        if let Some(option) = option {
4074            f.write_fmt(format_args!(" {0}", option))write!(f, " {option}")?;
4075        }
4076        Ok(())
4077    }
4078}
4079
4080/// A `TRUNCATE` statement.
4081///
4082/// ```sql
4083/// TRUNCATE TABLE [IF EXISTS] table_names [PARTITION (partitions)] [RESTART IDENTITY | CONTINUE IDENTITY] [CASCADE | RESTRICT] [ON CLUSTER cluster_name]
4084/// ```
4085#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Truncate {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["table_names", "partitions", "table", "if_exists", "identity",
                        "cascade", "on_cluster"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.table_names, &self.partitions, &self.table,
                        &self.if_exists, &self.identity, &self.cascade,
                        &&self.on_cluster];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "Truncate",
            names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Truncate {
    #[inline]
    fn clone(&self) -> Truncate {
        Truncate {
            table_names: ::core::clone::Clone::clone(&self.table_names),
            partitions: ::core::clone::Clone::clone(&self.partitions),
            table: ::core::clone::Clone::clone(&self.table),
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            identity: ::core::clone::Clone::clone(&self.identity),
            cascade: ::core::clone::Clone::clone(&self.cascade),
            on_cluster: ::core::clone::Clone::clone(&self.on_cluster),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Truncate {
    #[inline]
    fn eq(&self, other: &Truncate) -> bool {
        self.table == other.table && self.if_exists == other.if_exists &&
                            self.table_names == other.table_names &&
                        self.partitions == other.partitions &&
                    self.identity == other.identity &&
                self.cascade == other.cascade &&
            self.on_cluster == other.on_cluster
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Truncate {
    #[inline]
    fn partial_cmp(&self, other: &Truncate)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.table_names,
                &other.table_names) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.partitions,
                        &other.partitions) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.table,
                                &other.table) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                                        &other.if_exists) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.identity,
                                                &other.identity) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.cascade,
                                                        &other.cascade) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        ::core::cmp::PartialOrd::partial_cmp(&self.on_cluster,
                                                            &other.on_cluster),
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Truncate {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Vec<super::TruncateTableTarget>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<Expr>>>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _:
                ::core::cmp::AssertParamIsEq<Option<super::TruncateIdentityOption>>;
        let _: ::core::cmp::AssertParamIsEq<Option<super::CascadeOption>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Truncate {
    #[inline]
    fn cmp(&self, other: &Truncate) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.table_names, &other.table_names) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.partitions,
                        &other.partitions) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.table, &other.table) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.if_exists,
                                        &other.if_exists) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.identity, &other.identity)
                                            {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.cascade, &other.cascade) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        ::core::cmp::Ord::cmp(&self.on_cluster, &other.on_cluster),
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Truncate {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.table_names, state);
        ::core::hash::Hash::hash(&self.partitions, state);
        ::core::hash::Hash::hash(&self.table, state);
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.identity, state);
        ::core::hash::Hash::hash(&self.cascade, state);
        ::core::hash::Hash::hash(&self.on_cluster, state)
    }
}Hash)]
4086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4087#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Truncate {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.table_names, visitor)?;
                        sqlparser::ast::Visit::visit(&self.partitions, visitor)?;
                        sqlparser::ast::Visit::visit(&self.table, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.identity, visitor)?;
                        sqlparser::ast::Visit::visit(&self.cascade, visitor)?;
                        sqlparser::ast::Visit::visit(&self.on_cluster, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for Truncate {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.table_names,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.partitions,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.identity,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.cascade,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.on_cluster,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4088pub struct Truncate {
4089    /// Table names to truncate
4090    pub table_names: Vec<super::TruncateTableTarget>,
4091    /// Optional partition specification
4092    pub partitions: Option<Vec<Expr>>,
4093    /// TABLE - optional keyword
4094    pub table: bool,
4095    /// Snowflake/Redshift-specific option: [ IF EXISTS ]
4096    pub if_exists: bool,
4097    /// Postgres-specific option: [ RESTART IDENTITY | CONTINUE IDENTITY ]
4098    pub identity: Option<super::TruncateIdentityOption>,
4099    /// Postgres-specific option: [ CASCADE | RESTRICT ]
4100    pub cascade: Option<super::CascadeOption>,
4101    /// ClickHouse-specific option: [ ON CLUSTER cluster_name ]
4102    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/truncate/)
4103    pub on_cluster: Option<Ident>,
4104}
4105
4106impl fmt::Display for Truncate {
4107    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4108        let table = if self.table { "TABLE " } else { "" };
4109        let if_exists = if self.if_exists { "IF EXISTS " } else { "" };
4110
4111        f.write_fmt(format_args!("TRUNCATE {1}{2}{0}",
        display_comma_separated(&self.table_names), table, if_exists))write!(
4112            f,
4113            "TRUNCATE {table}{if_exists}{table_names}",
4114            table_names = display_comma_separated(&self.table_names)
4115        )?;
4116
4117        if let Some(identity) = &self.identity {
4118            match identity {
4119                super::TruncateIdentityOption::Restart => f.write_fmt(format_args!(" RESTART IDENTITY"))write!(f, " RESTART IDENTITY")?,
4120                super::TruncateIdentityOption::Continue => f.write_fmt(format_args!(" CONTINUE IDENTITY"))write!(f, " CONTINUE IDENTITY")?,
4121            }
4122        }
4123        if let Some(cascade) = &self.cascade {
4124            match cascade {
4125                super::CascadeOption::Cascade => f.write_fmt(format_args!(" CASCADE"))write!(f, " CASCADE")?,
4126                super::CascadeOption::Restrict => f.write_fmt(format_args!(" RESTRICT"))write!(f, " RESTRICT")?,
4127            }
4128        }
4129
4130        if let Some(ref parts) = &self.partitions {
4131            if !parts.is_empty() {
4132                f.write_fmt(format_args!(" PARTITION ({0})", display_comma_separated(parts)))write!(f, " PARTITION ({})", display_comma_separated(parts))?;
4133            }
4134        }
4135        if let Some(on_cluster) = &self.on_cluster {
4136            f.write_fmt(format_args!(" ON CLUSTER {0}", on_cluster))write!(f, " ON CLUSTER {on_cluster}")?;
4137        }
4138        Ok(())
4139    }
4140}
4141
4142impl Spanned for Truncate {
4143    fn span(&self) -> Span {
4144        Span::union_iter(
4145            self.table_names.iter().map(|i| i.name.span()).chain(
4146                self.partitions
4147                    .iter()
4148                    .flat_map(|i| i.iter().map(|k| k.span())),
4149            ),
4150        )
4151    }
4152}
4153
4154/// An `MSCK` statement.
4155///
4156/// ```sql
4157/// MSCK [REPAIR] TABLE table_name [ADD|DROP|SYNC PARTITIONS]
4158/// ```
4159/// MSCK (Hive) - MetaStore Check command
4160#[derive(#[automatically_derived]
impl ::core::fmt::Debug for Msck {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "Msck",
            "table_name", &self.table_name, "repair", &self.repair,
            "partition_action", &&self.partition_action)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for Msck {
    #[inline]
    fn clone(&self) -> Msck {
        Msck {
            table_name: ::core::clone::Clone::clone(&self.table_name),
            repair: ::core::clone::Clone::clone(&self.repair),
            partition_action: ::core::clone::Clone::clone(&self.partition_action),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for Msck {
    #[inline]
    fn eq(&self, other: &Msck) -> bool {
        self.repair == other.repair && self.table_name == other.table_name &&
            self.partition_action == other.partition_action
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for Msck {
    #[inline]
    fn partial_cmp(&self, other: &Msck)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
                &other.table_name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.repair,
                        &other.repair) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.partition_action,
                            &other.partition_action),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for Msck {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Option<super::AddDropSync>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for Msck {
    #[inline]
    fn cmp(&self, other: &Msck) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.table_name, &other.table_name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.repair, &other.repair) {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.partition_action,
                            &other.partition_action),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for Msck {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.table_name, state);
        ::core::hash::Hash::hash(&self.repair, state);
        ::core::hash::Hash::hash(&self.partition_action, state)
    }
}Hash)]
4161#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4162#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for Msck {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        visitor.pre_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
                        visitor.post_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.repair, visitor)?;
                        sqlparser::ast::Visit::visit(&self.partition_action,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for Msck {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        visitor.pre_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_name,
                                visitor)?;
                        visitor.post_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.repair, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.partition_action,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4163pub struct Msck {
4164    /// Table name to check
4165    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
4166    pub table_name: ObjectName,
4167    /// Whether to repair the table
4168    pub repair: bool,
4169    /// Partition action (ADD, DROP, or SYNC)
4170    pub partition_action: Option<super::AddDropSync>,
4171}
4172
4173impl fmt::Display for Msck {
4174    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4175        f.write_fmt(format_args!("MSCK {0}TABLE {1}",
        if self.repair { "REPAIR " } else { "" }, self.table_name))write!(
4176            f,
4177            "MSCK {repair}TABLE {table}",
4178            repair = if self.repair { "REPAIR " } else { "" },
4179            table = self.table_name
4180        )?;
4181        if let Some(pa) = &self.partition_action {
4182            f.write_fmt(format_args!(" {0}", pa))write!(f, " {pa}")?;
4183        }
4184        Ok(())
4185    }
4186}
4187
4188impl Spanned for Msck {
4189    fn span(&self) -> Span {
4190        self.table_name.span()
4191    }
4192}
4193
4194/// CREATE VIEW statement.
4195#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateView {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["or_alter", "or_replace", "materialized", "secure", "name",
                        "name_before_not_exists", "columns", "query", "options",
                        "cluster_by", "comment", "with_no_schema_binding",
                        "if_not_exists", "temporary", "to", "params"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.or_alter, &self.or_replace, &self.materialized,
                        &self.secure, &self.name, &self.name_before_not_exists,
                        &self.columns, &self.query, &self.options, &self.cluster_by,
                        &self.comment, &self.with_no_schema_binding,
                        &self.if_not_exists, &self.temporary, &self.to,
                        &&self.params];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "CreateView",
            names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateView {
    #[inline]
    fn clone(&self) -> CreateView {
        CreateView {
            or_alter: ::core::clone::Clone::clone(&self.or_alter),
            or_replace: ::core::clone::Clone::clone(&self.or_replace),
            materialized: ::core::clone::Clone::clone(&self.materialized),
            secure: ::core::clone::Clone::clone(&self.secure),
            name: ::core::clone::Clone::clone(&self.name),
            name_before_not_exists: ::core::clone::Clone::clone(&self.name_before_not_exists),
            columns: ::core::clone::Clone::clone(&self.columns),
            query: ::core::clone::Clone::clone(&self.query),
            options: ::core::clone::Clone::clone(&self.options),
            cluster_by: ::core::clone::Clone::clone(&self.cluster_by),
            comment: ::core::clone::Clone::clone(&self.comment),
            with_no_schema_binding: ::core::clone::Clone::clone(&self.with_no_schema_binding),
            if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
            temporary: ::core::clone::Clone::clone(&self.temporary),
            to: ::core::clone::Clone::clone(&self.to),
            params: ::core::clone::Clone::clone(&self.params),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateView {
    #[inline]
    fn eq(&self, other: &CreateView) -> bool {
        self.or_alter == other.or_alter && self.or_replace == other.or_replace
                                                                && self.materialized == other.materialized &&
                                                            self.secure == other.secure &&
                                                        self.name_before_not_exists == other.name_before_not_exists
                                                    &&
                                                    self.with_no_schema_binding == other.with_no_schema_binding
                                                && self.if_not_exists == other.if_not_exists &&
                                            self.temporary == other.temporary && self.name == other.name
                                    && self.columns == other.columns &&
                                self.query == other.query && self.options == other.options
                        && self.cluster_by == other.cluster_by &&
                    self.comment == other.comment && self.to == other.to &&
            self.params == other.params
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateView {
    #[inline]
    fn partial_cmp(&self, other: &CreateView)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.or_alter,
                &other.or_alter) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.or_replace,
                        &other.or_replace) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.materialized,
                                &other.materialized) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.secure,
                                        &other.secure) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.name,
                                                &other.name) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.name_before_not_exists,
                                                        &other.name_before_not_exists) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.columns,
                                                                &other.columns) {
                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                =>
                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.query,
                                                                        &other.query) {
                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                        =>
                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.options,
                                                                                &other.options) {
                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                =>
                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.cluster_by,
                                                                                        &other.cluster_by) {
                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                        =>
                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.comment,
                                                                                                &other.comment) {
                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                =>
                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.with_no_schema_binding,
                                                                                                        &other.with_no_schema_binding) {
                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                        =>
                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
                                                                                                                &other.if_not_exists) {
                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                =>
                                                                                                                match ::core::cmp::PartialOrd::partial_cmp(&self.temporary,
                                                                                                                        &other.temporary) {
                                                                                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                        =>
                                                                                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.to,
                                                                                                                                &other.to) {
                                                                                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                                                                                =>
                                                                                                                                ::core::cmp::PartialOrd::partial_cmp(&self.params,
                                                                                                                                    &other.params),
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateView {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ViewColumnDef>>;
        let _: ::core::cmp::AssertParamIsEq<Box<Query>>;
        let _: ::core::cmp::AssertParamIsEq<CreateTableOptions>;
        let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<String>>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Option<CreateViewParams>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateView {
    #[inline]
    fn cmp(&self, other: &CreateView) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.or_alter, &other.or_alter) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.or_replace,
                        &other.or_replace) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.materialized,
                                &other.materialized) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.secure, &other.secure) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.name_before_not_exists,
                                                        &other.name_before_not_exists) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        match ::core::cmp::Ord::cmp(&self.columns, &other.columns) {
                                                            ::core::cmp::Ordering::Equal =>
                                                                match ::core::cmp::Ord::cmp(&self.query, &other.query) {
                                                                    ::core::cmp::Ordering::Equal =>
                                                                        match ::core::cmp::Ord::cmp(&self.options, &other.options) {
                                                                            ::core::cmp::Ordering::Equal =>
                                                                                match ::core::cmp::Ord::cmp(&self.cluster_by,
                                                                                        &other.cluster_by) {
                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                        match ::core::cmp::Ord::cmp(&self.comment, &other.comment) {
                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                match ::core::cmp::Ord::cmp(&self.with_no_schema_binding,
                                                                                                        &other.with_no_schema_binding) {
                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                        match ::core::cmp::Ord::cmp(&self.if_not_exists,
                                                                                                                &other.if_not_exists) {
                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                match ::core::cmp::Ord::cmp(&self.temporary,
                                                                                                                        &other.temporary) {
                                                                                                                    ::core::cmp::Ordering::Equal =>
                                                                                                                        match ::core::cmp::Ord::cmp(&self.to, &other.to) {
                                                                                                                            ::core::cmp::Ordering::Equal =>
                                                                                                                                ::core::cmp::Ord::cmp(&self.params, &other.params),
                                                                                                                            cmp => cmp,
                                                                                                                        },
                                                                                                                    cmp => cmp,
                                                                                                                },
                                                                                                            cmp => cmp,
                                                                                                        },
                                                                                                    cmp => cmp,
                                                                                                },
                                                                                            cmp => cmp,
                                                                                        },
                                                                                    cmp => cmp,
                                                                                },
                                                                            cmp => cmp,
                                                                        },
                                                                    cmp => cmp,
                                                                },
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateView {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.or_alter, state);
        ::core::hash::Hash::hash(&self.or_replace, state);
        ::core::hash::Hash::hash(&self.materialized, state);
        ::core::hash::Hash::hash(&self.secure, state);
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.name_before_not_exists, state);
        ::core::hash::Hash::hash(&self.columns, state);
        ::core::hash::Hash::hash(&self.query, state);
        ::core::hash::Hash::hash(&self.options, state);
        ::core::hash::Hash::hash(&self.cluster_by, state);
        ::core::hash::Hash::hash(&self.comment, state);
        ::core::hash::Hash::hash(&self.with_no_schema_binding, state);
        ::core::hash::Hash::hash(&self.if_not_exists, state);
        ::core::hash::Hash::hash(&self.temporary, state);
        ::core::hash::Hash::hash(&self.to, state);
        ::core::hash::Hash::hash(&self.params, state)
    }
}Hash)]
4196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4197#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateView {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.or_alter, visitor)?;
                        sqlparser::ast::Visit::visit(&self.or_replace, visitor)?;
                        sqlparser::ast::Visit::visit(&self.materialized, visitor)?;
                        sqlparser::ast::Visit::visit(&self.secure, visitor)?;
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.name_before_not_exists,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.columns, visitor)?;
                        sqlparser::ast::Visit::visit(&self.query, visitor)?;
                        sqlparser::ast::Visit::visit(&self.options, visitor)?;
                        sqlparser::ast::Visit::visit(&self.cluster_by, visitor)?;
                        sqlparser::ast::Visit::visit(&self.comment, visitor)?;
                        sqlparser::ast::Visit::visit(&self.with_no_schema_binding,
                                visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.temporary, visitor)?;
                        sqlparser::ast::Visit::visit(&self.to, visitor)?;
                        sqlparser::ast::Visit::visit(&self.params, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateView {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.or_alter,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.or_replace,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.materialized,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.secure, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.name_before_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.columns,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.query, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.options,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.cluster_by,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.comment,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.with_no_schema_binding,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.temporary,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.to, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.params, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4198pub struct CreateView {
4199    /// True if this is a `CREATE OR ALTER VIEW` statement
4200    ///
4201    /// [MsSql](https://learn.microsoft.com/en-us/sql/t-sql/statements/create-view-transact-sql)
4202    pub or_alter: bool,
4203    /// The `OR REPLACE` clause is used to re-create the view if it already exists.
4204    pub or_replace: bool,
4205    /// if true, has MATERIALIZED view modifier
4206    pub materialized: bool,
4207    /// Snowflake: SECURE view modifier
4208    /// <https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax>
4209    pub secure: bool,
4210    /// View name
4211    pub name: ObjectName,
4212    /// If `if_not_exists` is true, this flag is set to true if the view name comes before the `IF NOT EXISTS` clause.
4213    /// Example:
4214    /// ```sql
4215    /// CREATE VIEW myview IF NOT EXISTS AS SELECT 1`
4216    ///  ```
4217    /// Otherwise, the flag is set to false if the view name comes after the clause
4218    /// Example:
4219    /// ```sql
4220    /// CREATE VIEW IF NOT EXISTS myview AS SELECT 1`
4221    ///  ```
4222    pub name_before_not_exists: bool,
4223    /// Optional column definitions
4224    pub columns: Vec<ViewColumnDef>,
4225    /// The query that defines the view.
4226    pub query: Box<Query>,
4227    /// Table options (e.g., WITH (..), OPTIONS (...))
4228    pub options: CreateTableOptions,
4229    /// BigQuery: CLUSTER BY columns
4230    pub cluster_by: Vec<Ident>,
4231    /// Snowflake: Views can have comments in Snowflake.
4232    /// <https://docs.snowflake.com/en/sql-reference/sql/create-view#syntax>
4233    pub comment: Option<String>,
4234    /// if true, has RedShift [`WITH NO SCHEMA BINDING`] clause <https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_VIEW.html>
4235    pub with_no_schema_binding: bool,
4236    /// if true, has SQLite `IF NOT EXISTS` clause <https://www.sqlite.org/lang_createview.html>
4237    pub if_not_exists: bool,
4238    /// if true, has SQLite `TEMP` or `TEMPORARY` clause <https://www.sqlite.org/lang_createview.html>
4239    pub temporary: bool,
4240    /// if not None, has Clickhouse `TO` clause, specify the table into which to insert results
4241    /// <https://clickhouse.com/docs/en/sql-reference/statements/create/view#materialized-view>
4242    pub to: Option<ObjectName>,
4243    /// MySQL: Optional parameters for the view algorithm, definer, and security context
4244    pub params: Option<CreateViewParams>,
4245}
4246
4247impl fmt::Display for CreateView {
4248    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4249        f.write_fmt(format_args!("CREATE {0}{1}",
        if self.or_alter { "OR ALTER " } else { "" },
        if self.or_replace { "OR REPLACE " } else { "" }))write!(
4250            f,
4251            "CREATE {or_alter}{or_replace}",
4252            or_alter = if self.or_alter { "OR ALTER " } else { "" },
4253            or_replace = if self.or_replace { "OR REPLACE " } else { "" },
4254        )?;
4255        if let Some(ref params) = self.params {
4256            params.fmt(f)?;
4257        }
4258        f.write_fmt(format_args!("{1}{2}{3}VIEW {0}{4}",
        if self.if_not_exists {
            if self.name_before_not_exists {
                ::alloc::__export::must_use({
                        ::alloc::fmt::format(format_args!("{0} IF NOT EXISTS",
                                self.name))
                    })
            } else {
                ::alloc::__export::must_use({
                        ::alloc::fmt::format(format_args!("IF NOT EXISTS {0}",
                                self.name))
                    })
            }
        } else {
            ::alloc::__export::must_use({
                    ::alloc::fmt::format(format_args!("{0}", self.name))
                })
        }, if self.secure { "SECURE " } else { "" },
        if self.materialized { "MATERIALIZED " } else { "" },
        if self.temporary { "TEMPORARY " } else { "" },
        self.to.as_ref().map(|to|
                    ::alloc::__export::must_use({
                            ::alloc::fmt::format(format_args!(" TO {0}", to))
                        })).unwrap_or_default()))write!(
4259            f,
4260            "{secure}{materialized}{temporary}VIEW {if_not_and_name}{to}",
4261            if_not_and_name = if self.if_not_exists {
4262                if self.name_before_not_exists {
4263                    format!("{} IF NOT EXISTS", self.name)
4264                } else {
4265                    format!("IF NOT EXISTS {}", self.name)
4266                }
4267            } else {
4268                format!("{}", self.name)
4269            },
4270            secure = if self.secure { "SECURE " } else { "" },
4271            materialized = if self.materialized {
4272                "MATERIALIZED "
4273            } else {
4274                ""
4275            },
4276            temporary = if self.temporary { "TEMPORARY " } else { "" },
4277            to = self
4278                .to
4279                .as_ref()
4280                .map(|to| format!(" TO {to}"))
4281                .unwrap_or_default()
4282        )?;
4283        if !self.columns.is_empty() {
4284            f.write_fmt(format_args!(" ({0})", display_comma_separated(&self.columns)))write!(f, " ({})", display_comma_separated(&self.columns))?;
4285        }
4286        if #[allow(non_exhaustive_omitted_patterns)] match self.options {
    CreateTableOptions::With(_) => true,
    _ => false,
}matches!(self.options, CreateTableOptions::With(_)) {
4287            f.write_fmt(format_args!(" {0}", self.options))write!(f, " {}", self.options)?;
4288        }
4289        if let Some(ref comment) = self.comment {
4290            f.write_fmt(format_args!(" COMMENT = \'{0}\'",
        escape_single_quote_string(comment)))write!(f, " COMMENT = '{}'", escape_single_quote_string(comment))?;
4291        }
4292        if !self.cluster_by.is_empty() {
4293            f.write_fmt(format_args!(" CLUSTER BY ({0})",
        display_comma_separated(&self.cluster_by)))write!(
4294                f,
4295                " CLUSTER BY ({})",
4296                display_comma_separated(&self.cluster_by)
4297            )?;
4298        }
4299        if #[allow(non_exhaustive_omitted_patterns)] match self.options {
    CreateTableOptions::Options(_) => true,
    _ => false,
}matches!(self.options, CreateTableOptions::Options(_)) {
4300            f.write_fmt(format_args!(" {0}", self.options))write!(f, " {}", self.options)?;
4301        }
4302        f.write_str(" AS")?;
4303        SpaceOrNewline.fmt(f)?;
4304        self.query.fmt(f)?;
4305        if self.with_no_schema_binding {
4306            f.write_fmt(format_args!(" WITH NO SCHEMA BINDING"))write!(f, " WITH NO SCHEMA BINDING")?;
4307        }
4308        Ok(())
4309    }
4310}
4311
4312/// CREATE EXTENSION statement
4313/// Note: this is a PostgreSQL-specific statement
4314#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateExtension {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field5_finish(f,
            "CreateExtension", "name", &self.name, "if_not_exists",
            &self.if_not_exists, "cascade", &self.cascade, "schema",
            &self.schema, "version", &&self.version)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateExtension {
    #[inline]
    fn clone(&self) -> CreateExtension {
        CreateExtension {
            name: ::core::clone::Clone::clone(&self.name),
            if_not_exists: ::core::clone::Clone::clone(&self.if_not_exists),
            cascade: ::core::clone::Clone::clone(&self.cascade),
            schema: ::core::clone::Clone::clone(&self.schema),
            version: ::core::clone::Clone::clone(&self.version),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateExtension {
    #[inline]
    fn eq(&self, other: &CreateExtension) -> bool {
        self.if_not_exists == other.if_not_exists &&
                        self.cascade == other.cascade && self.name == other.name &&
                self.schema == other.schema && self.version == other.version
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateExtension {
    #[inline]
    fn partial_cmp(&self, other: &CreateExtension)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.if_not_exists,
                        &other.if_not_exists) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.cascade,
                                &other.cascade) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.schema,
                                        &other.schema) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        ::core::cmp::PartialOrd::partial_cmp(&self.version,
                                            &other.version),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateExtension {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateExtension {
    #[inline]
    fn cmp(&self, other: &CreateExtension) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.if_not_exists,
                        &other.if_not_exists) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.cascade, &other.cascade) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.schema, &other.schema) {
                                    ::core::cmp::Ordering::Equal =>
                                        ::core::cmp::Ord::cmp(&self.version, &other.version),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateExtension {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.if_not_exists, state);
        ::core::hash::Hash::hash(&self.cascade, state);
        ::core::hash::Hash::hash(&self.schema, state);
        ::core::hash::Hash::hash(&self.version, state)
    }
}Hash)]
4315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4316#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateExtension {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_not_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.cascade, visitor)?;
                        sqlparser::ast::Visit::visit(&self.schema, visitor)?;
                        sqlparser::ast::Visit::visit(&self.version, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateExtension {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_not_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.cascade,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.schema, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.version,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4317pub struct CreateExtension {
4318    /// Extension name
4319    pub name: Ident,
4320    /// Whether `IF NOT EXISTS` was specified for the CREATE EXTENSION.
4321    pub if_not_exists: bool,
4322    /// Whether `CASCADE` was specified for the CREATE EXTENSION.
4323    pub cascade: bool,
4324    /// Optional schema name for the extension.
4325    pub schema: Option<Ident>,
4326    /// Optional version for the extension.
4327    pub version: Option<Ident>,
4328}
4329
4330impl fmt::Display for CreateExtension {
4331    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4332        f.write_fmt(format_args!("CREATE EXTENSION {0}{1}",
        if self.if_not_exists { "IF NOT EXISTS " } else { "" }, self.name))write!(
4333            f,
4334            "CREATE EXTENSION {if_not_exists}{name}",
4335            if_not_exists = if self.if_not_exists {
4336                "IF NOT EXISTS "
4337            } else {
4338                ""
4339            },
4340            name = self.name
4341        )?;
4342        if self.cascade || self.schema.is_some() || self.version.is_some() {
4343            f.write_fmt(format_args!(" WITH"))write!(f, " WITH")?;
4344
4345            if let Some(name) = &self.schema {
4346                f.write_fmt(format_args!(" SCHEMA {0}", name))write!(f, " SCHEMA {name}")?;
4347            }
4348            if let Some(version) = &self.version {
4349                f.write_fmt(format_args!(" VERSION {0}", version))write!(f, " VERSION {version}")?;
4350            }
4351            if self.cascade {
4352                f.write_fmt(format_args!(" CASCADE"))write!(f, " CASCADE")?;
4353            }
4354        }
4355
4356        Ok(())
4357    }
4358}
4359
4360impl Spanned for CreateExtension {
4361    fn span(&self) -> Span {
4362        Span::empty()
4363    }
4364}
4365
4366/// DROP EXTENSION statement
4367/// Note: this is a PostgreSQL-specific statement
4368///
4369/// # References
4370///
4371/// PostgreSQL Documentation:
4372/// <https://www.postgresql.org/docs/current/sql-dropextension.html>
4373#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropExtension {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "DropExtension",
            "names", &self.names, "if_exists", &self.if_exists,
            "cascade_or_restrict", &&self.cascade_or_restrict)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropExtension {
    #[inline]
    fn clone(&self) -> DropExtension {
        DropExtension {
            names: ::core::clone::Clone::clone(&self.names),
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            cascade_or_restrict: ::core::clone::Clone::clone(&self.cascade_or_restrict),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropExtension {
    #[inline]
    fn eq(&self, other: &DropExtension) -> bool {
        self.if_exists == other.if_exists && self.names == other.names &&
            self.cascade_or_restrict == other.cascade_or_restrict
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropExtension {
    #[inline]
    fn partial_cmp(&self, other: &DropExtension)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.names, &other.names)
            {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                        &other.if_exists) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.cascade_or_restrict,
                            &other.cascade_or_restrict),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropExtension {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Vec<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Option<ReferentialAction>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropExtension {
    #[inline]
    fn cmp(&self, other: &DropExtension) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.names, &other.names) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.cascade_or_restrict,
                            &other.cascade_or_restrict),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropExtension {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.names, state);
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.cascade_or_restrict, state)
    }
}Hash)]
4374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4375#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropExtension {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.names, visitor)?;
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.cascade_or_restrict,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropExtension {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.names, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.cascade_or_restrict,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4376pub struct DropExtension {
4377    /// One or more extension names to drop
4378    pub names: Vec<Ident>,
4379    /// Whether `IF EXISTS` was specified for the DROP EXTENSION.
4380    pub if_exists: bool,
4381    /// `CASCADE` or `RESTRICT` behaviour for the drop.
4382    pub cascade_or_restrict: Option<ReferentialAction>,
4383}
4384
4385impl fmt::Display for DropExtension {
4386    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4387        f.write_fmt(format_args!("DROP EXTENSION"))write!(f, "DROP EXTENSION")?;
4388        if self.if_exists {
4389            f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
4390        }
4391        f.write_fmt(format_args!(" {0}", display_comma_separated(&self.names)))write!(f, " {}", display_comma_separated(&self.names))?;
4392        if let Some(cascade_or_restrict) = &self.cascade_or_restrict {
4393            f.write_fmt(format_args!(" {0}", cascade_or_restrict))write!(f, " {cascade_or_restrict}")?;
4394        }
4395        Ok(())
4396    }
4397}
4398
4399impl Spanned for DropExtension {
4400    fn span(&self) -> Span {
4401        Span::empty()
4402    }
4403}
4404
4405/// Table type for ALTER TABLE statements.
4406/// Used to distinguish between regular tables, Iceberg tables, and Dynamic tables.
4407#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTableType {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                AlterTableType::Iceberg => "Iceberg",
                AlterTableType::Dynamic => "Dynamic",
                AlterTableType::External => "External",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTableType {
    #[inline]
    fn clone(&self) -> AlterTableType {
        match self {
            AlterTableType::Iceberg => AlterTableType::Iceberg,
            AlterTableType::Dynamic => AlterTableType::Dynamic,
            AlterTableType::External => AlterTableType::External,
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTableType {
    #[inline]
    fn eq(&self, other: &AlterTableType) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTableType {
    #[inline]
    fn partial_cmp(&self, other: &AlterTableType)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTableType {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTableType {
    #[inline]
    fn cmp(&self, other: &AlterTableType) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTableType {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
4408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4409#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTableType {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Iceberg => {}
                            Self::Dynamic => {}
                            Self::External => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTableType {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Iceberg => {}
                            Self::Dynamic => {}
                            Self::External => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4410pub enum AlterTableType {
4411    /// Iceberg table type
4412    /// <https://docs.snowflake.com/en/sql-reference/sql/alter-iceberg-table>
4413    Iceberg,
4414    /// Dynamic table type
4415    /// <https://docs.snowflake.com/en/sql-reference/sql/alter-dynamic-table>
4416    Dynamic,
4417    /// External table type
4418    /// <https://docs.snowflake.com/en/sql-reference/sql/alter-external-table>
4419    External,
4420}
4421
4422/// ALTER TABLE statement
4423#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterTable {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "if_exists", "only", "operations", "location",
                        "on_cluster", "table_type", "end_token"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.if_exists, &self.only, &self.operations,
                        &self.location, &self.on_cluster, &self.table_type,
                        &&self.end_token];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "AlterTable",
            names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterTable {
    #[inline]
    fn clone(&self) -> AlterTable {
        AlterTable {
            name: ::core::clone::Clone::clone(&self.name),
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            only: ::core::clone::Clone::clone(&self.only),
            operations: ::core::clone::Clone::clone(&self.operations),
            location: ::core::clone::Clone::clone(&self.location),
            on_cluster: ::core::clone::Clone::clone(&self.on_cluster),
            table_type: ::core::clone::Clone::clone(&self.table_type),
            end_token: ::core::clone::Clone::clone(&self.end_token),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterTable {
    #[inline]
    fn eq(&self, other: &AlterTable) -> bool {
        self.if_exists == other.if_exists && self.only == other.only &&
                                self.name == other.name &&
                            self.operations == other.operations &&
                        self.location == other.location &&
                    self.on_cluster == other.on_cluster &&
                self.table_type == other.table_type &&
            self.end_token == other.end_token
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterTable {
    #[inline]
    fn partial_cmp(&self, other: &AlterTable)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                        &other.if_exists) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.only,
                                &other.only) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.operations,
                                        &other.operations) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.location,
                                                &other.location) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.on_cluster,
                                                        &other.on_cluster) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        match ::core::cmp::PartialOrd::partial_cmp(&self.table_type,
                                                                &other.table_type) {
                                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                                =>
                                                                ::core::cmp::PartialOrd::partial_cmp(&self.end_token,
                                                                    &other.end_token),
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterTable {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<AlterTableOperation>>;
        let _: ::core::cmp::AssertParamIsEq<Option<HiveSetLocation>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Ident>>;
        let _: ::core::cmp::AssertParamIsEq<Option<AlterTableType>>;
        let _: ::core::cmp::AssertParamIsEq<AttachedToken>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterTable {
    #[inline]
    fn cmp(&self, other: &AlterTable) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists)
                    {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.only, &other.only) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.operations,
                                        &other.operations) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.location, &other.location)
                                            {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.on_cluster,
                                                        &other.on_cluster) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        match ::core::cmp::Ord::cmp(&self.table_type,
                                                                &other.table_type) {
                                                            ::core::cmp::Ordering::Equal =>
                                                                ::core::cmp::Ord::cmp(&self.end_token, &other.end_token),
                                                            cmp => cmp,
                                                        },
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterTable {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.only, state);
        ::core::hash::Hash::hash(&self.operations, state);
        ::core::hash::Hash::hash(&self.location, state);
        ::core::hash::Hash::hash(&self.on_cluster, state);
        ::core::hash::Hash::hash(&self.table_type, state);
        ::core::hash::Hash::hash(&self.end_token, state)
    }
}Hash)]
4424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4425#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterTable {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        visitor.pre_visit_relation(&self.name)?;
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        visitor.post_visit_relation(&self.name)?;
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.only, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operations, visitor)?;
                        sqlparser::ast::Visit::visit(&self.location, visitor)?;
                        sqlparser::ast::Visit::visit(&self.on_cluster, visitor)?;
                        sqlparser::ast::Visit::visit(&self.table_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.end_token, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterTable {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        visitor.pre_visit_relation(&mut self.name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        visitor.post_visit_relation(&mut self.name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.only, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operations,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.location,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.on_cluster,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.end_token,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4426pub struct AlterTable {
4427    /// Table name
4428    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
4429    pub name: ObjectName,
4430    /// Whether `IF EXISTS` was specified for the `ALTER TABLE`.
4431    pub if_exists: bool,
4432    /// Whether the `ONLY` keyword was used (restrict scope to the named table).
4433    pub only: bool,
4434    /// List of `ALTER TABLE` operations to apply.
4435    pub operations: Vec<AlterTableOperation>,
4436    /// Optional Hive `SET LOCATION` clause for the alter operation.
4437    pub location: Option<HiveSetLocation>,
4438    /// ClickHouse dialect supports `ON CLUSTER` clause for ALTER TABLE
4439    /// For example: `ALTER TABLE table_name ON CLUSTER cluster_name ADD COLUMN c UInt32`
4440    /// [ClickHouse](https://clickhouse.com/docs/en/sql-reference/statements/alter/update)
4441    pub on_cluster: Option<Ident>,
4442    /// Table type: None for regular tables, Some(AlterTableType) for Iceberg or Dynamic tables
4443    pub table_type: Option<AlterTableType>,
4444    /// Token that represents the end of the statement (semicolon or EOF)
4445    pub end_token: AttachedToken,
4446}
4447
4448impl fmt::Display for AlterTable {
4449    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4450        match &self.table_type {
4451            Some(AlterTableType::Iceberg) => f.write_fmt(format_args!("ALTER ICEBERG TABLE "))write!(f, "ALTER ICEBERG TABLE ")?,
4452            Some(AlterTableType::Dynamic) => f.write_fmt(format_args!("ALTER DYNAMIC TABLE "))write!(f, "ALTER DYNAMIC TABLE ")?,
4453            Some(AlterTableType::External) => f.write_fmt(format_args!("ALTER EXTERNAL TABLE "))write!(f, "ALTER EXTERNAL TABLE ")?,
4454            None => f.write_fmt(format_args!("ALTER TABLE "))write!(f, "ALTER TABLE ")?,
4455        }
4456
4457        if self.if_exists {
4458            f.write_fmt(format_args!("IF EXISTS "))write!(f, "IF EXISTS ")?;
4459        }
4460        if self.only {
4461            f.write_fmt(format_args!("ONLY "))write!(f, "ONLY ")?;
4462        }
4463        f.write_fmt(format_args!("{0} ", &self.name))write!(f, "{} ", &self.name)?;
4464        if let Some(cluster) = &self.on_cluster {
4465            f.write_fmt(format_args!("ON CLUSTER {0} ", cluster))write!(f, "ON CLUSTER {cluster} ")?;
4466        }
4467        f.write_fmt(format_args!("{0}", display_comma_separated(&self.operations)))write!(f, "{}", display_comma_separated(&self.operations))?;
4468        if let Some(loc) = &self.location {
4469            f.write_fmt(format_args!(" {0}", loc))write!(f, " {loc}")?
4470        }
4471        Ok(())
4472    }
4473}
4474
4475/// DROP FUNCTION statement
4476#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropFunction {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "DropFunction",
            "if_exists", &self.if_exists, "func_desc", &self.func_desc,
            "drop_behavior", &&self.drop_behavior)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropFunction {
    #[inline]
    fn clone(&self) -> DropFunction {
        DropFunction {
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            func_desc: ::core::clone::Clone::clone(&self.func_desc),
            drop_behavior: ::core::clone::Clone::clone(&self.drop_behavior),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropFunction {
    #[inline]
    fn eq(&self, other: &DropFunction) -> bool {
        self.if_exists == other.if_exists && self.func_desc == other.func_desc
            && self.drop_behavior == other.drop_behavior
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropFunction {
    #[inline]
    fn partial_cmp(&self, other: &DropFunction)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                &other.if_exists) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.func_desc,
                        &other.func_desc) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.drop_behavior,
                            &other.drop_behavior),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropFunction {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<FunctionDesc>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropFunction {
    #[inline]
    fn cmp(&self, other: &DropFunction) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.func_desc, &other.func_desc)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.drop_behavior,
                            &other.drop_behavior),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropFunction {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.func_desc, state);
        ::core::hash::Hash::hash(&self.drop_behavior, state)
    }
}Hash)]
4477#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4478#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropFunction {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.func_desc, visitor)?;
                        sqlparser::ast::Visit::visit(&self.drop_behavior, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropFunction {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.func_desc,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.drop_behavior,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4479pub struct DropFunction {
4480    /// Whether to include the `IF EXISTS` clause.
4481    pub if_exists: bool,
4482    /// One or more functions to drop
4483    pub func_desc: Vec<FunctionDesc>,
4484    /// `CASCADE` or `RESTRICT`
4485    pub drop_behavior: Option<DropBehavior>,
4486}
4487
4488impl fmt::Display for DropFunction {
4489    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4490        f.write_fmt(format_args!("DROP FUNCTION{0} {1}",
        if self.if_exists { " IF EXISTS" } else { "" },
        display_comma_separated(&self.func_desc)))write!(
4491            f,
4492            "DROP FUNCTION{} {}",
4493            if self.if_exists { " IF EXISTS" } else { "" },
4494            display_comma_separated(&self.func_desc),
4495        )?;
4496        if let Some(op) = &self.drop_behavior {
4497            f.write_fmt(format_args!(" {0}", op))write!(f, " {op}")?;
4498        }
4499        Ok(())
4500    }
4501}
4502
4503impl Spanned for DropFunction {
4504    fn span(&self) -> Span {
4505        Span::empty()
4506    }
4507}
4508
4509/// CREATE OPERATOR statement
4510/// See <https://www.postgresql.org/docs/current/sql-createoperator.html>
4511#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateOperator {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "function", "is_procedure", "left_arg", "right_arg",
                        "options"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.function, &self.is_procedure, &self.left_arg,
                        &self.right_arg, &&self.options];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "CreateOperator", names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateOperator {
    #[inline]
    fn clone(&self) -> CreateOperator {
        CreateOperator {
            name: ::core::clone::Clone::clone(&self.name),
            function: ::core::clone::Clone::clone(&self.function),
            is_procedure: ::core::clone::Clone::clone(&self.is_procedure),
            left_arg: ::core::clone::Clone::clone(&self.left_arg),
            right_arg: ::core::clone::Clone::clone(&self.right_arg),
            options: ::core::clone::Clone::clone(&self.options),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateOperator {
    #[inline]
    fn eq(&self, other: &CreateOperator) -> bool {
        self.is_procedure == other.is_procedure && self.name == other.name &&
                        self.function == other.function &&
                    self.left_arg == other.left_arg &&
                self.right_arg == other.right_arg &&
            self.options == other.options
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateOperator {
    #[inline]
    fn partial_cmp(&self, other: &CreateOperator)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.function,
                        &other.function) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.is_procedure,
                                &other.is_procedure) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.left_arg,
                                        &other.left_arg) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.right_arg,
                                                &other.right_arg) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                ::core::cmp::PartialOrd::partial_cmp(&self.options,
                                                    &other.options),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateOperator {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<OperatorOption>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateOperator {
    #[inline]
    fn cmp(&self, other: &CreateOperator) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.function, &other.function) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.is_procedure,
                                &other.is_procedure) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.left_arg, &other.left_arg)
                                    {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.right_arg,
                                                &other.right_arg) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(&self.options, &other.options),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateOperator {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.function, state);
        ::core::hash::Hash::hash(&self.is_procedure, state);
        ::core::hash::Hash::hash(&self.left_arg, state);
        ::core::hash::Hash::hash(&self.right_arg, state);
        ::core::hash::Hash::hash(&self.options, state)
    }
}Hash)]
4512#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4513#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateOperator {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.function, visitor)?;
                        sqlparser::ast::Visit::visit(&self.is_procedure, visitor)?;
                        sqlparser::ast::Visit::visit(&self.left_arg, visitor)?;
                        sqlparser::ast::Visit::visit(&self.right_arg, visitor)?;
                        sqlparser::ast::Visit::visit(&self.options, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateOperator {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.function,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.is_procedure,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.left_arg,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.right_arg,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.options,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4514pub struct CreateOperator {
4515    /// Operator name (can be schema-qualified)
4516    pub name: ObjectName,
4517    /// FUNCTION or PROCEDURE parameter (function name)
4518    pub function: ObjectName,
4519    /// Whether PROCEDURE keyword was used (vs FUNCTION)
4520    pub is_procedure: bool,
4521    /// LEFTARG parameter (left operand type)
4522    pub left_arg: Option<DataType>,
4523    /// RIGHTARG parameter (right operand type)
4524    pub right_arg: Option<DataType>,
4525    /// Operator options (COMMUTATOR, NEGATOR, RESTRICT, JOIN, HASHES, MERGES)
4526    pub options: Vec<OperatorOption>,
4527}
4528
4529/// CREATE OPERATOR FAMILY statement
4530/// See <https://www.postgresql.org/docs/current/sql-createopfamily.html>
4531#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateOperatorFamily {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "CreateOperatorFamily", "name", &self.name, "using", &&self.using)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateOperatorFamily {
    #[inline]
    fn clone(&self) -> CreateOperatorFamily {
        CreateOperatorFamily {
            name: ::core::clone::Clone::clone(&self.name),
            using: ::core::clone::Clone::clone(&self.using),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateOperatorFamily {
    #[inline]
    fn eq(&self, other: &CreateOperatorFamily) -> bool {
        self.name == other.name && self.using == other.using
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateOperatorFamily {
    #[inline]
    fn partial_cmp(&self, other: &CreateOperatorFamily)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.using,
                    &other.using),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateOperatorFamily {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateOperatorFamily {
    #[inline]
    fn cmp(&self, other: &CreateOperatorFamily) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.using, &other.using),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateOperatorFamily {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.using, state)
    }
}Hash)]
4532#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4533#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateOperatorFamily {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateOperatorFamily {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4534pub struct CreateOperatorFamily {
4535    /// Operator family name (can be schema-qualified)
4536    pub name: ObjectName,
4537    /// Index method (btree, hash, gist, gin, etc.)
4538    pub using: Ident,
4539}
4540
4541/// CREATE OPERATOR CLASS statement
4542/// See <https://www.postgresql.org/docs/current/sql-createopclass.html>
4543#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreateOperatorClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "default", "for_type", "using", "family", "items"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.default, &self.for_type, &self.using,
                        &self.family, &&self.items];
        ::core::fmt::Formatter::debug_struct_fields_finish(f,
            "CreateOperatorClass", names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreateOperatorClass {
    #[inline]
    fn clone(&self) -> CreateOperatorClass {
        CreateOperatorClass {
            name: ::core::clone::Clone::clone(&self.name),
            default: ::core::clone::Clone::clone(&self.default),
            for_type: ::core::clone::Clone::clone(&self.for_type),
            using: ::core::clone::Clone::clone(&self.using),
            family: ::core::clone::Clone::clone(&self.family),
            items: ::core::clone::Clone::clone(&self.items),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreateOperatorClass {
    #[inline]
    fn eq(&self, other: &CreateOperatorClass) -> bool {
        self.default == other.default && self.name == other.name &&
                        self.for_type == other.for_type && self.using == other.using
                && self.family == other.family && self.items == other.items
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreateOperatorClass {
    #[inline]
    fn partial_cmp(&self, other: &CreateOperatorClass)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.default,
                        &other.default) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.for_type,
                                &other.for_type) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                                        &other.using) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.family,
                                                &other.family) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                ::core::cmp::PartialOrd::partial_cmp(&self.items,
                                                    &other.items),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreateOperatorClass {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<Option<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<OperatorClassItem>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreateOperatorClass {
    #[inline]
    fn cmp(&self, other: &CreateOperatorClass) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.default, &other.default) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.for_type, &other.for_type)
                            {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.family, &other.family) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(&self.items, &other.items),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreateOperatorClass {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.default, state);
        ::core::hash::Hash::hash(&self.for_type, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.family, state);
        ::core::hash::Hash::hash(&self.items, state)
    }
}Hash)]
4544#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4545#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreateOperatorClass {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.default, visitor)?;
                        sqlparser::ast::Visit::visit(&self.for_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.family, visitor)?;
                        sqlparser::ast::Visit::visit(&self.items, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreateOperatorClass {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.default,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.for_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.family, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.items, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4546pub struct CreateOperatorClass {
4547    /// Operator class name (can be schema-qualified)
4548    pub name: ObjectName,
4549    /// Whether this is the default operator class for the type
4550    pub default: bool,
4551    /// The data type
4552    pub for_type: DataType,
4553    /// Index method (btree, hash, gist, gin, etc.)
4554    pub using: Ident,
4555    /// Optional operator family name
4556    pub family: Option<ObjectName>,
4557    /// List of operator class items (operators, functions, storage)
4558    pub items: Vec<OperatorClassItem>,
4559}
4560
4561impl fmt::Display for CreateOperator {
4562    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4563        f.write_fmt(format_args!("CREATE OPERATOR {0} (", self.name))write!(f, "CREATE OPERATOR {} (", self.name)?;
4564
4565        let function_keyword = if self.is_procedure {
4566            "PROCEDURE"
4567        } else {
4568            "FUNCTION"
4569        };
4570        let mut params = ::alloc::boxed::box_assume_init_into_vec_unsafe(::alloc::intrinsics::write_box_via_move(::alloc::boxed::Box::new_uninit(),
        [::alloc::__export::must_use({
                        ::alloc::fmt::format(format_args!("{0} = {1}",
                                function_keyword, self.function))
                    })]))vec![format!("{} = {}", function_keyword, self.function)];
4571
4572        if let Some(left_arg) = &self.left_arg {
4573            params.push(::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("LEFTARG = {0}", left_arg))
    })format!("LEFTARG = {}", left_arg));
4574        }
4575        if let Some(right_arg) = &self.right_arg {
4576            params.push(::alloc::__export::must_use({
        ::alloc::fmt::format(format_args!("RIGHTARG = {0}", right_arg))
    })format!("RIGHTARG = {}", right_arg));
4577        }
4578
4579        for option in &self.options {
4580            params.push(option.to_string());
4581        }
4582
4583        f.write_fmt(format_args!("{0}", params.join(", ")))write!(f, "{}", params.join(", "))?;
4584        f.write_fmt(format_args!(")"))write!(f, ")")
4585    }
4586}
4587
4588impl fmt::Display for CreateOperatorFamily {
4589    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4590        f.write_fmt(format_args!("CREATE OPERATOR FAMILY {0} USING {1}", self.name,
        self.using))write!(
4591            f,
4592            "CREATE OPERATOR FAMILY {} USING {}",
4593            self.name, self.using
4594        )
4595    }
4596}
4597
4598impl fmt::Display for CreateOperatorClass {
4599    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4600        f.write_fmt(format_args!("CREATE OPERATOR CLASS {0}", self.name))write!(f, "CREATE OPERATOR CLASS {}", self.name)?;
4601        if self.default {
4602            f.write_fmt(format_args!(" DEFAULT"))write!(f, " DEFAULT")?;
4603        }
4604        f.write_fmt(format_args!(" FOR TYPE {0} USING {1}", self.for_type,
        self.using))write!(f, " FOR TYPE {} USING {}", self.for_type, self.using)?;
4605        if let Some(family) = &self.family {
4606            f.write_fmt(format_args!(" FAMILY {0}", family))write!(f, " FAMILY {}", family)?;
4607        }
4608        f.write_fmt(format_args!(" AS {0}", display_comma_separated(&self.items)))write!(f, " AS {}", display_comma_separated(&self.items))
4609    }
4610}
4611
4612/// Operator argument types for CREATE OPERATOR CLASS
4613#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OperatorArgTypes {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field2_finish(f,
            "OperatorArgTypes", "left", &self.left, "right", &&self.right)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OperatorArgTypes {
    #[inline]
    fn clone(&self) -> OperatorArgTypes {
        OperatorArgTypes {
            left: ::core::clone::Clone::clone(&self.left),
            right: ::core::clone::Clone::clone(&self.right),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OperatorArgTypes {
    #[inline]
    fn eq(&self, other: &OperatorArgTypes) -> bool {
        self.left == other.left && self.right == other.right
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OperatorArgTypes {
    #[inline]
    fn partial_cmp(&self, other: &OperatorArgTypes)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.left, &other.left) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                ::core::cmp::PartialOrd::partial_cmp(&self.right,
                    &other.right),
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OperatorArgTypes {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<DataType>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OperatorArgTypes {
    #[inline]
    fn cmp(&self, other: &OperatorArgTypes) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.left, &other.left) {
            ::core::cmp::Ordering::Equal =>
                ::core::cmp::Ord::cmp(&self.right, &other.right),
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OperatorArgTypes {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.left, state);
        ::core::hash::Hash::hash(&self.right, state)
    }
}Hash)]
4614#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4615#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OperatorArgTypes {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.left, visitor)?;
                        sqlparser::ast::Visit::visit(&self.right, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for OperatorArgTypes {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.left, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.right, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4616pub struct OperatorArgTypes {
4617    /// Left-hand operand data type for the operator.
4618    pub left: DataType,
4619    /// Right-hand operand data type for the operator.
4620    pub right: DataType,
4621}
4622
4623impl fmt::Display for OperatorArgTypes {
4624    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4625        f.write_fmt(format_args!("{0}, {1}", self.left, self.right))write!(f, "{}, {}", self.left, self.right)
4626    }
4627}
4628
4629/// An item in a CREATE OPERATOR CLASS statement
4630#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OperatorClassItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            OperatorClassItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "Operator", "strategy_number", __self_0, "operator_name",
                    __self_1, "op_types", __self_2, "purpose", &__self_3),
            OperatorClassItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "Function", "support_number", __self_0, "op_types",
                    __self_1, "function_name", __self_2, "argument_types",
                    &__self_3),
            OperatorClassItem::Storage { storage_type: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "Storage", "storage_type", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OperatorClassItem {
    #[inline]
    fn clone(&self) -> OperatorClassItem {
        match self {
            OperatorClassItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 } =>
                OperatorClassItem::Operator {
                    strategy_number: ::core::clone::Clone::clone(__self_0),
                    operator_name: ::core::clone::Clone::clone(__self_1),
                    op_types: ::core::clone::Clone::clone(__self_2),
                    purpose: ::core::clone::Clone::clone(__self_3),
                },
            OperatorClassItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 } =>
                OperatorClassItem::Function {
                    support_number: ::core::clone::Clone::clone(__self_0),
                    op_types: ::core::clone::Clone::clone(__self_1),
                    function_name: ::core::clone::Clone::clone(__self_2),
                    argument_types: ::core::clone::Clone::clone(__self_3),
                },
            OperatorClassItem::Storage { storage_type: __self_0 } =>
                OperatorClassItem::Storage {
                    storage_type: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OperatorClassItem {
    #[inline]
    fn eq(&self, other: &OperatorClassItem) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (OperatorClassItem::Operator {
                    strategy_number: __self_0,
                    operator_name: __self_1,
                    op_types: __self_2,
                    purpose: __self_3 }, OperatorClassItem::Operator {
                    strategy_number: __arg1_0,
                    operator_name: __arg1_1,
                    op_types: __arg1_2,
                    purpose: __arg1_3 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                            __self_2 == __arg1_2 && __self_3 == __arg1_3,
                (OperatorClassItem::Function {
                    support_number: __self_0,
                    op_types: __self_1,
                    function_name: __self_2,
                    argument_types: __self_3 }, OperatorClassItem::Function {
                    support_number: __arg1_0,
                    op_types: __arg1_1,
                    function_name: __arg1_2,
                    argument_types: __arg1_3 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                            __self_2 == __arg1_2 && __self_3 == __arg1_3,
                (OperatorClassItem::Storage { storage_type: __self_0 },
                    OperatorClassItem::Storage { storage_type: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OperatorClassItem {
    #[inline]
    fn partial_cmp(&self, other: &OperatorClassItem)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (OperatorClassItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 }, OperatorClassItem::Operator {
                strategy_number: __arg1_0,
                operator_name: __arg1_1,
                op_types: __arg1_2,
                purpose: __arg1_3 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                __arg1_1) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                        __arg1_2) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            (OperatorClassItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 }, OperatorClassItem::Function {
                support_number: __arg1_0,
                op_types: __arg1_1,
                function_name: __arg1_2,
                argument_types: __arg1_3 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                __arg1_1) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                        __arg1_2) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            (OperatorClassItem::Storage { storage_type: __self_0 },
                OperatorClassItem::Storage { storage_type: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OperatorClassItem {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u64>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<OperatorArgTypes>>;
        let _: ::core::cmp::AssertParamIsEq<Option<OperatorPurpose>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<DataType>>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OperatorClassItem {
    #[inline]
    fn cmp(&self, other: &OperatorClassItem) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (OperatorClassItem::Operator {
                        strategy_number: __self_0,
                        operator_name: __self_1,
                        op_types: __self_2,
                        purpose: __self_3 }, OperatorClassItem::Operator {
                        strategy_number: __arg1_0,
                        operator_name: __arg1_1,
                        op_types: __arg1_2,
                        purpose: __arg1_3 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (OperatorClassItem::Function {
                        support_number: __self_0,
                        op_types: __self_1,
                        function_name: __self_2,
                        argument_types: __self_3 }, OperatorClassItem::Function {
                        support_number: __arg1_0,
                        op_types: __arg1_1,
                        function_name: __arg1_2,
                        argument_types: __arg1_3 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (OperatorClassItem::Storage { storage_type: __self_0 },
                        OperatorClassItem::Storage { storage_type: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OperatorClassItem {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            OperatorClassItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state)
            }
            OperatorClassItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state)
            }
            OperatorClassItem::Storage { storage_type: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
4631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4632#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OperatorClassItem {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Operator {
                                strategy_number, operator_name, op_types, purpose } => {
                                sqlparser::ast::Visit::visit(strategy_number, visitor)?;
                                sqlparser::ast::Visit::visit(operator_name, visitor)?;
                                sqlparser::ast::Visit::visit(op_types, visitor)?;
                                sqlparser::ast::Visit::visit(purpose, visitor)?;
                            }
                            Self::Function {
                                support_number, op_types, function_name, argument_types } =>
                                {
                                sqlparser::ast::Visit::visit(support_number, visitor)?;
                                sqlparser::ast::Visit::visit(op_types, visitor)?;
                                sqlparser::ast::Visit::visit(function_name, visitor)?;
                                sqlparser::ast::Visit::visit(argument_types, visitor)?;
                            }
                            Self::Storage { storage_type } => {
                                sqlparser::ast::Visit::visit(storage_type, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for OperatorClassItem {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Operator {
                                strategy_number, operator_name, op_types, purpose } => {
                                sqlparser::ast::VisitMut::visit(strategy_number, visitor)?;
                                sqlparser::ast::VisitMut::visit(operator_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(op_types, visitor)?;
                                sqlparser::ast::VisitMut::visit(purpose, visitor)?;
                            }
                            Self::Function {
                                support_number, op_types, function_name, argument_types } =>
                                {
                                sqlparser::ast::VisitMut::visit(support_number, visitor)?;
                                sqlparser::ast::VisitMut::visit(op_types, visitor)?;
                                sqlparser::ast::VisitMut::visit(function_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(argument_types, visitor)?;
                            }
                            Self::Storage { storage_type } => {
                                sqlparser::ast::VisitMut::visit(storage_type, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4633pub enum OperatorClassItem {
4634    /// `OPERATOR` clause describing a specific operator implementation.
4635    Operator {
4636        /// Strategy number identifying the operator position in the opclass.
4637        strategy_number: u64,
4638        /// The operator name referenced by this clause.
4639        operator_name: ObjectName,
4640        /// Optional operator argument types.
4641        op_types: Option<OperatorArgTypes>,
4642        /// Optional purpose such as `FOR SEARCH` or `FOR ORDER BY`.
4643        purpose: Option<OperatorPurpose>,
4644    },
4645    /// `FUNCTION` clause describing a support function for the operator class.
4646    Function {
4647        /// Support function number for this entry.
4648        support_number: u64,
4649        /// Optional function argument types for the operator class.
4650        op_types: Option<Vec<DataType>>,
4651        /// The function name implementing the support function.
4652        function_name: ObjectName,
4653        /// Function argument types for the support function.
4654        argument_types: Vec<DataType>,
4655    },
4656    /// `STORAGE` clause specifying the storage type.
4657    Storage {
4658        /// The storage data type.
4659        storage_type: DataType,
4660    },
4661}
4662
4663/// Purpose of an operator in an operator class
4664#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OperatorPurpose {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            OperatorPurpose::ForSearch =>
                ::core::fmt::Formatter::write_str(f, "ForSearch"),
            OperatorPurpose::ForOrderBy { sort_family: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "ForOrderBy", "sort_family", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OperatorPurpose {
    #[inline]
    fn clone(&self) -> OperatorPurpose {
        match self {
            OperatorPurpose::ForSearch => OperatorPurpose::ForSearch,
            OperatorPurpose::ForOrderBy { sort_family: __self_0 } =>
                OperatorPurpose::ForOrderBy {
                    sort_family: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OperatorPurpose {
    #[inline]
    fn eq(&self, other: &OperatorPurpose) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (OperatorPurpose::ForOrderBy { sort_family: __self_0 },
                    OperatorPurpose::ForOrderBy { sort_family: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                _ => true,
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OperatorPurpose {
    #[inline]
    fn partial_cmp(&self, other: &OperatorPurpose)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (OperatorPurpose::ForOrderBy { sort_family: __self_0 },
                OperatorPurpose::ForOrderBy { sort_family: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OperatorPurpose {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OperatorPurpose {
    #[inline]
    fn cmp(&self, other: &OperatorPurpose) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (OperatorPurpose::ForOrderBy { sort_family: __self_0 },
                        OperatorPurpose::ForOrderBy { sort_family: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => ::core::cmp::Ordering::Equal,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OperatorPurpose {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            OperatorPurpose::ForOrderBy { sort_family: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            _ => {}
        }
    }
}Hash)]
4665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4666#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OperatorPurpose {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::ForSearch => {}
                            Self::ForOrderBy { sort_family } => {
                                sqlparser::ast::Visit::visit(sort_family, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for OperatorPurpose {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::ForSearch => {}
                            Self::ForOrderBy { sort_family } => {
                                sqlparser::ast::VisitMut::visit(sort_family, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4667pub enum OperatorPurpose {
4668    /// Purpose: used for index/search operations.
4669    ForSearch,
4670    /// Purpose: used for ORDER BY; optionally includes a sort family name.
4671    ForOrderBy {
4672        /// Optional sort family object name.
4673        sort_family: ObjectName,
4674    },
4675}
4676
4677impl fmt::Display for OperatorClassItem {
4678    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4679        match self {
4680            OperatorClassItem::Operator {
4681                strategy_number,
4682                operator_name,
4683                op_types,
4684                purpose,
4685            } => {
4686                f.write_fmt(format_args!("OPERATOR {0} {1}", strategy_number, operator_name))write!(f, "OPERATOR {strategy_number} {operator_name}")?;
4687                if let Some(types) = op_types {
4688                    f.write_fmt(format_args!(" ({0})", types))write!(f, " ({types})")?;
4689                }
4690                if let Some(purpose) = purpose {
4691                    f.write_fmt(format_args!(" {0}", purpose))write!(f, " {purpose}")?;
4692                }
4693                Ok(())
4694            }
4695            OperatorClassItem::Function {
4696                support_number,
4697                op_types,
4698                function_name,
4699                argument_types,
4700            } => {
4701                f.write_fmt(format_args!("FUNCTION {0}", support_number))write!(f, "FUNCTION {support_number}")?;
4702                if let Some(types) = op_types {
4703                    f.write_fmt(format_args!(" ({0})", display_comma_separated(types)))write!(f, " ({})", display_comma_separated(types))?;
4704                }
4705                f.write_fmt(format_args!(" {0}", function_name))write!(f, " {function_name}")?;
4706                if !argument_types.is_empty() {
4707                    f.write_fmt(format_args!("({0})", display_comma_separated(argument_types)))write!(f, "({})", display_comma_separated(argument_types))?;
4708                }
4709                Ok(())
4710            }
4711            OperatorClassItem::Storage { storage_type } => {
4712                f.write_fmt(format_args!("STORAGE {0}", storage_type))write!(f, "STORAGE {storage_type}")
4713            }
4714        }
4715    }
4716}
4717
4718impl fmt::Display for OperatorPurpose {
4719    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4720        match self {
4721            OperatorPurpose::ForSearch => f.write_fmt(format_args!("FOR SEARCH"))write!(f, "FOR SEARCH"),
4722            OperatorPurpose::ForOrderBy { sort_family } => {
4723                f.write_fmt(format_args!("FOR ORDER BY {0}", sort_family))write!(f, "FOR ORDER BY {sort_family}")
4724            }
4725        }
4726    }
4727}
4728
4729/// `DROP OPERATOR` statement
4730/// See <https://www.postgresql.org/docs/current/sql-dropoperator.html>
4731#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropOperator {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "DropOperator",
            "if_exists", &self.if_exists, "operators", &self.operators,
            "drop_behavior", &&self.drop_behavior)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropOperator {
    #[inline]
    fn clone(&self) -> DropOperator {
        DropOperator {
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            operators: ::core::clone::Clone::clone(&self.operators),
            drop_behavior: ::core::clone::Clone::clone(&self.drop_behavior),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropOperator {
    #[inline]
    fn eq(&self, other: &DropOperator) -> bool {
        self.if_exists == other.if_exists && self.operators == other.operators
            && self.drop_behavior == other.drop_behavior
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropOperator {
    #[inline]
    fn partial_cmp(&self, other: &DropOperator)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                &other.if_exists) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.operators,
                        &other.operators) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.drop_behavior,
                            &other.drop_behavior),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropOperator {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<DropOperatorSignature>>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropOperator {
    #[inline]
    fn cmp(&self, other: &DropOperator) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.operators, &other.operators)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.drop_behavior,
                            &other.drop_behavior),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropOperator {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.operators, state);
        ::core::hash::Hash::hash(&self.drop_behavior, state)
    }
}Hash)]
4732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4733#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropOperator {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operators, visitor)?;
                        sqlparser::ast::Visit::visit(&self.drop_behavior, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropOperator {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operators,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.drop_behavior,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4734pub struct DropOperator {
4735    /// `IF EXISTS` clause
4736    pub if_exists: bool,
4737    /// One or more operators to drop with their signatures
4738    pub operators: Vec<DropOperatorSignature>,
4739    /// `CASCADE or RESTRICT`
4740    pub drop_behavior: Option<DropBehavior>,
4741}
4742
4743/// Operator signature for a `DROP OPERATOR` statement
4744#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropOperatorSignature {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "DropOperatorSignature", "name", &self.name, "left_type",
            &self.left_type, "right_type", &&self.right_type)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropOperatorSignature {
    #[inline]
    fn clone(&self) -> DropOperatorSignature {
        DropOperatorSignature {
            name: ::core::clone::Clone::clone(&self.name),
            left_type: ::core::clone::Clone::clone(&self.left_type),
            right_type: ::core::clone::Clone::clone(&self.right_type),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropOperatorSignature {
    #[inline]
    fn eq(&self, other: &DropOperatorSignature) -> bool {
        self.name == other.name && self.left_type == other.left_type &&
            self.right_type == other.right_type
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropOperatorSignature {
    #[inline]
    fn partial_cmp(&self, other: &DropOperatorSignature)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.left_type,
                        &other.left_type) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.right_type,
                            &other.right_type),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropOperatorSignature {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<DataType>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropOperatorSignature {
    #[inline]
    fn cmp(&self, other: &DropOperatorSignature) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.left_type, &other.left_type)
                    {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.right_type, &other.right_type),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropOperatorSignature {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.left_type, state);
        ::core::hash::Hash::hash(&self.right_type, state)
    }
}Hash)]
4745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4746#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropOperatorSignature {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.left_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.right_type, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropOperatorSignature {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.left_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.right_type,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4747pub struct DropOperatorSignature {
4748    /// Operator name
4749    pub name: ObjectName,
4750    /// Left operand type
4751    pub left_type: Option<DataType>,
4752    /// Right operand type
4753    pub right_type: DataType,
4754}
4755
4756impl fmt::Display for DropOperatorSignature {
4757    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4758        f.write_fmt(format_args!("{0} (", self.name))write!(f, "{} (", self.name)?;
4759        if let Some(left_type) = &self.left_type {
4760            f.write_fmt(format_args!("{0}", left_type))write!(f, "{}", left_type)?;
4761        } else {
4762            f.write_fmt(format_args!("NONE"))write!(f, "NONE")?;
4763        }
4764        f.write_fmt(format_args!(", {0})", self.right_type))write!(f, ", {})", self.right_type)
4765    }
4766}
4767
4768impl fmt::Display for DropOperator {
4769    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4770        f.write_fmt(format_args!("DROP OPERATOR"))write!(f, "DROP OPERATOR")?;
4771        if self.if_exists {
4772            f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
4773        }
4774        f.write_fmt(format_args!(" {0}", display_comma_separated(&self.operators)))write!(f, " {}", display_comma_separated(&self.operators))?;
4775        if let Some(drop_behavior) = &self.drop_behavior {
4776            f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {}", drop_behavior)?;
4777        }
4778        Ok(())
4779    }
4780}
4781
4782impl Spanned for DropOperator {
4783    fn span(&self) -> Span {
4784        Span::empty()
4785    }
4786}
4787
4788/// `DROP OPERATOR FAMILY` statement
4789/// See <https://www.postgresql.org/docs/current/sql-dropopfamily.html>
4790#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropOperatorFamily {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "DropOperatorFamily", "if_exists", &self.if_exists, "names",
            &self.names, "using", &self.using, "drop_behavior",
            &&self.drop_behavior)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropOperatorFamily {
    #[inline]
    fn clone(&self) -> DropOperatorFamily {
        DropOperatorFamily {
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            names: ::core::clone::Clone::clone(&self.names),
            using: ::core::clone::Clone::clone(&self.using),
            drop_behavior: ::core::clone::Clone::clone(&self.drop_behavior),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropOperatorFamily {
    #[inline]
    fn eq(&self, other: &DropOperatorFamily) -> bool {
        self.if_exists == other.if_exists && self.names == other.names &&
                self.using == other.using &&
            self.drop_behavior == other.drop_behavior
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropOperatorFamily {
    #[inline]
    fn partial_cmp(&self, other: &DropOperatorFamily)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                &other.if_exists) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.names,
                        &other.names) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                                &other.using) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                ::core::cmp::PartialOrd::partial_cmp(&self.drop_behavior,
                                    &other.drop_behavior),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropOperatorFamily {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropOperatorFamily {
    #[inline]
    fn cmp(&self, other: &DropOperatorFamily) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.names, &other.names) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(&self.drop_behavior,
                                    &other.drop_behavior),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropOperatorFamily {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.names, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.drop_behavior, state)
    }
}Hash)]
4791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4792#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropOperatorFamily {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.names, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.drop_behavior, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropOperatorFamily {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.names, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.drop_behavior,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4793pub struct DropOperatorFamily {
4794    /// `IF EXISTS` clause
4795    pub if_exists: bool,
4796    /// One or more operator families to drop
4797    pub names: Vec<ObjectName>,
4798    /// Index method (btree, hash, gist, gin, etc.)
4799    pub using: Ident,
4800    /// `CASCADE or RESTRICT`
4801    pub drop_behavior: Option<DropBehavior>,
4802}
4803
4804impl fmt::Display for DropOperatorFamily {
4805    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4806        f.write_fmt(format_args!("DROP OPERATOR FAMILY"))write!(f, "DROP OPERATOR FAMILY")?;
4807        if self.if_exists {
4808            f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
4809        }
4810        f.write_fmt(format_args!(" {0}", display_comma_separated(&self.names)))write!(f, " {}", display_comma_separated(&self.names))?;
4811        f.write_fmt(format_args!(" USING {0}", self.using))write!(f, " USING {}", self.using)?;
4812        if let Some(drop_behavior) = &self.drop_behavior {
4813            f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {}", drop_behavior)?;
4814        }
4815        Ok(())
4816    }
4817}
4818
4819impl Spanned for DropOperatorFamily {
4820    fn span(&self) -> Span {
4821        Span::empty()
4822    }
4823}
4824
4825/// `DROP OPERATOR CLASS` statement
4826/// See <https://www.postgresql.org/docs/current/sql-dropopclass.html>
4827#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropOperatorClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f,
            "DropOperatorClass", "if_exists", &self.if_exists, "names",
            &self.names, "using", &self.using, "drop_behavior",
            &&self.drop_behavior)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropOperatorClass {
    #[inline]
    fn clone(&self) -> DropOperatorClass {
        DropOperatorClass {
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            names: ::core::clone::Clone::clone(&self.names),
            using: ::core::clone::Clone::clone(&self.using),
            drop_behavior: ::core::clone::Clone::clone(&self.drop_behavior),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropOperatorClass {
    #[inline]
    fn eq(&self, other: &DropOperatorClass) -> bool {
        self.if_exists == other.if_exists && self.names == other.names &&
                self.using == other.using &&
            self.drop_behavior == other.drop_behavior
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropOperatorClass {
    #[inline]
    fn partial_cmp(&self, other: &DropOperatorClass)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                &other.if_exists) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.names,
                        &other.names) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                                &other.using) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                ::core::cmp::PartialOrd::partial_cmp(&self.drop_behavior,
                                    &other.drop_behavior),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropOperatorClass {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Vec<ObjectName>>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropOperatorClass {
    #[inline]
    fn cmp(&self, other: &DropOperatorClass) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.names, &other.names) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(&self.drop_behavior,
                                    &other.drop_behavior),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropOperatorClass {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.names, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.drop_behavior, state)
    }
}Hash)]
4828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4829#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropOperatorClass {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.names, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.drop_behavior, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropOperatorClass {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.names, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.drop_behavior,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4830pub struct DropOperatorClass {
4831    /// `IF EXISTS` clause
4832    pub if_exists: bool,
4833    /// One or more operator classes to drop
4834    pub names: Vec<ObjectName>,
4835    /// Index method (btree, hash, gist, gin, etc.)
4836    pub using: Ident,
4837    /// `CASCADE or RESTRICT`
4838    pub drop_behavior: Option<DropBehavior>,
4839}
4840
4841impl fmt::Display for DropOperatorClass {
4842    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4843        f.write_fmt(format_args!("DROP OPERATOR CLASS"))write!(f, "DROP OPERATOR CLASS")?;
4844        if self.if_exists {
4845            f.write_fmt(format_args!(" IF EXISTS"))write!(f, " IF EXISTS")?;
4846        }
4847        f.write_fmt(format_args!(" {0}", display_comma_separated(&self.names)))write!(f, " {}", display_comma_separated(&self.names))?;
4848        f.write_fmt(format_args!(" USING {0}", self.using))write!(f, " USING {}", self.using)?;
4849        if let Some(drop_behavior) = &self.drop_behavior {
4850            f.write_fmt(format_args!(" {0}", drop_behavior))write!(f, " {}", drop_behavior)?;
4851        }
4852        Ok(())
4853    }
4854}
4855
4856impl Spanned for DropOperatorClass {
4857    fn span(&self) -> Span {
4858        Span::empty()
4859    }
4860}
4861
4862/// An item in an ALTER OPERATOR FAMILY ADD statement
4863#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OperatorFamilyItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            OperatorFamilyItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "Operator", "strategy_number", __self_0, "operator_name",
                    __self_1, "op_types", __self_2, "purpose", &__self_3),
            OperatorFamilyItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 } =>
                ::core::fmt::Formatter::debug_struct_field4_finish(f,
                    "Function", "support_number", __self_0, "op_types",
                    __self_1, "function_name", __self_2, "argument_types",
                    &__self_3),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OperatorFamilyItem {
    #[inline]
    fn clone(&self) -> OperatorFamilyItem {
        match self {
            OperatorFamilyItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 } =>
                OperatorFamilyItem::Operator {
                    strategy_number: ::core::clone::Clone::clone(__self_0),
                    operator_name: ::core::clone::Clone::clone(__self_1),
                    op_types: ::core::clone::Clone::clone(__self_2),
                    purpose: ::core::clone::Clone::clone(__self_3),
                },
            OperatorFamilyItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 } =>
                OperatorFamilyItem::Function {
                    support_number: ::core::clone::Clone::clone(__self_0),
                    op_types: ::core::clone::Clone::clone(__self_1),
                    function_name: ::core::clone::Clone::clone(__self_2),
                    argument_types: ::core::clone::Clone::clone(__self_3),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OperatorFamilyItem {
    #[inline]
    fn eq(&self, other: &OperatorFamilyItem) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (OperatorFamilyItem::Operator {
                    strategy_number: __self_0,
                    operator_name: __self_1,
                    op_types: __self_2,
                    purpose: __self_3 }, OperatorFamilyItem::Operator {
                    strategy_number: __arg1_0,
                    operator_name: __arg1_1,
                    op_types: __arg1_2,
                    purpose: __arg1_3 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                            __self_2 == __arg1_2 && __self_3 == __arg1_3,
                (OperatorFamilyItem::Function {
                    support_number: __self_0,
                    op_types: __self_1,
                    function_name: __self_2,
                    argument_types: __self_3 }, OperatorFamilyItem::Function {
                    support_number: __arg1_0,
                    op_types: __arg1_1,
                    function_name: __arg1_2,
                    argument_types: __arg1_3 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1 &&
                            __self_2 == __arg1_2 && __self_3 == __arg1_3,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OperatorFamilyItem {
    #[inline]
    fn partial_cmp(&self, other: &OperatorFamilyItem)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (OperatorFamilyItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 }, OperatorFamilyItem::Operator {
                strategy_number: __arg1_0,
                operator_name: __arg1_1,
                op_types: __arg1_2,
                purpose: __arg1_3 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                __arg1_1) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                        __arg1_2) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            (OperatorFamilyItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 }, OperatorFamilyItem::Function {
                support_number: __arg1_0,
                op_types: __arg1_1,
                function_name: __arg1_2,
                argument_types: __arg1_3 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(__self_1,
                                __arg1_1) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(__self_2,
                                        __arg1_2) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        => ::core::cmp::PartialOrd::partial_cmp(__self_3, __arg1_3),
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OperatorFamilyItem {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u64>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<Option<OperatorPurpose>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<DataType>>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OperatorFamilyItem {
    #[inline]
    fn cmp(&self, other: &OperatorFamilyItem) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (OperatorFamilyItem::Operator {
                        strategy_number: __self_0,
                        operator_name: __self_1,
                        op_types: __self_2,
                        purpose: __self_3 }, OperatorFamilyItem::Operator {
                        strategy_number: __arg1_0,
                        operator_name: __arg1_1,
                        op_types: __arg1_2,
                        purpose: __arg1_3 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    (OperatorFamilyItem::Function {
                        support_number: __self_0,
                        op_types: __self_1,
                        function_name: __self_2,
                        argument_types: __self_3 }, OperatorFamilyItem::Function {
                        support_number: __arg1_0,
                        op_types: __arg1_1,
                        function_name: __arg1_2,
                        argument_types: __arg1_3 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(__self_1, __arg1_1) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(__self_2, __arg1_2) {
                                            ::core::cmp::Ordering::Equal =>
                                                ::core::cmp::Ord::cmp(__self_3, __arg1_3),
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OperatorFamilyItem {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            OperatorFamilyItem::Operator {
                strategy_number: __self_0,
                operator_name: __self_1,
                op_types: __self_2,
                purpose: __self_3 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state)
            }
            OperatorFamilyItem::Function {
                support_number: __self_0,
                op_types: __self_1,
                function_name: __self_2,
                argument_types: __self_3 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state);
                ::core::hash::Hash::hash(__self_2, state);
                ::core::hash::Hash::hash(__self_3, state)
            }
        }
    }
}Hash)]
4864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4865#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OperatorFamilyItem {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Operator {
                                strategy_number, operator_name, op_types, purpose } => {
                                sqlparser::ast::Visit::visit(strategy_number, visitor)?;
                                sqlparser::ast::Visit::visit(operator_name, visitor)?;
                                sqlparser::ast::Visit::visit(op_types, visitor)?;
                                sqlparser::ast::Visit::visit(purpose, visitor)?;
                            }
                            Self::Function {
                                support_number, op_types, function_name, argument_types } =>
                                {
                                sqlparser::ast::Visit::visit(support_number, visitor)?;
                                sqlparser::ast::Visit::visit(op_types, visitor)?;
                                sqlparser::ast::Visit::visit(function_name, visitor)?;
                                sqlparser::ast::Visit::visit(argument_types, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for OperatorFamilyItem {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Operator {
                                strategy_number, operator_name, op_types, purpose } => {
                                sqlparser::ast::VisitMut::visit(strategy_number, visitor)?;
                                sqlparser::ast::VisitMut::visit(operator_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(op_types, visitor)?;
                                sqlparser::ast::VisitMut::visit(purpose, visitor)?;
                            }
                            Self::Function {
                                support_number, op_types, function_name, argument_types } =>
                                {
                                sqlparser::ast::VisitMut::visit(support_number, visitor)?;
                                sqlparser::ast::VisitMut::visit(op_types, visitor)?;
                                sqlparser::ast::VisitMut::visit(function_name, visitor)?;
                                sqlparser::ast::VisitMut::visit(argument_types, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4866pub enum OperatorFamilyItem {
4867    /// `OPERATOR` clause in an operator family modification.
4868    Operator {
4869        /// Strategy number for the operator.
4870        strategy_number: u64,
4871        /// Operator name referenced by this entry.
4872        operator_name: ObjectName,
4873        /// Operator argument types.
4874        op_types: Vec<DataType>,
4875        /// Optional purpose such as `FOR SEARCH` or `FOR ORDER BY`.
4876        purpose: Option<OperatorPurpose>,
4877    },
4878    /// `FUNCTION` clause in an operator family modification.
4879    Function {
4880        /// Support function number.
4881        support_number: u64,
4882        /// Optional operator argument types for the function.
4883        op_types: Option<Vec<DataType>>,
4884        /// Function name for the support function.
4885        function_name: ObjectName,
4886        /// Function argument types.
4887        argument_types: Vec<DataType>,
4888    },
4889}
4890
4891/// An item in an ALTER OPERATOR FAMILY DROP statement
4892#[derive(#[automatically_derived]
impl ::core::fmt::Debug for OperatorFamilyDropItem {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            OperatorFamilyDropItem::Operator {
                strategy_number: __self_0, op_types: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "Operator", "strategy_number", __self_0, "op_types",
                    &__self_1),
            OperatorFamilyDropItem::Function {
                support_number: __self_0, op_types: __self_1 } =>
                ::core::fmt::Formatter::debug_struct_field2_finish(f,
                    "Function", "support_number", __self_0, "op_types",
                    &__self_1),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for OperatorFamilyDropItem {
    #[inline]
    fn clone(&self) -> OperatorFamilyDropItem {
        match self {
            OperatorFamilyDropItem::Operator {
                strategy_number: __self_0, op_types: __self_1 } =>
                OperatorFamilyDropItem::Operator {
                    strategy_number: ::core::clone::Clone::clone(__self_0),
                    op_types: ::core::clone::Clone::clone(__self_1),
                },
            OperatorFamilyDropItem::Function {
                support_number: __self_0, op_types: __self_1 } =>
                OperatorFamilyDropItem::Function {
                    support_number: ::core::clone::Clone::clone(__self_0),
                    op_types: ::core::clone::Clone::clone(__self_1),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for OperatorFamilyDropItem {
    #[inline]
    fn eq(&self, other: &OperatorFamilyDropItem) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (OperatorFamilyDropItem::Operator {
                    strategy_number: __self_0, op_types: __self_1 },
                    OperatorFamilyDropItem::Operator {
                    strategy_number: __arg1_0, op_types: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                (OperatorFamilyDropItem::Function {
                    support_number: __self_0, op_types: __self_1 },
                    OperatorFamilyDropItem::Function {
                    support_number: __arg1_0, op_types: __arg1_1 }) =>
                    __self_0 == __arg1_0 && __self_1 == __arg1_1,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for OperatorFamilyDropItem {
    #[inline]
    fn partial_cmp(&self, other: &OperatorFamilyDropItem)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (OperatorFamilyDropItem::Operator {
                strategy_number: __self_0, op_types: __self_1 },
                OperatorFamilyDropItem::Operator {
                strategy_number: __arg1_0, op_types: __arg1_1 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                    cmp => cmp,
                },
            (OperatorFamilyDropItem::Function {
                support_number: __self_0, op_types: __self_1 },
                OperatorFamilyDropItem::Function {
                support_number: __arg1_0, op_types: __arg1_1 }) =>
                match ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0)
                    {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        => ::core::cmp::PartialOrd::partial_cmp(__self_1, __arg1_1),
                    cmp => cmp,
                },
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for OperatorFamilyDropItem {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<u64>;
        let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<DataType>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for OperatorFamilyDropItem {
    #[inline]
    fn cmp(&self, other: &OperatorFamilyDropItem) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (OperatorFamilyDropItem::Operator {
                        strategy_number: __self_0, op_types: __self_1 },
                        OperatorFamilyDropItem::Operator {
                        strategy_number: __arg1_0, op_types: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    (OperatorFamilyDropItem::Function {
                        support_number: __self_0, op_types: __self_1 },
                        OperatorFamilyDropItem::Function {
                        support_number: __arg1_0, op_types: __arg1_1 }) =>
                        match ::core::cmp::Ord::cmp(__self_0, __arg1_0) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(__self_1, __arg1_1),
                            cmp => cmp,
                        },
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for OperatorFamilyDropItem {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            OperatorFamilyDropItem::Operator {
                strategy_number: __self_0, op_types: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
            OperatorFamilyDropItem::Function {
                support_number: __self_0, op_types: __self_1 } => {
                ::core::hash::Hash::hash(__self_0, state);
                ::core::hash::Hash::hash(__self_1, state)
            }
        }
    }
}Hash)]
4893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4894#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for OperatorFamilyDropItem {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Operator { strategy_number, op_types } => {
                                sqlparser::ast::Visit::visit(strategy_number, visitor)?;
                                sqlparser::ast::Visit::visit(op_types, visitor)?;
                            }
                            Self::Function { support_number, op_types } => {
                                sqlparser::ast::Visit::visit(support_number, visitor)?;
                                sqlparser::ast::Visit::visit(op_types, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for OperatorFamilyDropItem {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Operator { strategy_number, op_types } => {
                                sqlparser::ast::VisitMut::visit(strategy_number, visitor)?;
                                sqlparser::ast::VisitMut::visit(op_types, visitor)?;
                            }
                            Self::Function { support_number, op_types } => {
                                sqlparser::ast::VisitMut::visit(support_number, visitor)?;
                                sqlparser::ast::VisitMut::visit(op_types, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4895pub enum OperatorFamilyDropItem {
4896    /// `OPERATOR` clause for DROP within an operator family.
4897    Operator {
4898        /// Strategy number for the operator.
4899        strategy_number: u64,
4900        /// Operator argument types.
4901        op_types: Vec<DataType>,
4902    },
4903    /// `FUNCTION` clause for DROP within an operator family.
4904    Function {
4905        /// Support function number.
4906        support_number: u64,
4907        /// Operator argument types for the function.
4908        op_types: Vec<DataType>,
4909    },
4910}
4911
4912impl fmt::Display for OperatorFamilyItem {
4913    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4914        match self {
4915            OperatorFamilyItem::Operator {
4916                strategy_number,
4917                operator_name,
4918                op_types,
4919                purpose,
4920            } => {
4921                f.write_fmt(format_args!("OPERATOR {1} {2} ({0})",
        display_comma_separated(op_types), strategy_number, operator_name))write!(
4922                    f,
4923                    "OPERATOR {strategy_number} {operator_name} ({})",
4924                    display_comma_separated(op_types)
4925                )?;
4926                if let Some(purpose) = purpose {
4927                    f.write_fmt(format_args!(" {0}", purpose))write!(f, " {purpose}")?;
4928                }
4929                Ok(())
4930            }
4931            OperatorFamilyItem::Function {
4932                support_number,
4933                op_types,
4934                function_name,
4935                argument_types,
4936            } => {
4937                f.write_fmt(format_args!("FUNCTION {0}", support_number))write!(f, "FUNCTION {support_number}")?;
4938                if let Some(types) = op_types {
4939                    f.write_fmt(format_args!(" ({0})", display_comma_separated(types)))write!(f, " ({})", display_comma_separated(types))?;
4940                }
4941                f.write_fmt(format_args!(" {0}", function_name))write!(f, " {function_name}")?;
4942                if !argument_types.is_empty() {
4943                    f.write_fmt(format_args!("({0})", display_comma_separated(argument_types)))write!(f, "({})", display_comma_separated(argument_types))?;
4944                }
4945                Ok(())
4946            }
4947        }
4948    }
4949}
4950
4951impl fmt::Display for OperatorFamilyDropItem {
4952    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4953        match self {
4954            OperatorFamilyDropItem::Operator {
4955                strategy_number,
4956                op_types,
4957            } => {
4958                f.write_fmt(format_args!("OPERATOR {1} ({0})",
        display_comma_separated(op_types), strategy_number))write!(
4959                    f,
4960                    "OPERATOR {strategy_number} ({})",
4961                    display_comma_separated(op_types)
4962                )
4963            }
4964            OperatorFamilyDropItem::Function {
4965                support_number,
4966                op_types,
4967            } => {
4968                f.write_fmt(format_args!("FUNCTION {1} ({0})",
        display_comma_separated(op_types), support_number))write!(
4969                    f,
4970                    "FUNCTION {support_number} ({})",
4971                    display_comma_separated(op_types)
4972                )
4973            }
4974        }
4975    }
4976}
4977
4978/// `ALTER OPERATOR FAMILY` statement
4979/// See <https://www.postgresql.org/docs/current/sql-alteropfamily.html>
4980#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterOperatorFamily {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "AlterOperatorFamily", "name", &self.name, "using", &self.using,
            "operation", &&self.operation)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterOperatorFamily {
    #[inline]
    fn clone(&self) -> AlterOperatorFamily {
        AlterOperatorFamily {
            name: ::core::clone::Clone::clone(&self.name),
            using: ::core::clone::Clone::clone(&self.using),
            operation: ::core::clone::Clone::clone(&self.operation),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterOperatorFamily {
    #[inline]
    fn eq(&self, other: &AlterOperatorFamily) -> bool {
        self.name == other.name && self.using == other.using &&
            self.operation == other.operation
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterOperatorFamily {
    #[inline]
    fn partial_cmp(&self, other: &AlterOperatorFamily)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                        &other.using) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.operation,
                            &other.operation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterOperatorFamily {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<AlterOperatorFamilyOperation>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterOperatorFamily {
    #[inline]
    fn cmp(&self, other: &AlterOperatorFamily) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.operation, &other.operation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterOperatorFamily {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.operation, state)
    }
}Hash)]
4981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4982#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterOperatorFamily {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operation, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterOperatorFamily {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operation,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4983pub struct AlterOperatorFamily {
4984    /// Operator family name (can be schema-qualified)
4985    pub name: ObjectName,
4986    /// Index method (btree, hash, gist, gin, etc.)
4987    pub using: Ident,
4988    /// The operation to perform
4989    pub operation: AlterOperatorFamilyOperation,
4990}
4991
4992/// An [AlterOperatorFamily] operation
4993#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterOperatorFamilyOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterOperatorFamilyOperation::Add { items: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Add",
                    "items", &__self_0),
            AlterOperatorFamilyOperation::Drop { items: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f, "Drop",
                    "items", &__self_0),
            AlterOperatorFamilyOperation::RenameTo { new_name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "RenameTo", "new_name", &__self_0),
            AlterOperatorFamilyOperation::OwnerTo(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "OwnerTo", &__self_0),
            AlterOperatorFamilyOperation::SetSchema { schema_name: __self_0 }
                =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetSchema", "schema_name", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterOperatorFamilyOperation {
    #[inline]
    fn clone(&self) -> AlterOperatorFamilyOperation {
        match self {
            AlterOperatorFamilyOperation::Add { items: __self_0 } =>
                AlterOperatorFamilyOperation::Add {
                    items: ::core::clone::Clone::clone(__self_0),
                },
            AlterOperatorFamilyOperation::Drop { items: __self_0 } =>
                AlterOperatorFamilyOperation::Drop {
                    items: ::core::clone::Clone::clone(__self_0),
                },
            AlterOperatorFamilyOperation::RenameTo { new_name: __self_0 } =>
                AlterOperatorFamilyOperation::RenameTo {
                    new_name: ::core::clone::Clone::clone(__self_0),
                },
            AlterOperatorFamilyOperation::OwnerTo(__self_0) =>
                AlterOperatorFamilyOperation::OwnerTo(::core::clone::Clone::clone(__self_0)),
            AlterOperatorFamilyOperation::SetSchema { schema_name: __self_0 }
                =>
                AlterOperatorFamilyOperation::SetSchema {
                    schema_name: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterOperatorFamilyOperation {
    #[inline]
    fn eq(&self, other: &AlterOperatorFamilyOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterOperatorFamilyOperation::Add { items: __self_0 },
                    AlterOperatorFamilyOperation::Add { items: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterOperatorFamilyOperation::Drop { items: __self_0 },
                    AlterOperatorFamilyOperation::Drop { items: __arg1_0 }) =>
                    __self_0 == __arg1_0,
                (AlterOperatorFamilyOperation::RenameTo { new_name: __self_0
                    }, AlterOperatorFamilyOperation::RenameTo {
                    new_name: __arg1_0 }) => __self_0 == __arg1_0,
                (AlterOperatorFamilyOperation::OwnerTo(__self_0),
                    AlterOperatorFamilyOperation::OwnerTo(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (AlterOperatorFamilyOperation::SetSchema {
                    schema_name: __self_0 },
                    AlterOperatorFamilyOperation::SetSchema {
                    schema_name: __arg1_0 }) => __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterOperatorFamilyOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterOperatorFamilyOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterOperatorFamilyOperation::Add { items: __self_0 },
                AlterOperatorFamilyOperation::Add { items: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorFamilyOperation::Drop { items: __self_0 },
                AlterOperatorFamilyOperation::Drop { items: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorFamilyOperation::RenameTo { new_name: __self_0 },
                AlterOperatorFamilyOperation::RenameTo { new_name: __arg1_0 })
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorFamilyOperation::OwnerTo(__self_0),
                AlterOperatorFamilyOperation::OwnerTo(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorFamilyOperation::SetSchema { schema_name: __self_0
                }, AlterOperatorFamilyOperation::SetSchema {
                schema_name: __arg1_0 }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterOperatorFamilyOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Vec<OperatorFamilyItem>>;
        let _: ::core::cmp::AssertParamIsEq<Vec<OperatorFamilyDropItem>>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Owner>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterOperatorFamilyOperation {
    #[inline]
    fn cmp(&self, other: &AlterOperatorFamilyOperation)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterOperatorFamilyOperation::Add { items: __self_0 },
                        AlterOperatorFamilyOperation::Add { items: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorFamilyOperation::Drop { items: __self_0 },
                        AlterOperatorFamilyOperation::Drop { items: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorFamilyOperation::RenameTo { new_name: __self_0
                        }, AlterOperatorFamilyOperation::RenameTo {
                        new_name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorFamilyOperation::OwnerTo(__self_0),
                        AlterOperatorFamilyOperation::OwnerTo(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorFamilyOperation::SetSchema {
                        schema_name: __self_0 },
                        AlterOperatorFamilyOperation::SetSchema {
                        schema_name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterOperatorFamilyOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterOperatorFamilyOperation::Add { items: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorFamilyOperation::Drop { items: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorFamilyOperation::RenameTo { new_name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorFamilyOperation::OwnerTo(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorFamilyOperation::SetSchema { schema_name: __self_0 }
                => ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
4994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4995#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterOperatorFamilyOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Add { items } => {
                                sqlparser::ast::Visit::visit(items, visitor)?;
                            }
                            Self::Drop { items } => {
                                sqlparser::ast::Visit::visit(items, visitor)?;
                            }
                            Self::RenameTo { new_name } => {
                                sqlparser::ast::Visit::visit(new_name, visitor)?;
                            }
                            Self::OwnerTo(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::SetSchema { schema_name } => {
                                sqlparser::ast::Visit::visit(schema_name, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterOperatorFamilyOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Add { items } => {
                                sqlparser::ast::VisitMut::visit(items, visitor)?;
                            }
                            Self::Drop { items } => {
                                sqlparser::ast::VisitMut::visit(items, visitor)?;
                            }
                            Self::RenameTo { new_name } => {
                                sqlparser::ast::VisitMut::visit(new_name, visitor)?;
                            }
                            Self::OwnerTo(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::SetSchema { schema_name } => {
                                sqlparser::ast::VisitMut::visit(schema_name, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
4996pub enum AlterOperatorFamilyOperation {
4997    /// `ADD { OPERATOR ... | FUNCTION ... } [, ...]`
4998    Add {
4999        /// List of operator family items to add
5000        items: Vec<OperatorFamilyItem>,
5001    },
5002    /// `DROP { OPERATOR ... | FUNCTION ... } [, ...]`
5003    Drop {
5004        /// List of operator family items to drop
5005        items: Vec<OperatorFamilyDropItem>,
5006    },
5007    /// `RENAME TO new_name`
5008    RenameTo {
5009        /// The new name for the operator family.
5010        new_name: ObjectName,
5011    },
5012    /// `OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }`
5013    OwnerTo(Owner),
5014    /// `SET SCHEMA new_schema`
5015    SetSchema {
5016        /// The target schema name.
5017        schema_name: ObjectName,
5018    },
5019}
5020
5021impl fmt::Display for AlterOperatorFamily {
5022    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5023        f.write_fmt(format_args!("ALTER OPERATOR FAMILY {0} USING {1}", self.name,
        self.using))write!(
5024            f,
5025            "ALTER OPERATOR FAMILY {} USING {}",
5026            self.name, self.using
5027        )?;
5028        f.write_fmt(format_args!(" {0}", self.operation))write!(f, " {}", self.operation)
5029    }
5030}
5031
5032impl fmt::Display for AlterOperatorFamilyOperation {
5033    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5034        match self {
5035            AlterOperatorFamilyOperation::Add { items } => {
5036                f.write_fmt(format_args!("ADD {0}", display_comma_separated(items)))write!(f, "ADD {}", display_comma_separated(items))
5037            }
5038            AlterOperatorFamilyOperation::Drop { items } => {
5039                f.write_fmt(format_args!("DROP {0}", display_comma_separated(items)))write!(f, "DROP {}", display_comma_separated(items))
5040            }
5041            AlterOperatorFamilyOperation::RenameTo { new_name } => {
5042                f.write_fmt(format_args!("RENAME TO {0}", new_name))write!(f, "RENAME TO {new_name}")
5043            }
5044            AlterOperatorFamilyOperation::OwnerTo(owner) => {
5045                f.write_fmt(format_args!("OWNER TO {0}", owner))write!(f, "OWNER TO {owner}")
5046            }
5047            AlterOperatorFamilyOperation::SetSchema { schema_name } => {
5048                f.write_fmt(format_args!("SET SCHEMA {0}", schema_name))write!(f, "SET SCHEMA {schema_name}")
5049            }
5050        }
5051    }
5052}
5053
5054impl Spanned for AlterOperatorFamily {
5055    fn span(&self) -> Span {
5056        Span::empty()
5057    }
5058}
5059
5060/// `ALTER OPERATOR CLASS` statement
5061/// See <https://www.postgresql.org/docs/current/sql-alteropclass.html>
5062#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterOperatorClass {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f,
            "AlterOperatorClass", "name", &self.name, "using", &self.using,
            "operation", &&self.operation)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterOperatorClass {
    #[inline]
    fn clone(&self) -> AlterOperatorClass {
        AlterOperatorClass {
            name: ::core::clone::Clone::clone(&self.name),
            using: ::core::clone::Clone::clone(&self.using),
            operation: ::core::clone::Clone::clone(&self.operation),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterOperatorClass {
    #[inline]
    fn eq(&self, other: &AlterOperatorClass) -> bool {
        self.name == other.name && self.using == other.using &&
            self.operation == other.operation
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterOperatorClass {
    #[inline]
    fn partial_cmp(&self, other: &AlterOperatorClass)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                        &other.using) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.operation,
                            &other.operation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterOperatorClass {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<AlterOperatorClassOperation>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterOperatorClass {
    #[inline]
    fn cmp(&self, other: &AlterOperatorClass) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.operation, &other.operation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterOperatorClass {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.operation, state)
    }
}Hash)]
5063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5064#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterOperatorClass {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.operation, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterOperatorClass {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operation,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
5065pub struct AlterOperatorClass {
5066    /// Operator class name (can be schema-qualified)
5067    pub name: ObjectName,
5068    /// Index method (btree, hash, gist, gin, etc.)
5069    pub using: Ident,
5070    /// The operation to perform
5071    pub operation: AlterOperatorClassOperation,
5072}
5073
5074/// An [AlterOperatorClass] operation
5075#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterOperatorClassOperation {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        match self {
            AlterOperatorClassOperation::RenameTo { new_name: __self_0 } =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "RenameTo", "new_name", &__self_0),
            AlterOperatorClassOperation::OwnerTo(__self_0) =>
                ::core::fmt::Formatter::debug_tuple_field1_finish(f,
                    "OwnerTo", &__self_0),
            AlterOperatorClassOperation::SetSchema { schema_name: __self_0 }
                =>
                ::core::fmt::Formatter::debug_struct_field1_finish(f,
                    "SetSchema", "schema_name", &__self_0),
        }
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterOperatorClassOperation {
    #[inline]
    fn clone(&self) -> AlterOperatorClassOperation {
        match self {
            AlterOperatorClassOperation::RenameTo { new_name: __self_0 } =>
                AlterOperatorClassOperation::RenameTo {
                    new_name: ::core::clone::Clone::clone(__self_0),
                },
            AlterOperatorClassOperation::OwnerTo(__self_0) =>
                AlterOperatorClassOperation::OwnerTo(::core::clone::Clone::clone(__self_0)),
            AlterOperatorClassOperation::SetSchema { schema_name: __self_0 }
                =>
                AlterOperatorClassOperation::SetSchema {
                    schema_name: ::core::clone::Clone::clone(__self_0),
                },
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterOperatorClassOperation {
    #[inline]
    fn eq(&self, other: &AlterOperatorClassOperation) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr &&
            match (self, other) {
                (AlterOperatorClassOperation::RenameTo { new_name: __self_0 },
                    AlterOperatorClassOperation::RenameTo { new_name: __arg1_0
                    }) => __self_0 == __arg1_0,
                (AlterOperatorClassOperation::OwnerTo(__self_0),
                    AlterOperatorClassOperation::OwnerTo(__arg1_0)) =>
                    __self_0 == __arg1_0,
                (AlterOperatorClassOperation::SetSchema {
                    schema_name: __self_0 },
                    AlterOperatorClassOperation::SetSchema {
                    schema_name: __arg1_0 }) => __self_0 == __arg1_0,
                _ => unsafe { ::core::intrinsics::unreachable() }
            }
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterOperatorClassOperation {
    #[inline]
    fn partial_cmp(&self, other: &AlterOperatorClassOperation)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match (self, other) {
            (AlterOperatorClassOperation::RenameTo { new_name: __self_0 },
                AlterOperatorClassOperation::RenameTo { new_name: __arg1_0 })
                => ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorClassOperation::OwnerTo(__self_0),
                AlterOperatorClassOperation::OwnerTo(__arg1_0)) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            (AlterOperatorClassOperation::SetSchema { schema_name: __self_0 },
                AlterOperatorClassOperation::SetSchema { schema_name: __arg1_0
                }) =>
                ::core::cmp::PartialOrd::partial_cmp(__self_0, __arg1_0),
            _ =>
                ::core::cmp::PartialOrd::partial_cmp(&__self_discr,
                    &__arg1_discr),
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterOperatorClassOperation {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Owner>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterOperatorClassOperation {
    #[inline]
    fn cmp(&self, other: &AlterOperatorClassOperation)
        -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        match ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr) {
            ::core::cmp::Ordering::Equal =>
                match (self, other) {
                    (AlterOperatorClassOperation::RenameTo { new_name: __self_0
                        }, AlterOperatorClassOperation::RenameTo {
                        new_name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorClassOperation::OwnerTo(__self_0),
                        AlterOperatorClassOperation::OwnerTo(__arg1_0)) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    (AlterOperatorClassOperation::SetSchema {
                        schema_name: __self_0 },
                        AlterOperatorClassOperation::SetSchema {
                        schema_name: __arg1_0 }) =>
                        ::core::cmp::Ord::cmp(__self_0, __arg1_0),
                    _ => unsafe { ::core::intrinsics::unreachable() }
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterOperatorClassOperation {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state);
        match self {
            AlterOperatorClassOperation::RenameTo { new_name: __self_0 } =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorClassOperation::OwnerTo(__self_0) =>
                ::core::hash::Hash::hash(__self_0, state),
            AlterOperatorClassOperation::SetSchema { schema_name: __self_0 }
                => ::core::hash::Hash::hash(__self_0, state),
        }
    }
}Hash)]
5076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5077#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterOperatorClassOperation {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::RenameTo { new_name } => {
                                sqlparser::ast::Visit::visit(new_name, visitor)?;
                            }
                            Self::OwnerTo(_0) => {
                                sqlparser::ast::Visit::visit(_0, visitor)?;
                            }
                            Self::SetSchema { schema_name } => {
                                sqlparser::ast::Visit::visit(schema_name, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterOperatorClassOperation {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::RenameTo { new_name } => {
                                sqlparser::ast::VisitMut::visit(new_name, visitor)?;
                            }
                            Self::OwnerTo(_0) => {
                                sqlparser::ast::VisitMut::visit(_0, visitor)?;
                            }
                            Self::SetSchema { schema_name } => {
                                sqlparser::ast::VisitMut::visit(schema_name, visitor)?;
                            }
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
5078pub enum AlterOperatorClassOperation {
5079    /// `RENAME TO new_name`
5080    /// Rename the operator class to a new name.
5081    RenameTo {
5082        /// The new name for the operator class.
5083        new_name: ObjectName,
5084    },
5085    /// `OWNER TO { new_owner | CURRENT_ROLE | CURRENT_USER | SESSION_USER }`
5086    OwnerTo(Owner),
5087    /// `SET SCHEMA new_schema`
5088    /// Set the schema for the operator class.
5089    SetSchema {
5090        /// The target schema name.
5091        schema_name: ObjectName,
5092    },
5093}
5094
5095impl fmt::Display for AlterOperatorClass {
5096    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5097        f.write_fmt(format_args!("ALTER OPERATOR CLASS {0} USING {1}", self.name,
        self.using))write!(f, "ALTER OPERATOR CLASS {} USING {}", self.name, self.using)?;
5098        f.write_fmt(format_args!(" {0}", self.operation))write!(f, " {}", self.operation)
5099    }
5100}
5101
5102impl fmt::Display for AlterOperatorClassOperation {
5103    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5104        match self {
5105            AlterOperatorClassOperation::RenameTo { new_name } => {
5106                f.write_fmt(format_args!("RENAME TO {0}", new_name))write!(f, "RENAME TO {new_name}")
5107            }
5108            AlterOperatorClassOperation::OwnerTo(owner) => {
5109                f.write_fmt(format_args!("OWNER TO {0}", owner))write!(f, "OWNER TO {owner}")
5110            }
5111            AlterOperatorClassOperation::SetSchema { schema_name } => {
5112                f.write_fmt(format_args!("SET SCHEMA {0}", schema_name))write!(f, "SET SCHEMA {schema_name}")
5113            }
5114        }
5115    }
5116}
5117
5118impl Spanned for AlterOperatorClass {
5119    fn span(&self) -> Span {
5120        Span::empty()
5121    }
5122}
5123
5124/// CREATE POLICY statement.
5125///
5126/// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-createpolicy.html)
5127#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreatePolicy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        let names: &'static _ =
            &["name", "table_name", "policy_type", "command", "to", "using",
                        "with_check"];
        let values: &[&dyn ::core::fmt::Debug] =
            &[&self.name, &self.table_name, &self.policy_type, &self.command,
                        &self.to, &self.using, &&self.with_check];
        ::core::fmt::Formatter::debug_struct_fields_finish(f, "CreatePolicy",
            names, values)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreatePolicy {
    #[inline]
    fn clone(&self) -> CreatePolicy {
        CreatePolicy {
            name: ::core::clone::Clone::clone(&self.name),
            table_name: ::core::clone::Clone::clone(&self.table_name),
            policy_type: ::core::clone::Clone::clone(&self.policy_type),
            command: ::core::clone::Clone::clone(&self.command),
            to: ::core::clone::Clone::clone(&self.to),
            using: ::core::clone::Clone::clone(&self.using),
            with_check: ::core::clone::Clone::clone(&self.with_check),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for CreatePolicy {
    #[inline]
    fn eq(&self, other: &CreatePolicy) -> bool {
        self.name == other.name && self.table_name == other.table_name &&
                            self.policy_type == other.policy_type &&
                        self.command == other.command && self.to == other.to &&
                self.using == other.using &&
            self.with_check == other.with_check
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreatePolicy {
    #[inline]
    fn partial_cmp(&self, other: &CreatePolicy)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
                        &other.table_name) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.policy_type,
                                &other.policy_type) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                match ::core::cmp::PartialOrd::partial_cmp(&self.command,
                                        &other.command) {
                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                        =>
                                        match ::core::cmp::PartialOrd::partial_cmp(&self.to,
                                                &other.to) {
                                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                =>
                                                match ::core::cmp::PartialOrd::partial_cmp(&self.using,
                                                        &other.using) {
                                                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                                        =>
                                                        ::core::cmp::PartialOrd::partial_cmp(&self.with_check,
                                                            &other.with_check),
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreatePolicy {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<CreatePolicyType>>;
        let _: ::core::cmp::AssertParamIsEq<Option<CreatePolicyCommand>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Vec<Owner>>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
        let _: ::core::cmp::AssertParamIsEq<Option<Expr>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreatePolicy {
    #[inline]
    fn cmp(&self, other: &CreatePolicy) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.table_name,
                        &other.table_name) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.policy_type,
                                &other.policy_type) {
                            ::core::cmp::Ordering::Equal =>
                                match ::core::cmp::Ord::cmp(&self.command, &other.command) {
                                    ::core::cmp::Ordering::Equal =>
                                        match ::core::cmp::Ord::cmp(&self.to, &other.to) {
                                            ::core::cmp::Ordering::Equal =>
                                                match ::core::cmp::Ord::cmp(&self.using, &other.using) {
                                                    ::core::cmp::Ordering::Equal =>
                                                        ::core::cmp::Ord::cmp(&self.with_check, &other.with_check),
                                                    cmp => cmp,
                                                },
                                            cmp => cmp,
                                        },
                                    cmp => cmp,
                                },
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreatePolicy {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.table_name, state);
        ::core::hash::Hash::hash(&self.policy_type, state);
        ::core::hash::Hash::hash(&self.command, state);
        ::core::hash::Hash::hash(&self.to, state);
        ::core::hash::Hash::hash(&self.using, state);
        ::core::hash::Hash::hash(&self.with_check, state)
    }
}Hash)]
5128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5129#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreatePolicy {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        visitor.pre_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
                        visitor.post_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.policy_type, visitor)?;
                        sqlparser::ast::Visit::visit(&self.command, visitor)?;
                        sqlparser::ast::Visit::visit(&self.to, visitor)?;
                        sqlparser::ast::Visit::visit(&self.using, visitor)?;
                        sqlparser::ast::Visit::visit(&self.with_check, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreatePolicy {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        visitor.pre_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_name,
                                visitor)?;
                        visitor.post_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.policy_type,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.command,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.to, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.using, visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.with_check,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
5130pub struct CreatePolicy {
5131    /// Name of the policy.
5132    pub name: Ident,
5133    /// Table the policy is defined on.
5134    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
5135    pub table_name: ObjectName,
5136    /// Optional policy type (e.g., `PERMISSIVE` / `RESTRICTIVE`).
5137    pub policy_type: Option<CreatePolicyType>,
5138    /// Optional command the policy applies to (e.g., `SELECT`).
5139    pub command: Option<CreatePolicyCommand>,
5140    /// Optional list of grantee owners.
5141    pub to: Option<Vec<Owner>>,
5142    /// Optional expression for the `USING` clause.
5143    pub using: Option<Expr>,
5144    /// Optional expression for the `WITH CHECK` clause.
5145    pub with_check: Option<Expr>,
5146}
5147
5148impl fmt::Display for CreatePolicy {
5149    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5150        f.write_fmt(format_args!("CREATE POLICY {0} ON {1}", self.name,
        self.table_name))write!(
5151            f,
5152            "CREATE POLICY {name} ON {table_name}",
5153            name = self.name,
5154            table_name = self.table_name,
5155        )?;
5156        if let Some(ref policy_type) = self.policy_type {
5157            f.write_fmt(format_args!(" AS {0}", policy_type))write!(f, " AS {policy_type}")?;
5158        }
5159        if let Some(ref command) = self.command {
5160            f.write_fmt(format_args!(" FOR {0}", command))write!(f, " FOR {command}")?;
5161        }
5162        if let Some(ref to) = self.to {
5163            f.write_fmt(format_args!(" TO {0}", display_comma_separated(to)))write!(f, " TO {}", display_comma_separated(to))?;
5164        }
5165        if let Some(ref using) = self.using {
5166            f.write_fmt(format_args!(" USING ({0})", using))write!(f, " USING ({using})")?;
5167        }
5168        if let Some(ref with_check) = self.with_check {
5169            f.write_fmt(format_args!(" WITH CHECK ({0})", with_check))write!(f, " WITH CHECK ({with_check})")?;
5170        }
5171        Ok(())
5172    }
5173}
5174
5175/// Policy type for a `CREATE POLICY` statement.
5176/// ```sql
5177/// AS [ PERMISSIVE | RESTRICTIVE ]
5178/// ```
5179/// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createpolicy.html)
5180#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreatePolicyType {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                CreatePolicyType::Permissive => "Permissive",
                CreatePolicyType::Restrictive => "Restrictive",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreatePolicyType {
    #[inline]
    fn clone(&self) -> CreatePolicyType { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for CreatePolicyType { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for CreatePolicyType {
    #[inline]
    fn eq(&self, other: &CreatePolicyType) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreatePolicyType {
    #[inline]
    fn partial_cmp(&self, other: &CreatePolicyType)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreatePolicyType {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreatePolicyType {
    #[inline]
    fn cmp(&self, other: &CreatePolicyType) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreatePolicyType {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
5181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5182#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreatePolicyType {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Permissive => {}
                            Self::Restrictive => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreatePolicyType {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::Permissive => {}
                            Self::Restrictive => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
5183pub enum CreatePolicyType {
5184    /// Policy allows operations unless explicitly denied.
5185    Permissive,
5186    /// Policy denies operations unless explicitly allowed.
5187    Restrictive,
5188}
5189
5190impl fmt::Display for CreatePolicyType {
5191    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5192        match self {
5193            CreatePolicyType::Permissive => f.write_fmt(format_args!("PERMISSIVE"))write!(f, "PERMISSIVE"),
5194            CreatePolicyType::Restrictive => f.write_fmt(format_args!("RESTRICTIVE"))write!(f, "RESTRICTIVE"),
5195        }
5196    }
5197}
5198
5199/// Command that a policy can apply to (FOR clause).
5200/// ```sql
5201/// FOR [ALL | SELECT | INSERT | UPDATE | DELETE]
5202/// ```
5203/// [PostgreSQL](https://www.postgresql.org/docs/current/sql-createpolicy.html)
5204#[derive(#[automatically_derived]
impl ::core::fmt::Debug for CreatePolicyCommand {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::write_str(f,
            match self {
                CreatePolicyCommand::All => "All",
                CreatePolicyCommand::Select => "Select",
                CreatePolicyCommand::Insert => "Insert",
                CreatePolicyCommand::Update => "Update",
                CreatePolicyCommand::Delete => "Delete",
            })
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for CreatePolicyCommand {
    #[inline]
    fn clone(&self) -> CreatePolicyCommand { *self }
}Clone, #[automatically_derived]
impl ::core::marker::Copy for CreatePolicyCommand { }Copy, #[automatically_derived]
impl ::core::cmp::PartialEq for CreatePolicyCommand {
    #[inline]
    fn eq(&self, other: &CreatePolicyCommand) -> bool {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        __self_discr == __arg1_discr
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for CreatePolicyCommand {
    #[inline]
    fn partial_cmp(&self, other: &CreatePolicyCommand)
        -> ::core::option::Option<::core::cmp::Ordering> {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::PartialOrd::partial_cmp(&__self_discr, &__arg1_discr)
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for CreatePolicyCommand {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {}
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for CreatePolicyCommand {
    #[inline]
    fn cmp(&self, other: &CreatePolicyCommand) -> ::core::cmp::Ordering {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        let __arg1_discr = ::core::intrinsics::discriminant_value(other);
        ::core::cmp::Ord::cmp(&__self_discr, &__arg1_discr)
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for CreatePolicyCommand {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        let __self_discr = ::core::intrinsics::discriminant_value(self);
        ::core::hash::Hash::hash(&__self_discr, state)
    }
}Hash)]
5205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5206#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for CreatePolicyCommand {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::All => {}
                            Self::Select => {}
                            Self::Insert => {}
                            Self::Update => {}
                            Self::Delete => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for CreatePolicyCommand {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        match self {
                            Self::All => {}
                            Self::Select => {}
                            Self::Insert => {}
                            Self::Update => {}
                            Self::Delete => {}
                        }
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
5207pub enum CreatePolicyCommand {
5208    /// Applies to all commands.
5209    All,
5210    /// Applies to SELECT.
5211    Select,
5212    /// Applies to INSERT.
5213    Insert,
5214    /// Applies to UPDATE.
5215    Update,
5216    /// Applies to DELETE.
5217    Delete,
5218}
5219
5220impl fmt::Display for CreatePolicyCommand {
5221    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5222        match self {
5223            CreatePolicyCommand::All => f.write_fmt(format_args!("ALL"))write!(f, "ALL"),
5224            CreatePolicyCommand::Select => f.write_fmt(format_args!("SELECT"))write!(f, "SELECT"),
5225            CreatePolicyCommand::Insert => f.write_fmt(format_args!("INSERT"))write!(f, "INSERT"),
5226            CreatePolicyCommand::Update => f.write_fmt(format_args!("UPDATE"))write!(f, "UPDATE"),
5227            CreatePolicyCommand::Delete => f.write_fmt(format_args!("DELETE"))write!(f, "DELETE"),
5228        }
5229    }
5230}
5231
5232/// DROP POLICY statement.
5233///
5234/// See [PostgreSQL](https://www.postgresql.org/docs/current/sql-droppolicy.html)
5235#[derive(#[automatically_derived]
impl ::core::fmt::Debug for DropPolicy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field4_finish(f, "DropPolicy",
            "if_exists", &self.if_exists, "name", &self.name, "table_name",
            &self.table_name, "drop_behavior", &&self.drop_behavior)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for DropPolicy {
    #[inline]
    fn clone(&self) -> DropPolicy {
        DropPolicy {
            if_exists: ::core::clone::Clone::clone(&self.if_exists),
            name: ::core::clone::Clone::clone(&self.name),
            table_name: ::core::clone::Clone::clone(&self.table_name),
            drop_behavior: ::core::clone::Clone::clone(&self.drop_behavior),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for DropPolicy {
    #[inline]
    fn eq(&self, other: &DropPolicy) -> bool {
        self.if_exists == other.if_exists && self.name == other.name &&
                self.table_name == other.table_name &&
            self.drop_behavior == other.drop_behavior
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for DropPolicy {
    #[inline]
    fn partial_cmp(&self, other: &DropPolicy)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.if_exists,
                &other.if_exists) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.name,
                        &other.name) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
                                &other.table_name) {
                            ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                                =>
                                ::core::cmp::PartialOrd::partial_cmp(&self.drop_behavior,
                                    &other.drop_behavior),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for DropPolicy {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<bool>;
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<Option<DropBehavior>>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for DropPolicy {
    #[inline]
    fn cmp(&self, other: &DropPolicy) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.if_exists, &other.if_exists) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.name, &other.name) {
                    ::core::cmp::Ordering::Equal =>
                        match ::core::cmp::Ord::cmp(&self.table_name,
                                &other.table_name) {
                            ::core::cmp::Ordering::Equal =>
                                ::core::cmp::Ord::cmp(&self.drop_behavior,
                                    &other.drop_behavior),
                            cmp => cmp,
                        },
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for DropPolicy {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.if_exists, state);
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.table_name, state);
        ::core::hash::Hash::hash(&self.drop_behavior, state)
    }
}Hash)]
5236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5237#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for DropPolicy {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.if_exists, visitor)?;
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        visitor.pre_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
                        visitor.post_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.drop_behavior, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for DropPolicy {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.if_exists,
                                visitor)?;
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        visitor.pre_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_name,
                                visitor)?;
                        visitor.post_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.drop_behavior,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
5238pub struct DropPolicy {
5239    /// `true` when `IF EXISTS` was present.
5240    pub if_exists: bool,
5241    /// Name of the policy to drop.
5242    pub name: Ident,
5243    /// Name of the table the policy applies to.
5244    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
5245    pub table_name: ObjectName,
5246    /// Optional drop behavior (`CASCADE` or `RESTRICT`).
5247    pub drop_behavior: Option<DropBehavior>,
5248}
5249
5250impl fmt::Display for DropPolicy {
5251    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5252        f.write_fmt(format_args!("DROP POLICY {0}{1} ON {2}",
        if self.if_exists { "IF EXISTS " } else { "" }, self.name,
        self.table_name))write!(
5253            f,
5254            "DROP POLICY {if_exists}{name} ON {table_name}",
5255            if_exists = if self.if_exists { "IF EXISTS " } else { "" },
5256            name = self.name,
5257            table_name = self.table_name
5258        )?;
5259        if let Some(ref behavior) = self.drop_behavior {
5260            f.write_fmt(format_args!(" {0}", behavior))write!(f, " {behavior}")?;
5261        }
5262        Ok(())
5263    }
5264}
5265
5266impl From<CreatePolicy> for crate::ast::Statement {
5267    fn from(v: CreatePolicy) -> Self {
5268        crate::ast::Statement::CreatePolicy(v)
5269    }
5270}
5271
5272impl From<DropPolicy> for crate::ast::Statement {
5273    fn from(v: DropPolicy) -> Self {
5274        crate::ast::Statement::DropPolicy(v)
5275    }
5276}
5277
5278/// ALTER POLICY statement.
5279///
5280/// ```sql
5281/// ALTER POLICY <NAME> ON <TABLE NAME> [<OPERATION>]
5282/// ```
5283/// (Postgresql-specific)
5284#[derive(#[automatically_derived]
impl ::core::fmt::Debug for AlterPolicy {
    #[inline]
    fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
        ::core::fmt::Formatter::debug_struct_field3_finish(f, "AlterPolicy",
            "name", &self.name, "table_name", &self.table_name, "operation",
            &&self.operation)
    }
}Debug, #[automatically_derived]
impl ::core::clone::Clone for AlterPolicy {
    #[inline]
    fn clone(&self) -> AlterPolicy {
        AlterPolicy {
            name: ::core::clone::Clone::clone(&self.name),
            table_name: ::core::clone::Clone::clone(&self.table_name),
            operation: ::core::clone::Clone::clone(&self.operation),
        }
    }
}Clone, #[automatically_derived]
impl ::core::cmp::PartialEq for AlterPolicy {
    #[inline]
    fn eq(&self, other: &AlterPolicy) -> bool {
        self.name == other.name && self.table_name == other.table_name &&
            self.operation == other.operation
    }
}PartialEq, #[automatically_derived]
impl ::core::cmp::PartialOrd for AlterPolicy {
    #[inline]
    fn partial_cmp(&self, other: &AlterPolicy)
        -> ::core::option::Option<::core::cmp::Ordering> {
        match ::core::cmp::PartialOrd::partial_cmp(&self.name, &other.name) {
            ::core::option::Option::Some(::core::cmp::Ordering::Equal) =>
                match ::core::cmp::PartialOrd::partial_cmp(&self.table_name,
                        &other.table_name) {
                    ::core::option::Option::Some(::core::cmp::Ordering::Equal)
                        =>
                        ::core::cmp::PartialOrd::partial_cmp(&self.operation,
                            &other.operation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}PartialOrd, #[automatically_derived]
impl ::core::cmp::Eq for AlterPolicy {
    #[inline]
    #[doc(hidden)]
    #[coverage(off)]
    fn assert_fields_are_eq(&self) {
        let _: ::core::cmp::AssertParamIsEq<Ident>;
        let _: ::core::cmp::AssertParamIsEq<ObjectName>;
        let _: ::core::cmp::AssertParamIsEq<AlterPolicyOperation>;
    }
}Eq, #[automatically_derived]
impl ::core::cmp::Ord for AlterPolicy {
    #[inline]
    fn cmp(&self, other: &AlterPolicy) -> ::core::cmp::Ordering {
        match ::core::cmp::Ord::cmp(&self.name, &other.name) {
            ::core::cmp::Ordering::Equal =>
                match ::core::cmp::Ord::cmp(&self.table_name,
                        &other.table_name) {
                    ::core::cmp::Ordering::Equal =>
                        ::core::cmp::Ord::cmp(&self.operation, &other.operation),
                    cmp => cmp,
                },
            cmp => cmp,
        }
    }
}Ord, #[automatically_derived]
impl ::core::hash::Hash for AlterPolicy {
    #[inline]
    fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) {
        ::core::hash::Hash::hash(&self.name, state);
        ::core::hash::Hash::hash(&self.table_name, state);
        ::core::hash::Hash::hash(&self.operation, state)
    }
}Hash)]
5285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5286#[cfg_attr(feature = "visitor", derive(impl sqlparser::ast::Visit for AlterPolicy {
    fn visit<V: sqlparser::ast::Visitor>(&self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::Visit::visit(&self.name, visitor)?;
                        visitor.pre_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.table_name, visitor)?;
                        visitor.post_visit_relation(&self.table_name)?;
                        sqlparser::ast::Visit::visit(&self.operation, visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}Visit, impl sqlparser::ast::VisitMut for AlterPolicy {
    fn visit<V: sqlparser::ast::VisitorMut>(&mut self, visitor: &mut V)
        -> ::std::ops::ControlFlow<V::Break> {
        ::recursive::__impl::stacker::maybe_grow(::recursive::get_minimum_stack_size(),
            ::recursive::get_stack_allocation_size(),
            move || -> ::std::ops::ControlFlow<V::Break>
                {
                    {
                        sqlparser::ast::VisitMut::visit(&mut self.name, visitor)?;
                        visitor.pre_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.table_name,
                                visitor)?;
                        visitor.post_visit_relation(&mut self.table_name)?;
                        sqlparser::ast::VisitMut::visit(&mut self.operation,
                                visitor)?;
                        ::std::ops::ControlFlow::Continue(())
                    }
                })
    }
}VisitMut))]
5287pub struct AlterPolicy {
5288    /// Policy name to alter.
5289    pub name: Ident,
5290    /// Target table name the policy is defined on.
5291    #[cfg_attr(feature = "visitor", visit(with = "visit_relation"))]
5292    pub table_name: ObjectName,
5293    /// Optional operation specific to the policy alteration.
5294    pub operation: AlterPolicyOperation,
5295}
5296
5297impl fmt::Display for AlterPolicy {
5298    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
5299        f.write_fmt(format_args!("ALTER POLICY {0} ON {1}{2}", self.name,
        self.table_name, self.operation))write!(
5300            f,
5301            "ALTER POLICY {name} ON {table_name}{operation}",
5302            name = self.name,
5303            table_name = self.table_name,
5304            operation = self.operation
5305        )
5306    }
5307}
5308
5309impl From<AlterPolicy> for crate::ast::Statement {
5310    fn from(v: AlterPolicy) -> Self {
5311        crate::ast::Statement::AlterPolicy(v)
5312    }
5313}