1use crate::*;
2
3#[derive(Debug, Copy, Clone)]
4pub enum NodeMut {
5 Alias(*mut protobuf::Alias),
6 RangeVar(*mut protobuf::RangeVar),
7 TableFunc(*mut protobuf::TableFunc),
8 Var(*mut protobuf::Var),
9 Param(*mut protobuf::Param),
10 Aggref(*mut protobuf::Aggref),
11 GroupingFunc(*mut protobuf::GroupingFunc),
12 WindowFunc(*mut protobuf::WindowFunc),
13 SubscriptingRef(*mut protobuf::SubscriptingRef),
14 FuncExpr(*mut protobuf::FuncExpr),
15 NamedArgExpr(*mut protobuf::NamedArgExpr),
16 OpExpr(*mut protobuf::OpExpr),
17 DistinctExpr(*mut protobuf::DistinctExpr),
18 NullIfExpr(*mut protobuf::NullIfExpr),
19 ScalarArrayOpExpr(*mut protobuf::ScalarArrayOpExpr),
20 BoolExpr(*mut protobuf::BoolExpr),
21 SubLink(*mut protobuf::SubLink),
22 SubPlan(*mut protobuf::SubPlan),
23 AlternativeSubPlan(*mut protobuf::AlternativeSubPlan),
24 FieldSelect(*mut protobuf::FieldSelect),
25 FieldStore(*mut protobuf::FieldStore),
26 RelabelType(*mut protobuf::RelabelType),
27 CoerceViaIo(*mut protobuf::CoerceViaIo),
28 ArrayCoerceExpr(*mut protobuf::ArrayCoerceExpr),
29 ConvertRowtypeExpr(*mut protobuf::ConvertRowtypeExpr),
30 CollateExpr(*mut protobuf::CollateExpr),
31 CaseExpr(*mut protobuf::CaseExpr),
32 CaseWhen(*mut protobuf::CaseWhen),
33 CaseTestExpr(*mut protobuf::CaseTestExpr),
34 ArrayExpr(*mut protobuf::ArrayExpr),
35 RowExpr(*mut protobuf::RowExpr),
36 RowCompareExpr(*mut protobuf::RowCompareExpr),
37 CoalesceExpr(*mut protobuf::CoalesceExpr),
38 MinMaxExpr(*mut protobuf::MinMaxExpr),
39 SqlvalueFunction(*mut protobuf::SqlValueFunction),
40 XmlExpr(*mut protobuf::XmlExpr),
41 NullTest(*mut protobuf::NullTest),
42 BooleanTest(*mut protobuf::BooleanTest),
43 CoerceToDomain(*mut protobuf::CoerceToDomain),
44 CoerceToDomainValue(*mut protobuf::CoerceToDomainValue),
45 SetToDefault(*mut protobuf::SetToDefault),
46 CurrentOfExpr(*mut protobuf::CurrentOfExpr),
47 NextValueExpr(*mut protobuf::NextValueExpr),
48 InferenceElem(*mut protobuf::InferenceElem),
49 TargetEntry(*mut protobuf::TargetEntry),
50 RangeTblRef(*mut protobuf::RangeTblRef),
51 JoinExpr(*mut protobuf::JoinExpr),
52 FromExpr(*mut protobuf::FromExpr),
53 OnConflictExpr(*mut protobuf::OnConflictExpr),
54 IntoClause(*mut protobuf::IntoClause),
55 RawStmt(*mut protobuf::RawStmt),
56 Query(*mut protobuf::Query),
57 InsertStmt(*mut protobuf::InsertStmt),
58 DeleteStmt(*mut protobuf::DeleteStmt),
59 UpdateStmt(*mut protobuf::UpdateStmt),
60 SelectStmt(*mut protobuf::SelectStmt),
61 AlterTableStmt(*mut protobuf::AlterTableStmt),
62 AlterTableCmd(*mut protobuf::AlterTableCmd),
63 AlterDomainStmt(*mut protobuf::AlterDomainStmt),
64 SetOperationStmt(*mut protobuf::SetOperationStmt),
65 GrantStmt(*mut protobuf::GrantStmt),
66 GrantRoleStmt(*mut protobuf::GrantRoleStmt),
67 AlterDefaultPrivilegesStmt(*mut protobuf::AlterDefaultPrivilegesStmt),
68 ClosePortalStmt(*mut protobuf::ClosePortalStmt),
69 ClusterStmt(*mut protobuf::ClusterStmt),
70 CopyStmt(*mut protobuf::CopyStmt),
71 CreateStmt(*mut protobuf::CreateStmt),
72 DefineStmt(*mut protobuf::DefineStmt),
73 DropStmt(*mut protobuf::DropStmt),
74 TruncateStmt(*mut protobuf::TruncateStmt),
75 CommentStmt(*mut protobuf::CommentStmt),
76 FetchStmt(*mut protobuf::FetchStmt),
77 IndexStmt(*mut protobuf::IndexStmt),
78 CreateFunctionStmt(*mut protobuf::CreateFunctionStmt),
79 AlterFunctionStmt(*mut protobuf::AlterFunctionStmt),
80 DoStmt(*mut protobuf::DoStmt),
81 RenameStmt(*mut protobuf::RenameStmt),
82 RuleStmt(*mut protobuf::RuleStmt),
83 NotifyStmt(*mut protobuf::NotifyStmt),
84 ListenStmt(*mut protobuf::ListenStmt),
85 UnlistenStmt(*mut protobuf::UnlistenStmt),
86 TransactionStmt(*mut protobuf::TransactionStmt),
87 ViewStmt(*mut protobuf::ViewStmt),
88 LoadStmt(*mut protobuf::LoadStmt),
89 CreateDomainStmt(*mut protobuf::CreateDomainStmt),
90 CreatedbStmt(*mut protobuf::CreatedbStmt),
91 DropdbStmt(*mut protobuf::DropdbStmt),
92 VacuumStmt(*mut protobuf::VacuumStmt),
93 ExplainStmt(*mut protobuf::ExplainStmt),
94 CreateTableAsStmt(*mut protobuf::CreateTableAsStmt),
95 CreateSeqStmt(*mut protobuf::CreateSeqStmt),
96 AlterSeqStmt(*mut protobuf::AlterSeqStmt),
97 VariableSetStmt(*mut protobuf::VariableSetStmt),
98 VariableShowStmt(*mut protobuf::VariableShowStmt),
99 DiscardStmt(*mut protobuf::DiscardStmt),
100 CreateTrigStmt(*mut protobuf::CreateTrigStmt),
101 CreatePlangStmt(*mut protobuf::CreatePLangStmt),
102 CreateRoleStmt(*mut protobuf::CreateRoleStmt),
103 AlterRoleStmt(*mut protobuf::AlterRoleStmt),
104 DropRoleStmt(*mut protobuf::DropRoleStmt),
105 LockStmt(*mut protobuf::LockStmt),
106 ConstraintsSetStmt(*mut protobuf::ConstraintsSetStmt),
107 ReindexStmt(*mut protobuf::ReindexStmt),
108 CheckPointStmt(*mut protobuf::CheckPointStmt),
109 CreateSchemaStmt(*mut protobuf::CreateSchemaStmt),
110 AlterDatabaseStmt(*mut protobuf::AlterDatabaseStmt),
111 AlterDatabaseSetStmt(*mut protobuf::AlterDatabaseSetStmt),
112 AlterRoleSetStmt(*mut protobuf::AlterRoleSetStmt),
113 CreateConversionStmt(*mut protobuf::CreateConversionStmt),
114 CreateCastStmt(*mut protobuf::CreateCastStmt),
115 CreateOpClassStmt(*mut protobuf::CreateOpClassStmt),
116 CreateOpFamilyStmt(*mut protobuf::CreateOpFamilyStmt),
117 AlterOpFamilyStmt(*mut protobuf::AlterOpFamilyStmt),
118 PrepareStmt(*mut protobuf::PrepareStmt),
119 ExecuteStmt(*mut protobuf::ExecuteStmt),
120 DeallocateStmt(*mut protobuf::DeallocateStmt),
121 DeclareCursorStmt(*mut protobuf::DeclareCursorStmt),
122 CreateTableSpaceStmt(*mut protobuf::CreateTableSpaceStmt),
123 DropTableSpaceStmt(*mut protobuf::DropTableSpaceStmt),
124 AlterObjectDependsStmt(*mut protobuf::AlterObjectDependsStmt),
125 AlterObjectSchemaStmt(*mut protobuf::AlterObjectSchemaStmt),
126 AlterOwnerStmt(*mut protobuf::AlterOwnerStmt),
127 AlterOperatorStmt(*mut protobuf::AlterOperatorStmt),
128 AlterTypeStmt(*mut protobuf::AlterTypeStmt),
129 DropOwnedStmt(*mut protobuf::DropOwnedStmt),
130 ReassignOwnedStmt(*mut protobuf::ReassignOwnedStmt),
131 CompositeTypeStmt(*mut protobuf::CompositeTypeStmt),
132 CreateEnumStmt(*mut protobuf::CreateEnumStmt),
133 CreateRangeStmt(*mut protobuf::CreateRangeStmt),
134 AlterEnumStmt(*mut protobuf::AlterEnumStmt),
135 AlterTsdictionaryStmt(*mut protobuf::AlterTsDictionaryStmt),
136 AlterTsconfigurationStmt(*mut protobuf::AlterTsConfigurationStmt),
137 CreateFdwStmt(*mut protobuf::CreateFdwStmt),
138 AlterFdwStmt(*mut protobuf::AlterFdwStmt),
139 CreateForeignServerStmt(*mut protobuf::CreateForeignServerStmt),
140 AlterForeignServerStmt(*mut protobuf::AlterForeignServerStmt),
141 CreateUserMappingStmt(*mut protobuf::CreateUserMappingStmt),
142 AlterUserMappingStmt(*mut protobuf::AlterUserMappingStmt),
143 DropUserMappingStmt(*mut protobuf::DropUserMappingStmt),
144 AlterTableSpaceOptionsStmt(*mut protobuf::AlterTableSpaceOptionsStmt),
145 AlterTableMoveAllStmt(*mut protobuf::AlterTableMoveAllStmt),
146 SecLabelStmt(*mut protobuf::SecLabelStmt),
147 CreateForeignTableStmt(*mut protobuf::CreateForeignTableStmt),
148 ImportForeignSchemaStmt(*mut protobuf::ImportForeignSchemaStmt),
149 CreateExtensionStmt(*mut protobuf::CreateExtensionStmt),
150 AlterExtensionStmt(*mut protobuf::AlterExtensionStmt),
151 AlterExtensionContentsStmt(*mut protobuf::AlterExtensionContentsStmt),
152 CreateEventTrigStmt(*mut protobuf::CreateEventTrigStmt),
153 AlterEventTrigStmt(*mut protobuf::AlterEventTrigStmt),
154 RefreshMatViewStmt(*mut protobuf::RefreshMatViewStmt),
155 ReplicaIdentityStmt(*mut protobuf::ReplicaIdentityStmt),
156 AlterSystemStmt(*mut protobuf::AlterSystemStmt),
157 CreatePolicyStmt(*mut protobuf::CreatePolicyStmt),
158 AlterPolicyStmt(*mut protobuf::AlterPolicyStmt),
159 CreateTransformStmt(*mut protobuf::CreateTransformStmt),
160 CreateAmStmt(*mut protobuf::CreateAmStmt),
161 CreatePublicationStmt(*mut protobuf::CreatePublicationStmt),
162 AlterPublicationStmt(*mut protobuf::AlterPublicationStmt),
163 CreateSubscriptionStmt(*mut protobuf::CreateSubscriptionStmt),
164 AlterSubscriptionStmt(*mut protobuf::AlterSubscriptionStmt),
165 DropSubscriptionStmt(*mut protobuf::DropSubscriptionStmt),
166 CreateStatsStmt(*mut protobuf::CreateStatsStmt),
167 AlterCollationStmt(*mut protobuf::AlterCollationStmt),
168 CallStmt(*mut protobuf::CallStmt),
169 AlterStatsStmt(*mut protobuf::AlterStatsStmt),
170 AExpr(*mut protobuf::AExpr),
171 ColumnRef(*mut protobuf::ColumnRef),
172 ParamRef(*mut protobuf::ParamRef),
173 AConst(*mut protobuf::AConst),
174 FuncCall(*mut protobuf::FuncCall),
175 AStar(*mut protobuf::AStar),
176 AIndices(*mut protobuf::AIndices),
177 AIndirection(*mut protobuf::AIndirection),
178 AArrayExpr(*mut protobuf::AArrayExpr),
179 ResTarget(*mut protobuf::ResTarget),
180 MultiAssignRef(*mut protobuf::MultiAssignRef),
181 TypeCast(*mut protobuf::TypeCast),
182 CollateClause(*mut protobuf::CollateClause),
183 SortBy(*mut protobuf::SortBy),
184 WindowDef(*mut protobuf::WindowDef),
185 RangeSubselect(*mut protobuf::RangeSubselect),
186 RangeFunction(*mut protobuf::RangeFunction),
187 RangeTableSample(*mut protobuf::RangeTableSample),
188 RangeTableFunc(*mut protobuf::RangeTableFunc),
189 RangeTableFuncCol(*mut protobuf::RangeTableFuncCol),
190 TypeName(*mut protobuf::TypeName),
191 ColumnDef(*mut protobuf::ColumnDef),
192 IndexElem(*mut protobuf::IndexElem),
193 Constraint(*mut protobuf::Constraint),
194 DefElem(*mut protobuf::DefElem),
195 RangeTblEntry(*mut protobuf::RangeTblEntry),
196 RangeTblFunction(*mut protobuf::RangeTblFunction),
197 TableSampleClause(*mut protobuf::TableSampleClause),
198 WithCheckOption(*mut protobuf::WithCheckOption),
199 SortGroupClause(*mut protobuf::SortGroupClause),
200 GroupingSet(*mut protobuf::GroupingSet),
201 WindowClause(*mut protobuf::WindowClause),
202 ObjectWithArgs(*mut protobuf::ObjectWithArgs),
203 AccessPriv(*mut protobuf::AccessPriv),
204 CreateOpClassItem(*mut protobuf::CreateOpClassItem),
205 TableLikeClause(*mut protobuf::TableLikeClause),
206 FunctionParameter(*mut protobuf::FunctionParameter),
207 LockingClause(*mut protobuf::LockingClause),
208 RowMarkClause(*mut protobuf::RowMarkClause),
209 XmlSerialize(*mut protobuf::XmlSerialize),
210 WithClause(*mut protobuf::WithClause),
211 InferClause(*mut protobuf::InferClause),
212 OnConflictClause(*mut protobuf::OnConflictClause),
213 CommonTableExpr(*mut protobuf::CommonTableExpr),
214 RoleSpec(*mut protobuf::RoleSpec),
215 TriggerTransition(*mut protobuf::TriggerTransition),
216 PartitionElem(*mut protobuf::PartitionElem),
217 PartitionSpec(*mut protobuf::PartitionSpec),
218 PartitionBoundSpec(*mut protobuf::PartitionBoundSpec),
219 PartitionRangeDatum(*mut protobuf::PartitionRangeDatum),
220 PartitionCmd(*mut protobuf::PartitionCmd),
221 VacuumRelation(*mut protobuf::VacuumRelation),
222 InlineCodeBlock(*mut protobuf::InlineCodeBlock),
223 CallContext(*mut protobuf::CallContext),
224 Integer(*mut protobuf::Integer),
225 Float(*mut protobuf::Float),
226 Boolean(*mut protobuf::Boolean),
227 String(*mut protobuf::String),
228 BitString(*mut protobuf::BitString),
229 List(*mut protobuf::List),
230 IntList(*mut protobuf::IntList),
231 OidList(*mut protobuf::OidList),
232 MergeStmt(*mut protobuf::MergeStmt),
233 MergeAction(*mut protobuf::MergeAction),
234 AlterDatabaseRefreshCollStmt(*mut protobuf::AlterDatabaseRefreshCollStmt),
235 ReturnStmt(*mut protobuf::ReturnStmt),
236 PlassignStmt(*mut protobuf::PlAssignStmt),
237 StatsElem(*mut protobuf::StatsElem),
238 CtesearchClause(*mut protobuf::CteSearchClause),
239 CtecycleClause(*mut protobuf::CteCycleClause),
240 MergeWhenClause(*mut protobuf::MergeWhenClause),
241 PublicationObjSpec(*mut protobuf::PublicationObjSpec),
242 PublicationTable(*mut protobuf::PublicationTable),
243 JsonFormat(*mut protobuf::JsonFormat),
244 JsonReturning(*mut protobuf::JsonReturning),
245 JsonValueExpr(*mut protobuf::JsonValueExpr),
246 JsonConstructorExpr(*mut protobuf::JsonConstructorExpr),
247 JsonIsPredicate(*mut protobuf::JsonIsPredicate),
248 JsonOutput(*mut protobuf::JsonOutput),
249 JsonKeyValue(*mut protobuf::JsonKeyValue),
250 JsonObjectConstructor(*mut protobuf::JsonObjectConstructor),
251 JsonArrayConstructor(*mut protobuf::JsonArrayConstructor),
252 JsonArrayQueryConstructor(*mut protobuf::JsonArrayQueryConstructor),
253 JsonAggConstructor(*mut protobuf::JsonAggConstructor),
254 JsonObjectAgg(*mut protobuf::JsonObjectAgg),
255 JsonArrayAgg(*mut protobuf::JsonArrayAgg),
256 RtepermissionInfo(*mut protobuf::RtePermissionInfo),
257 WindowFuncRunCondition(*mut protobuf::WindowFuncRunCondition),
258 MergeSupportFunc(*mut protobuf::MergeSupportFunc),
259 JsonBehavior(*mut protobuf::JsonBehavior),
260 JsonExpr(*mut protobuf::JsonExpr),
261 JsonTablePath(*mut protobuf::JsonTablePath),
262 JsonTablePathScan(*mut protobuf::JsonTablePathScan),
263 JsonTableSiblingJoin(*mut protobuf::JsonTableSiblingJoin),
264 SinglePartitionSpec(*mut protobuf::SinglePartitionSpec),
265 JsonArgument(*mut protobuf::JsonArgument),
266 JsonFuncExpr(*mut protobuf::JsonFuncExpr),
267 JsonTablePathSpec(*mut protobuf::JsonTablePathSpec),
268 JsonTable(*mut protobuf::JsonTable),
269 JsonTableColumn(*mut protobuf::JsonTableColumn),
270 JsonParseExpr(*mut protobuf::JsonParseExpr),
271 JsonScalarExpr(*mut protobuf::JsonScalarExpr),
272 JsonSerializeExpr(*mut protobuf::JsonSerializeExpr),
273}
274
275impl NodeMut {
276 pub fn deparse(&self) -> Result<String> {
277 crate::deparse(&protobuf::ParseResult {
278 version: crate::bindings::PG_VERSION_NUM as i32,
279 stmts: vec![protobuf::RawStmt { stmt: Some(Box::new(Node { node: Some(self.to_enum()?) })), stmt_location: 0, stmt_len: 0 }],
280 })
281 }
282
283 pub fn to_enum(&self) -> Result<NodeEnum> {
284 unsafe {
285 let err = Error::InvalidPointer;
286 match self {
287 NodeMut::Alias(n) => Ok(NodeEnum::Alias(n.as_ref().ok_or(err)?.clone())),
288 NodeMut::RangeVar(n) => Ok(NodeEnum::RangeVar(n.as_ref().ok_or(err)?.clone())),
289 NodeMut::TableFunc(n) => Ok(NodeEnum::TableFunc(Box::new(n.as_ref().ok_or(err)?.clone()))),
290 NodeMut::Var(n) => Ok(NodeEnum::Var(Box::new(n.as_ref().ok_or(err)?.clone()))),
291 NodeMut::Param(n) => Ok(NodeEnum::Param(Box::new(n.as_ref().ok_or(err)?.clone()))),
292 NodeMut::Aggref(n) => Ok(NodeEnum::Aggref(Box::new(n.as_ref().ok_or(err)?.clone()))),
293 NodeMut::GroupingFunc(n) => Ok(NodeEnum::GroupingFunc(Box::new(n.as_ref().ok_or(err)?.clone()))),
294 NodeMut::WindowFunc(n) => Ok(NodeEnum::WindowFunc(Box::new(n.as_ref().ok_or(err)?.clone()))),
295 NodeMut::SubscriptingRef(n) => Ok(NodeEnum::SubscriptingRef(Box::new(n.as_ref().ok_or(err)?.clone()))),
296 NodeMut::FuncExpr(n) => Ok(NodeEnum::FuncExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
297 NodeMut::NamedArgExpr(n) => Ok(NodeEnum::NamedArgExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
298 NodeMut::OpExpr(n) => Ok(NodeEnum::OpExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
299 NodeMut::DistinctExpr(n) => Ok(NodeEnum::DistinctExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
300 NodeMut::NullIfExpr(n) => Ok(NodeEnum::NullIfExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
301 NodeMut::ScalarArrayOpExpr(n) => Ok(NodeEnum::ScalarArrayOpExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
302 NodeMut::BoolExpr(n) => Ok(NodeEnum::BoolExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
303 NodeMut::SubLink(n) => Ok(NodeEnum::SubLink(Box::new(n.as_ref().ok_or(err)?.clone()))),
304 NodeMut::SubPlan(n) => Ok(NodeEnum::SubPlan(Box::new(n.as_ref().ok_or(err)?.clone()))),
305 NodeMut::AlternativeSubPlan(n) => Ok(NodeEnum::AlternativeSubPlan(Box::new(n.as_ref().ok_or(err)?.clone()))),
306 NodeMut::FieldSelect(n) => Ok(NodeEnum::FieldSelect(Box::new(n.as_ref().ok_or(err)?.clone()))),
307 NodeMut::FieldStore(n) => Ok(NodeEnum::FieldStore(Box::new(n.as_ref().ok_or(err)?.clone()))),
308 NodeMut::RelabelType(n) => Ok(NodeEnum::RelabelType(Box::new(n.as_ref().ok_or(err)?.clone()))),
309 NodeMut::CoerceViaIo(n) => Ok(NodeEnum::CoerceViaIo(Box::new(n.as_ref().ok_or(err)?.clone()))),
310 NodeMut::ArrayCoerceExpr(n) => Ok(NodeEnum::ArrayCoerceExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
311 NodeMut::ConvertRowtypeExpr(n) => Ok(NodeEnum::ConvertRowtypeExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
312 NodeMut::CollateExpr(n) => Ok(NodeEnum::CollateExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
313 NodeMut::CaseExpr(n) => Ok(NodeEnum::CaseExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
314 NodeMut::CaseWhen(n) => Ok(NodeEnum::CaseWhen(Box::new(n.as_ref().ok_or(err)?.clone()))),
315 NodeMut::CaseTestExpr(n) => Ok(NodeEnum::CaseTestExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
316 NodeMut::ArrayExpr(n) => Ok(NodeEnum::ArrayExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
317 NodeMut::RowExpr(n) => Ok(NodeEnum::RowExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
318 NodeMut::RowCompareExpr(n) => Ok(NodeEnum::RowCompareExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
319 NodeMut::CoalesceExpr(n) => Ok(NodeEnum::CoalesceExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
320 NodeMut::MinMaxExpr(n) => Ok(NodeEnum::MinMaxExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
321 NodeMut::SqlvalueFunction(n) => Ok(NodeEnum::SqlvalueFunction(Box::new(n.as_ref().ok_or(err)?.clone()))),
322 NodeMut::XmlExpr(n) => Ok(NodeEnum::XmlExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
323 NodeMut::NullTest(n) => Ok(NodeEnum::NullTest(Box::new(n.as_ref().ok_or(err)?.clone()))),
324 NodeMut::BooleanTest(n) => Ok(NodeEnum::BooleanTest(Box::new(n.as_ref().ok_or(err)?.clone()))),
325 NodeMut::CoerceToDomain(n) => Ok(NodeEnum::CoerceToDomain(Box::new(n.as_ref().ok_or(err)?.clone()))),
326 NodeMut::CoerceToDomainValue(n) => Ok(NodeEnum::CoerceToDomainValue(Box::new(n.as_ref().ok_or(err)?.clone()))),
327 NodeMut::SetToDefault(n) => Ok(NodeEnum::SetToDefault(Box::new(n.as_ref().ok_or(err)?.clone()))),
328 NodeMut::CurrentOfExpr(n) => Ok(NodeEnum::CurrentOfExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
329 NodeMut::NextValueExpr(n) => Ok(NodeEnum::NextValueExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
330 NodeMut::InferenceElem(n) => Ok(NodeEnum::InferenceElem(Box::new(n.as_ref().ok_or(err)?.clone()))),
331 NodeMut::TargetEntry(n) => Ok(NodeEnum::TargetEntry(Box::new(n.as_ref().ok_or(err)?.clone()))),
332 NodeMut::RangeTblRef(n) => Ok(NodeEnum::RangeTblRef(n.as_ref().ok_or(err)?.clone())),
333 NodeMut::JoinExpr(n) => Ok(NodeEnum::JoinExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
334 NodeMut::FromExpr(n) => Ok(NodeEnum::FromExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
335 NodeMut::OnConflictExpr(n) => Ok(NodeEnum::OnConflictExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
336 NodeMut::IntoClause(n) => Ok(NodeEnum::IntoClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
337 NodeMut::RawStmt(n) => Ok(NodeEnum::RawStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
338 NodeMut::Query(n) => Ok(NodeEnum::Query(Box::new(n.as_ref().ok_or(err)?.clone()))),
339 NodeMut::InsertStmt(n) => Ok(NodeEnum::InsertStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
340 NodeMut::DeleteStmt(n) => Ok(NodeEnum::DeleteStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
341 NodeMut::UpdateStmt(n) => Ok(NodeEnum::UpdateStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
342 NodeMut::SelectStmt(n) => Ok(NodeEnum::SelectStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
343 NodeMut::AlterTableStmt(n) => Ok(NodeEnum::AlterTableStmt(n.as_ref().ok_or(err)?.clone())),
344 NodeMut::AlterTableCmd(n) => Ok(NodeEnum::AlterTableCmd(Box::new(n.as_ref().ok_or(err)?.clone()))),
345 NodeMut::AlterDomainStmt(n) => Ok(NodeEnum::AlterDomainStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
346 NodeMut::SetOperationStmt(n) => Ok(NodeEnum::SetOperationStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
347 NodeMut::GrantStmt(n) => Ok(NodeEnum::GrantStmt(n.as_ref().ok_or(err)?.clone())),
348 NodeMut::GrantRoleStmt(n) => Ok(NodeEnum::GrantRoleStmt(n.as_ref().ok_or(err)?.clone())),
349 NodeMut::AlterDefaultPrivilegesStmt(n) => Ok(NodeEnum::AlterDefaultPrivilegesStmt(n.as_ref().ok_or(err)?.clone())),
350 NodeMut::ClosePortalStmt(n) => Ok(NodeEnum::ClosePortalStmt(n.as_ref().ok_or(err)?.clone())),
351 NodeMut::ClusterStmt(n) => Ok(NodeEnum::ClusterStmt(n.as_ref().ok_or(err)?.clone())),
352 NodeMut::CopyStmt(n) => Ok(NodeEnum::CopyStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
353 NodeMut::CreateStmt(n) => Ok(NodeEnum::CreateStmt(n.as_ref().ok_or(err)?.clone())),
354 NodeMut::DefineStmt(n) => Ok(NodeEnum::DefineStmt(n.as_ref().ok_or(err)?.clone())),
355 NodeMut::DropStmt(n) => Ok(NodeEnum::DropStmt(n.as_ref().ok_or(err)?.clone())),
356 NodeMut::TruncateStmt(n) => Ok(NodeEnum::TruncateStmt(n.as_ref().ok_or(err)?.clone())),
357 NodeMut::CommentStmt(n) => Ok(NodeEnum::CommentStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
358 NodeMut::FetchStmt(n) => Ok(NodeEnum::FetchStmt(n.as_ref().ok_or(err)?.clone())),
359 NodeMut::IndexStmt(n) => Ok(NodeEnum::IndexStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
360 NodeMut::CreateFunctionStmt(n) => Ok(NodeEnum::CreateFunctionStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
361 NodeMut::AlterFunctionStmt(n) => Ok(NodeEnum::AlterFunctionStmt(n.as_ref().ok_or(err)?.clone())),
362 NodeMut::DoStmt(n) => Ok(NodeEnum::DoStmt(n.as_ref().ok_or(err)?.clone())),
363 NodeMut::RenameStmt(n) => Ok(NodeEnum::RenameStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
364 NodeMut::RuleStmt(n) => Ok(NodeEnum::RuleStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
365 NodeMut::NotifyStmt(n) => Ok(NodeEnum::NotifyStmt(n.as_ref().ok_or(err)?.clone())),
366 NodeMut::ListenStmt(n) => Ok(NodeEnum::ListenStmt(n.as_ref().ok_or(err)?.clone())),
367 NodeMut::UnlistenStmt(n) => Ok(NodeEnum::UnlistenStmt(n.as_ref().ok_or(err)?.clone())),
368 NodeMut::TransactionStmt(n) => Ok(NodeEnum::TransactionStmt(n.as_ref().ok_or(err)?.clone())),
369 NodeMut::ViewStmt(n) => Ok(NodeEnum::ViewStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
370 NodeMut::LoadStmt(n) => Ok(NodeEnum::LoadStmt(n.as_ref().ok_or(err)?.clone())),
371 NodeMut::CreateDomainStmt(n) => Ok(NodeEnum::CreateDomainStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
372 NodeMut::CreatedbStmt(n) => Ok(NodeEnum::CreatedbStmt(n.as_ref().ok_or(err)?.clone())),
373 NodeMut::DropdbStmt(n) => Ok(NodeEnum::DropdbStmt(n.as_ref().ok_or(err)?.clone())),
374 NodeMut::VacuumStmt(n) => Ok(NodeEnum::VacuumStmt(n.as_ref().ok_or(err)?.clone())),
375 NodeMut::ExplainStmt(n) => Ok(NodeEnum::ExplainStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
376 NodeMut::CreateTableAsStmt(n) => Ok(NodeEnum::CreateTableAsStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
377 NodeMut::CreateSeqStmt(n) => Ok(NodeEnum::CreateSeqStmt(n.as_ref().ok_or(err)?.clone())),
378 NodeMut::AlterSeqStmt(n) => Ok(NodeEnum::AlterSeqStmt(n.as_ref().ok_or(err)?.clone())),
379 NodeMut::VariableSetStmt(n) => Ok(NodeEnum::VariableSetStmt(n.as_ref().ok_or(err)?.clone())),
380 NodeMut::VariableShowStmt(n) => Ok(NodeEnum::VariableShowStmt(n.as_ref().ok_or(err)?.clone())),
381 NodeMut::DiscardStmt(n) => Ok(NodeEnum::DiscardStmt(n.as_ref().ok_or(err)?.clone())),
382 NodeMut::CreateTrigStmt(n) => Ok(NodeEnum::CreateTrigStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
383 NodeMut::CreatePlangStmt(n) => Ok(NodeEnum::CreatePlangStmt(n.as_ref().ok_or(err)?.clone())),
384 NodeMut::CreateRoleStmt(n) => Ok(NodeEnum::CreateRoleStmt(n.as_ref().ok_or(err)?.clone())),
385 NodeMut::AlterRoleStmt(n) => Ok(NodeEnum::AlterRoleStmt(n.as_ref().ok_or(err)?.clone())),
386 NodeMut::DropRoleStmt(n) => Ok(NodeEnum::DropRoleStmt(n.as_ref().ok_or(err)?.clone())),
387 NodeMut::LockStmt(n) => Ok(NodeEnum::LockStmt(n.as_ref().ok_or(err)?.clone())),
388 NodeMut::ConstraintsSetStmt(n) => Ok(NodeEnum::ConstraintsSetStmt(n.as_ref().ok_or(err)?.clone())),
389 NodeMut::ReindexStmt(n) => Ok(NodeEnum::ReindexStmt(n.as_ref().ok_or(err)?.clone())),
390 NodeMut::CheckPointStmt(n) => Ok(NodeEnum::CheckPointStmt(n.as_ref().ok_or(err)?.clone())),
391 NodeMut::CreateSchemaStmt(n) => Ok(NodeEnum::CreateSchemaStmt(n.as_ref().ok_or(err)?.clone())),
392 NodeMut::AlterDatabaseStmt(n) => Ok(NodeEnum::AlterDatabaseStmt(n.as_ref().ok_or(err)?.clone())),
393 NodeMut::AlterDatabaseSetStmt(n) => Ok(NodeEnum::AlterDatabaseSetStmt(n.as_ref().ok_or(err)?.clone())),
394 NodeMut::AlterRoleSetStmt(n) => Ok(NodeEnum::AlterRoleSetStmt(n.as_ref().ok_or(err)?.clone())),
395 NodeMut::CreateConversionStmt(n) => Ok(NodeEnum::CreateConversionStmt(n.as_ref().ok_or(err)?.clone())),
396 NodeMut::CreateCastStmt(n) => Ok(NodeEnum::CreateCastStmt(n.as_ref().ok_or(err)?.clone())),
397 NodeMut::CreateOpClassStmt(n) => Ok(NodeEnum::CreateOpClassStmt(n.as_ref().ok_or(err)?.clone())),
398 NodeMut::CreateOpFamilyStmt(n) => Ok(NodeEnum::CreateOpFamilyStmt(n.as_ref().ok_or(err)?.clone())),
399 NodeMut::AlterOpFamilyStmt(n) => Ok(NodeEnum::AlterOpFamilyStmt(n.as_ref().ok_or(err)?.clone())),
400 NodeMut::PrepareStmt(n) => Ok(NodeEnum::PrepareStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
401 NodeMut::ExecuteStmt(n) => Ok(NodeEnum::ExecuteStmt(n.as_ref().ok_or(err)?.clone())),
402 NodeMut::DeallocateStmt(n) => Ok(NodeEnum::DeallocateStmt(n.as_ref().ok_or(err)?.clone())),
403 NodeMut::DeclareCursorStmt(n) => Ok(NodeEnum::DeclareCursorStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
404 NodeMut::CreateTableSpaceStmt(n) => Ok(NodeEnum::CreateTableSpaceStmt(n.as_ref().ok_or(err)?.clone())),
405 NodeMut::DropTableSpaceStmt(n) => Ok(NodeEnum::DropTableSpaceStmt(n.as_ref().ok_or(err)?.clone())),
406 NodeMut::AlterObjectDependsStmt(n) => Ok(NodeEnum::AlterObjectDependsStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
407 NodeMut::AlterObjectSchemaStmt(n) => Ok(NodeEnum::AlterObjectSchemaStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
408 NodeMut::AlterOwnerStmt(n) => Ok(NodeEnum::AlterOwnerStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
409 NodeMut::AlterOperatorStmt(n) => Ok(NodeEnum::AlterOperatorStmt(n.as_ref().ok_or(err)?.clone())),
410 NodeMut::AlterTypeStmt(n) => Ok(NodeEnum::AlterTypeStmt(n.as_ref().ok_or(err)?.clone())),
411 NodeMut::DropOwnedStmt(n) => Ok(NodeEnum::DropOwnedStmt(n.as_ref().ok_or(err)?.clone())),
412 NodeMut::ReassignOwnedStmt(n) => Ok(NodeEnum::ReassignOwnedStmt(n.as_ref().ok_or(err)?.clone())),
413 NodeMut::CompositeTypeStmt(n) => Ok(NodeEnum::CompositeTypeStmt(n.as_ref().ok_or(err)?.clone())),
414 NodeMut::CreateEnumStmt(n) => Ok(NodeEnum::CreateEnumStmt(n.as_ref().ok_or(err)?.clone())),
415 NodeMut::CreateRangeStmt(n) => Ok(NodeEnum::CreateRangeStmt(n.as_ref().ok_or(err)?.clone())),
416 NodeMut::AlterEnumStmt(n) => Ok(NodeEnum::AlterEnumStmt(n.as_ref().ok_or(err)?.clone())),
417 NodeMut::AlterTsdictionaryStmt(n) => Ok(NodeEnum::AlterTsdictionaryStmt(n.as_ref().ok_or(err)?.clone())),
418 NodeMut::AlterTsconfigurationStmt(n) => Ok(NodeEnum::AlterTsconfigurationStmt(n.as_ref().ok_or(err)?.clone())),
419 NodeMut::CreateFdwStmt(n) => Ok(NodeEnum::CreateFdwStmt(n.as_ref().ok_or(err)?.clone())),
420 NodeMut::AlterFdwStmt(n) => Ok(NodeEnum::AlterFdwStmt(n.as_ref().ok_or(err)?.clone())),
421 NodeMut::CreateForeignServerStmt(n) => Ok(NodeEnum::CreateForeignServerStmt(n.as_ref().ok_or(err)?.clone())),
422 NodeMut::AlterForeignServerStmt(n) => Ok(NodeEnum::AlterForeignServerStmt(n.as_ref().ok_or(err)?.clone())),
423 NodeMut::CreateUserMappingStmt(n) => Ok(NodeEnum::CreateUserMappingStmt(n.as_ref().ok_or(err)?.clone())),
424 NodeMut::AlterUserMappingStmt(n) => Ok(NodeEnum::AlterUserMappingStmt(n.as_ref().ok_or(err)?.clone())),
425 NodeMut::DropUserMappingStmt(n) => Ok(NodeEnum::DropUserMappingStmt(n.as_ref().ok_or(err)?.clone())),
426 NodeMut::AlterTableSpaceOptionsStmt(n) => Ok(NodeEnum::AlterTableSpaceOptionsStmt(n.as_ref().ok_or(err)?.clone())),
427 NodeMut::AlterTableMoveAllStmt(n) => Ok(NodeEnum::AlterTableMoveAllStmt(n.as_ref().ok_or(err)?.clone())),
428 NodeMut::SecLabelStmt(n) => Ok(NodeEnum::SecLabelStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
429 NodeMut::CreateForeignTableStmt(n) => Ok(NodeEnum::CreateForeignTableStmt(n.as_ref().ok_or(err)?.clone())),
430 NodeMut::ImportForeignSchemaStmt(n) => Ok(NodeEnum::ImportForeignSchemaStmt(n.as_ref().ok_or(err)?.clone())),
431 NodeMut::CreateExtensionStmt(n) => Ok(NodeEnum::CreateExtensionStmt(n.as_ref().ok_or(err)?.clone())),
432 NodeMut::AlterExtensionStmt(n) => Ok(NodeEnum::AlterExtensionStmt(n.as_ref().ok_or(err)?.clone())),
433 NodeMut::AlterExtensionContentsStmt(n) => Ok(NodeEnum::AlterExtensionContentsStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
434 NodeMut::CreateEventTrigStmt(n) => Ok(NodeEnum::CreateEventTrigStmt(n.as_ref().ok_or(err)?.clone())),
435 NodeMut::AlterEventTrigStmt(n) => Ok(NodeEnum::AlterEventTrigStmt(n.as_ref().ok_or(err)?.clone())),
436 NodeMut::RefreshMatViewStmt(n) => Ok(NodeEnum::RefreshMatViewStmt(n.as_ref().ok_or(err)?.clone())),
437 NodeMut::ReplicaIdentityStmt(n) => Ok(NodeEnum::ReplicaIdentityStmt(n.as_ref().ok_or(err)?.clone())),
438 NodeMut::AlterSystemStmt(n) => Ok(NodeEnum::AlterSystemStmt(n.as_ref().ok_or(err)?.clone())),
439 NodeMut::CreatePolicyStmt(n) => Ok(NodeEnum::CreatePolicyStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
440 NodeMut::AlterPolicyStmt(n) => Ok(NodeEnum::AlterPolicyStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
441 NodeMut::CreateTransformStmt(n) => Ok(NodeEnum::CreateTransformStmt(n.as_ref().ok_or(err)?.clone())),
442 NodeMut::CreateAmStmt(n) => Ok(NodeEnum::CreateAmStmt(n.as_ref().ok_or(err)?.clone())),
443 NodeMut::CreatePublicationStmt(n) => Ok(NodeEnum::CreatePublicationStmt(n.as_ref().ok_or(err)?.clone())),
444 NodeMut::AlterPublicationStmt(n) => Ok(NodeEnum::AlterPublicationStmt(n.as_ref().ok_or(err)?.clone())),
445 NodeMut::CreateSubscriptionStmt(n) => Ok(NodeEnum::CreateSubscriptionStmt(n.as_ref().ok_or(err)?.clone())),
446 NodeMut::AlterSubscriptionStmt(n) => Ok(NodeEnum::AlterSubscriptionStmt(n.as_ref().ok_or(err)?.clone())),
447 NodeMut::DropSubscriptionStmt(n) => Ok(NodeEnum::DropSubscriptionStmt(n.as_ref().ok_or(err)?.clone())),
448 NodeMut::CreateStatsStmt(n) => Ok(NodeEnum::CreateStatsStmt(n.as_ref().ok_or(err)?.clone())),
449 NodeMut::AlterCollationStmt(n) => Ok(NodeEnum::AlterCollationStmt(n.as_ref().ok_or(err)?.clone())),
450 NodeMut::CallStmt(n) => Ok(NodeEnum::CallStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
451 NodeMut::AlterStatsStmt(n) => Ok(NodeEnum::AlterStatsStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
452 NodeMut::AExpr(n) => Ok(NodeEnum::AExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
453 NodeMut::ColumnRef(n) => Ok(NodeEnum::ColumnRef(n.as_ref().ok_or(err)?.clone())),
454 NodeMut::ParamRef(n) => Ok(NodeEnum::ParamRef(n.as_ref().ok_or(err)?.clone())),
455 NodeMut::AConst(n) => Ok(NodeEnum::AConst(n.as_ref().ok_or(err)?.clone())),
456 NodeMut::FuncCall(n) => Ok(NodeEnum::FuncCall(Box::new(n.as_ref().ok_or(err)?.clone()))),
457 NodeMut::AStar(n) => Ok(NodeEnum::AStar(n.as_ref().ok_or(err)?.clone())),
458 NodeMut::AIndices(n) => Ok(NodeEnum::AIndices(Box::new(n.as_ref().ok_or(err)?.clone()))),
459 NodeMut::AIndirection(n) => Ok(NodeEnum::AIndirection(Box::new(n.as_ref().ok_or(err)?.clone()))),
460 NodeMut::AArrayExpr(n) => Ok(NodeEnum::AArrayExpr(n.as_ref().ok_or(err)?.clone())),
461 NodeMut::ResTarget(n) => Ok(NodeEnum::ResTarget(Box::new(n.as_ref().ok_or(err)?.clone()))),
462 NodeMut::MultiAssignRef(n) => Ok(NodeEnum::MultiAssignRef(Box::new(n.as_ref().ok_or(err)?.clone()))),
463 NodeMut::TypeCast(n) => Ok(NodeEnum::TypeCast(Box::new(n.as_ref().ok_or(err)?.clone()))),
464 NodeMut::CollateClause(n) => Ok(NodeEnum::CollateClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
465 NodeMut::SortBy(n) => Ok(NodeEnum::SortBy(Box::new(n.as_ref().ok_or(err)?.clone()))),
466 NodeMut::WindowDef(n) => Ok(NodeEnum::WindowDef(Box::new(n.as_ref().ok_or(err)?.clone()))),
467 NodeMut::RangeSubselect(n) => Ok(NodeEnum::RangeSubselect(Box::new(n.as_ref().ok_or(err)?.clone()))),
468 NodeMut::RangeFunction(n) => Ok(NodeEnum::RangeFunction(n.as_ref().ok_or(err)?.clone())),
469 NodeMut::RangeTableSample(n) => Ok(NodeEnum::RangeTableSample(Box::new(n.as_ref().ok_or(err)?.clone()))),
470 NodeMut::RangeTableFunc(n) => Ok(NodeEnum::RangeTableFunc(Box::new(n.as_ref().ok_or(err)?.clone()))),
471 NodeMut::RangeTableFuncCol(n) => Ok(NodeEnum::RangeTableFuncCol(Box::new(n.as_ref().ok_or(err)?.clone()))),
472 NodeMut::TypeName(n) => Ok(NodeEnum::TypeName(n.as_ref().ok_or(err)?.clone())),
473 NodeMut::ColumnDef(n) => Ok(NodeEnum::ColumnDef(Box::new(n.as_ref().ok_or(err)?.clone()))),
474 NodeMut::IndexElem(n) => Ok(NodeEnum::IndexElem(Box::new(n.as_ref().ok_or(err)?.clone()))),
475 NodeMut::Constraint(n) => Ok(NodeEnum::Constraint(Box::new(n.as_ref().ok_or(err)?.clone()))),
476 NodeMut::DefElem(n) => Ok(NodeEnum::DefElem(Box::new(n.as_ref().ok_or(err)?.clone()))),
477 NodeMut::RangeTblEntry(n) => Ok(NodeEnum::RangeTblEntry(Box::new(n.as_ref().ok_or(err)?.clone()))),
478 NodeMut::RangeTblFunction(n) => Ok(NodeEnum::RangeTblFunction(Box::new(n.as_ref().ok_or(err)?.clone()))),
479 NodeMut::TableSampleClause(n) => Ok(NodeEnum::TableSampleClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
480 NodeMut::WithCheckOption(n) => Ok(NodeEnum::WithCheckOption(Box::new(n.as_ref().ok_or(err)?.clone()))),
481 NodeMut::SortGroupClause(n) => Ok(NodeEnum::SortGroupClause(n.as_ref().ok_or(err)?.clone())),
482 NodeMut::GroupingSet(n) => Ok(NodeEnum::GroupingSet(n.as_ref().ok_or(err)?.clone())),
483 NodeMut::WindowClause(n) => Ok(NodeEnum::WindowClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
484 NodeMut::ObjectWithArgs(n) => Ok(NodeEnum::ObjectWithArgs(n.as_ref().ok_or(err)?.clone())),
485 NodeMut::AccessPriv(n) => Ok(NodeEnum::AccessPriv(n.as_ref().ok_or(err)?.clone())),
486 NodeMut::CreateOpClassItem(n) => Ok(NodeEnum::CreateOpClassItem(n.as_ref().ok_or(err)?.clone())),
487 NodeMut::TableLikeClause(n) => Ok(NodeEnum::TableLikeClause(n.as_ref().ok_or(err)?.clone())),
488 NodeMut::FunctionParameter(n) => Ok(NodeEnum::FunctionParameter(Box::new(n.as_ref().ok_or(err)?.clone()))),
489 NodeMut::LockingClause(n) => Ok(NodeEnum::LockingClause(n.as_ref().ok_or(err)?.clone())),
490 NodeMut::RowMarkClause(n) => Ok(NodeEnum::RowMarkClause(n.as_ref().ok_or(err)?.clone())),
491 NodeMut::XmlSerialize(n) => Ok(NodeEnum::XmlSerialize(Box::new(n.as_ref().ok_or(err)?.clone()))),
492 NodeMut::WithClause(n) => Ok(NodeEnum::WithClause(n.as_ref().ok_or(err)?.clone())),
493 NodeMut::InferClause(n) => Ok(NodeEnum::InferClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
494 NodeMut::OnConflictClause(n) => Ok(NodeEnum::OnConflictClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
495 NodeMut::CommonTableExpr(n) => Ok(NodeEnum::CommonTableExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
496 NodeMut::RoleSpec(n) => Ok(NodeEnum::RoleSpec(n.as_ref().ok_or(err)?.clone())),
497 NodeMut::TriggerTransition(n) => Ok(NodeEnum::TriggerTransition(n.as_ref().ok_or(err)?.clone())),
498 NodeMut::PartitionElem(n) => Ok(NodeEnum::PartitionElem(Box::new(n.as_ref().ok_or(err)?.clone()))),
499 NodeMut::PartitionSpec(n) => Ok(NodeEnum::PartitionSpec(n.as_ref().ok_or(err)?.clone())),
500 NodeMut::PartitionBoundSpec(n) => Ok(NodeEnum::PartitionBoundSpec(n.as_ref().ok_or(err)?.clone())),
501 NodeMut::PartitionRangeDatum(n) => Ok(NodeEnum::PartitionRangeDatum(Box::new(n.as_ref().ok_or(err)?.clone()))),
502 NodeMut::PartitionCmd(n) => Ok(NodeEnum::PartitionCmd(n.as_ref().ok_or(err)?.clone())),
503 NodeMut::VacuumRelation(n) => Ok(NodeEnum::VacuumRelation(n.as_ref().ok_or(err)?.clone())),
504 NodeMut::InlineCodeBlock(n) => Ok(NodeEnum::InlineCodeBlock(n.as_ref().ok_or(err)?.clone())),
505 NodeMut::CallContext(n) => Ok(NodeEnum::CallContext(n.as_ref().ok_or(err)?.clone())),
506 NodeMut::Integer(n) => Ok(NodeEnum::Integer(n.as_ref().ok_or(err)?.clone())),
507 NodeMut::Float(n) => Ok(NodeEnum::Float(n.as_ref().ok_or(err)?.clone())),
508 NodeMut::Boolean(n) => Ok(NodeEnum::Boolean(n.as_ref().ok_or(err)?.clone())),
509 NodeMut::String(n) => Ok(NodeEnum::String(n.as_ref().ok_or(err)?.clone())),
510 NodeMut::BitString(n) => Ok(NodeEnum::BitString(n.as_ref().ok_or(err)?.clone())),
511 NodeMut::List(n) => Ok(NodeEnum::List(n.as_ref().ok_or(err)?.clone())),
512 NodeMut::IntList(n) => Ok(NodeEnum::IntList(n.as_ref().ok_or(err)?.clone())),
513 NodeMut::OidList(n) => Ok(NodeEnum::OidList(n.as_ref().ok_or(err)?.clone())),
514 NodeMut::MergeStmt(n) => Ok(NodeEnum::MergeStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
515 NodeMut::MergeAction(n) => Ok(NodeEnum::MergeAction(Box::new(n.as_ref().ok_or(err)?.clone()))),
516 NodeMut::AlterDatabaseRefreshCollStmt(n) => Ok(NodeEnum::AlterDatabaseRefreshCollStmt(n.as_ref().ok_or(err)?.clone())),
517 NodeMut::ReturnStmt(n) => Ok(NodeEnum::ReturnStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
518 NodeMut::PlassignStmt(n) => Ok(NodeEnum::PlassignStmt(Box::new(n.as_ref().ok_or(err)?.clone()))),
519 NodeMut::StatsElem(n) => Ok(NodeEnum::StatsElem(Box::new(n.as_ref().ok_or(err)?.clone()))),
520 NodeMut::CtesearchClause(n) => Ok(NodeEnum::CtesearchClause(n.as_ref().ok_or(err)?.clone())),
521 NodeMut::CtecycleClause(n) => Ok(NodeEnum::CtecycleClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
522 NodeMut::MergeWhenClause(n) => Ok(NodeEnum::MergeWhenClause(Box::new(n.as_ref().ok_or(err)?.clone()))),
523 NodeMut::PublicationObjSpec(n) => Ok(NodeEnum::PublicationObjSpec(Box::new(n.as_ref().ok_or(err)?.clone()))),
524 NodeMut::PublicationTable(n) => Ok(NodeEnum::PublicationTable(Box::new(n.as_ref().ok_or(err)?.clone()))),
525 NodeMut::JsonFormat(n) => Ok(NodeEnum::JsonFormat(n.as_ref().ok_or(err)?.clone())),
526 NodeMut::JsonReturning(n) => Ok(NodeEnum::JsonReturning(n.as_ref().ok_or(err)?.clone())),
527 NodeMut::JsonValueExpr(n) => Ok(NodeEnum::JsonValueExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
528 NodeMut::JsonConstructorExpr(n) => Ok(NodeEnum::JsonConstructorExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
529 NodeMut::JsonIsPredicate(n) => Ok(NodeEnum::JsonIsPredicate(Box::new(n.as_ref().ok_or(err)?.clone()))),
530 NodeMut::JsonOutput(n) => Ok(NodeEnum::JsonOutput(n.as_ref().ok_or(err)?.clone())),
531 NodeMut::JsonKeyValue(n) => Ok(NodeEnum::JsonKeyValue(Box::new(n.as_ref().ok_or(err)?.clone()))),
532 NodeMut::JsonObjectConstructor(n) => Ok(NodeEnum::JsonObjectConstructor(n.as_ref().ok_or(err)?.clone())),
533 NodeMut::JsonArrayConstructor(n) => Ok(NodeEnum::JsonArrayConstructor(n.as_ref().ok_or(err)?.clone())),
534 NodeMut::JsonArrayQueryConstructor(n) => Ok(NodeEnum::JsonArrayQueryConstructor(Box::new(n.as_ref().ok_or(err)?.clone()))),
535 NodeMut::JsonAggConstructor(n) => Ok(NodeEnum::JsonAggConstructor(Box::new(n.as_ref().ok_or(err)?.clone()))),
536 NodeMut::JsonObjectAgg(n) => Ok(NodeEnum::JsonObjectAgg(Box::new(n.as_ref().ok_or(err)?.clone()))),
537 NodeMut::JsonArrayAgg(n) => Ok(NodeEnum::JsonArrayAgg(Box::new(n.as_ref().ok_or(err)?.clone()))),
538 NodeMut::RtepermissionInfo(n) => Ok(NodeEnum::RtepermissionInfo(n.as_ref().ok_or(err)?.clone())),
539 NodeMut::WindowFuncRunCondition(n) => Ok(NodeEnum::WindowFuncRunCondition(Box::new(n.as_ref().ok_or(err)?.clone()))),
540 NodeMut::MergeSupportFunc(n) => Ok(NodeEnum::MergeSupportFunc(Box::new(n.as_ref().ok_or(err)?.clone()))),
541 NodeMut::JsonBehavior(n) => Ok(NodeEnum::JsonBehavior(Box::new(n.as_ref().ok_or(err)?.clone()))),
542 NodeMut::JsonExpr(n) => Ok(NodeEnum::JsonExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
543 NodeMut::JsonTablePath(n) => Ok(NodeEnum::JsonTablePath(n.as_ref().ok_or(err)?.clone())),
544 NodeMut::JsonTablePathScan(n) => Ok(NodeEnum::JsonTablePathScan(Box::new(n.as_ref().ok_or(err)?.clone()))),
545 NodeMut::JsonTableSiblingJoin(n) => Ok(NodeEnum::JsonTableSiblingJoin(Box::new(n.as_ref().ok_or(err)?.clone()))),
546 NodeMut::SinglePartitionSpec(n) => Ok(NodeEnum::SinglePartitionSpec(n.as_ref().ok_or(err)?.clone())),
547 NodeMut::JsonArgument(n) => Ok(NodeEnum::JsonArgument(Box::new(n.as_ref().ok_or(err)?.clone()))),
548 NodeMut::JsonFuncExpr(n) => Ok(NodeEnum::JsonFuncExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
549 NodeMut::JsonTablePathSpec(n) => Ok(NodeEnum::JsonTablePathSpec(Box::new(n.as_ref().ok_or(err)?.clone()))),
550 NodeMut::JsonTable(n) => Ok(NodeEnum::JsonTable(Box::new(n.as_ref().ok_or(err)?.clone()))),
551 NodeMut::JsonTableColumn(n) => Ok(NodeEnum::JsonTableColumn(Box::new(n.as_ref().ok_or(err)?.clone()))),
552 NodeMut::JsonParseExpr(n) => Ok(NodeEnum::JsonParseExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
553 NodeMut::JsonScalarExpr(n) => Ok(NodeEnum::JsonScalarExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
554 NodeMut::JsonSerializeExpr(n) => Ok(NodeEnum::JsonSerializeExpr(Box::new(n.as_ref().ok_or(err)?.clone()))),
555 }
556 }
557 }
558}