Skip to main content

pg_query/
node_structs.rs

1use crate::*;
2
3impl Node {
4    pub fn deparse(&self) -> Result<String> {
5        crate::deparse(&protobuf::ParseResult {
6            version: crate::bindings::PG_VERSION_NUM as i32,
7            stmts: vec![protobuf::RawStmt {
8                stmt: Some(Box::new(self.clone())),
9                stmt_location: 0,
10                stmt_len: 0,
11            }],
12        })
13    }
14}
15
16impl protobuf::Alias {
17    pub fn to_ref(&self) -> NodeRef<'_> {
18        NodeRef::Alias(self)
19    }
20    pub fn to_mut(&mut self) -> NodeMut {
21        NodeMut::Alias(self)
22    }
23}
24
25impl protobuf::RangeVar {
26    pub fn to_ref(&self) -> NodeRef<'_> {
27        NodeRef::RangeVar(self)
28    }
29    pub fn to_mut(&mut self) -> NodeMut {
30        NodeMut::RangeVar(self)
31    }
32}
33
34impl protobuf::TableFunc {
35    pub fn to_ref(&self) -> NodeRef<'_> {
36        NodeRef::TableFunc(self)
37    }
38    pub fn to_mut(&mut self) -> NodeMut {
39        NodeMut::TableFunc(self)
40    }
41}
42
43impl protobuf::Var {
44    pub fn to_ref(&self) -> NodeRef<'_> {
45        NodeRef::Var(self)
46    }
47    pub fn to_mut(&mut self) -> NodeMut {
48        NodeMut::Var(self)
49    }
50}
51
52impl protobuf::Param {
53    pub fn to_ref(&self) -> NodeRef<'_> {
54        NodeRef::Param(self)
55    }
56    pub fn to_mut(&mut self) -> NodeMut {
57        NodeMut::Param(self)
58    }
59}
60
61impl protobuf::Aggref {
62    pub fn to_ref(&self) -> NodeRef<'_> {
63        NodeRef::Aggref(self)
64    }
65    pub fn to_mut(&mut self) -> NodeMut {
66        NodeMut::Aggref(self)
67    }
68}
69
70impl protobuf::GroupingFunc {
71    pub fn to_ref(&self) -> NodeRef<'_> {
72        NodeRef::GroupingFunc(self)
73    }
74    pub fn to_mut(&mut self) -> NodeMut {
75        NodeMut::GroupingFunc(self)
76    }
77}
78
79impl protobuf::WindowFunc {
80    pub fn to_ref(&self) -> NodeRef<'_> {
81        NodeRef::WindowFunc(self)
82    }
83    pub fn to_mut(&mut self) -> NodeMut {
84        NodeMut::WindowFunc(self)
85    }
86}
87
88impl protobuf::SubscriptingRef {
89    pub fn to_ref(&self) -> NodeRef<'_> {
90        NodeRef::SubscriptingRef(self)
91    }
92    pub fn to_mut(&mut self) -> NodeMut {
93        NodeMut::SubscriptingRef(self)
94    }
95}
96
97impl protobuf::FuncExpr {
98    pub fn to_ref(&self) -> NodeRef<'_> {
99        NodeRef::FuncExpr(self)
100    }
101    pub fn to_mut(&mut self) -> NodeMut {
102        NodeMut::FuncExpr(self)
103    }
104}
105
106impl protobuf::NamedArgExpr {
107    pub fn to_ref(&self) -> NodeRef<'_> {
108        NodeRef::NamedArgExpr(self)
109    }
110    pub fn to_mut(&mut self) -> NodeMut {
111        NodeMut::NamedArgExpr(self)
112    }
113}
114
115impl protobuf::OpExpr {
116    pub fn to_ref(&self) -> NodeRef<'_> {
117        NodeRef::OpExpr(self)
118    }
119    pub fn to_mut(&mut self) -> NodeMut {
120        NodeMut::OpExpr(self)
121    }
122}
123
124impl protobuf::DistinctExpr {
125    pub fn to_ref(&self) -> NodeRef<'_> {
126        NodeRef::DistinctExpr(self)
127    }
128    pub fn to_mut(&mut self) -> NodeMut {
129        NodeMut::DistinctExpr(self)
130    }
131}
132
133impl protobuf::NullIfExpr {
134    pub fn to_ref(&self) -> NodeRef<'_> {
135        NodeRef::NullIfExpr(self)
136    }
137    pub fn to_mut(&mut self) -> NodeMut {
138        NodeMut::NullIfExpr(self)
139    }
140}
141
142impl protobuf::ScalarArrayOpExpr {
143    pub fn to_ref(&self) -> NodeRef<'_> {
144        NodeRef::ScalarArrayOpExpr(self)
145    }
146    pub fn to_mut(&mut self) -> NodeMut {
147        NodeMut::ScalarArrayOpExpr(self)
148    }
149}
150
151impl protobuf::BoolExpr {
152    pub fn to_ref(&self) -> NodeRef<'_> {
153        NodeRef::BoolExpr(self)
154    }
155    pub fn to_mut(&mut self) -> NodeMut {
156        NodeMut::BoolExpr(self)
157    }
158}
159
160impl protobuf::SubLink {
161    pub fn to_ref(&self) -> NodeRef<'_> {
162        NodeRef::SubLink(self)
163    }
164    pub fn to_mut(&mut self) -> NodeMut {
165        NodeMut::SubLink(self)
166    }
167}
168
169impl protobuf::SubPlan {
170    pub fn to_ref(&self) -> NodeRef<'_> {
171        NodeRef::SubPlan(self)
172    }
173    pub fn to_mut(&mut self) -> NodeMut {
174        NodeMut::SubPlan(self)
175    }
176}
177
178impl protobuf::AlternativeSubPlan {
179    pub fn to_ref(&self) -> NodeRef<'_> {
180        NodeRef::AlternativeSubPlan(self)
181    }
182    pub fn to_mut(&mut self) -> NodeMut {
183        NodeMut::AlternativeSubPlan(self)
184    }
185}
186
187impl protobuf::FieldSelect {
188    pub fn to_ref(&self) -> NodeRef<'_> {
189        NodeRef::FieldSelect(self)
190    }
191    pub fn to_mut(&mut self) -> NodeMut {
192        NodeMut::FieldSelect(self)
193    }
194}
195
196impl protobuf::FieldStore {
197    pub fn to_ref(&self) -> NodeRef<'_> {
198        NodeRef::FieldStore(self)
199    }
200    pub fn to_mut(&mut self) -> NodeMut {
201        NodeMut::FieldStore(self)
202    }
203}
204
205impl protobuf::RelabelType {
206    pub fn to_ref(&self) -> NodeRef<'_> {
207        NodeRef::RelabelType(self)
208    }
209    pub fn to_mut(&mut self) -> NodeMut {
210        NodeMut::RelabelType(self)
211    }
212}
213
214impl protobuf::CoerceViaIo {
215    pub fn to_ref(&self) -> NodeRef<'_> {
216        NodeRef::CoerceViaIo(self)
217    }
218    pub fn to_mut(&mut self) -> NodeMut {
219        NodeMut::CoerceViaIo(self)
220    }
221}
222
223impl protobuf::ArrayCoerceExpr {
224    pub fn to_ref(&self) -> NodeRef<'_> {
225        NodeRef::ArrayCoerceExpr(self)
226    }
227    pub fn to_mut(&mut self) -> NodeMut {
228        NodeMut::ArrayCoerceExpr(self)
229    }
230}
231
232impl protobuf::ConvertRowtypeExpr {
233    pub fn to_ref(&self) -> NodeRef<'_> {
234        NodeRef::ConvertRowtypeExpr(self)
235    }
236    pub fn to_mut(&mut self) -> NodeMut {
237        NodeMut::ConvertRowtypeExpr(self)
238    }
239}
240
241impl protobuf::CollateExpr {
242    pub fn to_ref(&self) -> NodeRef<'_> {
243        NodeRef::CollateExpr(self)
244    }
245    pub fn to_mut(&mut self) -> NodeMut {
246        NodeMut::CollateExpr(self)
247    }
248}
249
250impl protobuf::CaseExpr {
251    pub fn to_ref(&self) -> NodeRef<'_> {
252        NodeRef::CaseExpr(self)
253    }
254    pub fn to_mut(&mut self) -> NodeMut {
255        NodeMut::CaseExpr(self)
256    }
257}
258
259impl protobuf::CaseWhen {
260    pub fn to_ref(&self) -> NodeRef<'_> {
261        NodeRef::CaseWhen(self)
262    }
263    pub fn to_mut(&mut self) -> NodeMut {
264        NodeMut::CaseWhen(self)
265    }
266}
267
268impl protobuf::CaseTestExpr {
269    pub fn to_ref(&self) -> NodeRef<'_> {
270        NodeRef::CaseTestExpr(self)
271    }
272    pub fn to_mut(&mut self) -> NodeMut {
273        NodeMut::CaseTestExpr(self)
274    }
275}
276
277impl protobuf::ArrayExpr {
278    pub fn to_ref(&self) -> NodeRef<'_> {
279        NodeRef::ArrayExpr(self)
280    }
281    pub fn to_mut(&mut self) -> NodeMut {
282        NodeMut::ArrayExpr(self)
283    }
284}
285
286impl protobuf::RowExpr {
287    pub fn to_ref(&self) -> NodeRef<'_> {
288        NodeRef::RowExpr(self)
289    }
290    pub fn to_mut(&mut self) -> NodeMut {
291        NodeMut::RowExpr(self)
292    }
293}
294
295impl protobuf::RowCompareExpr {
296    pub fn to_ref(&self) -> NodeRef<'_> {
297        NodeRef::RowCompareExpr(self)
298    }
299    pub fn to_mut(&mut self) -> NodeMut {
300        NodeMut::RowCompareExpr(self)
301    }
302}
303
304impl protobuf::CoalesceExpr {
305    pub fn to_ref(&self) -> NodeRef<'_> {
306        NodeRef::CoalesceExpr(self)
307    }
308    pub fn to_mut(&mut self) -> NodeMut {
309        NodeMut::CoalesceExpr(self)
310    }
311}
312
313impl protobuf::MinMaxExpr {
314    pub fn to_ref(&self) -> NodeRef<'_> {
315        NodeRef::MinMaxExpr(self)
316    }
317    pub fn to_mut(&mut self) -> NodeMut {
318        NodeMut::MinMaxExpr(self)
319    }
320}
321
322impl protobuf::SqlValueFunction {
323    pub fn to_ref(&self) -> NodeRef<'_> {
324        NodeRef::SqlvalueFunction(self)
325    }
326    pub fn to_mut(&mut self) -> NodeMut {
327        NodeMut::SqlvalueFunction(self)
328    }
329}
330
331impl protobuf::XmlExpr {
332    pub fn to_ref(&self) -> NodeRef<'_> {
333        NodeRef::XmlExpr(self)
334    }
335    pub fn to_mut(&mut self) -> NodeMut {
336        NodeMut::XmlExpr(self)
337    }
338}
339
340impl protobuf::NullTest {
341    pub fn to_ref(&self) -> NodeRef<'_> {
342        NodeRef::NullTest(self)
343    }
344    pub fn to_mut(&mut self) -> NodeMut {
345        NodeMut::NullTest(self)
346    }
347}
348
349impl protobuf::BooleanTest {
350    pub fn to_ref(&self) -> NodeRef<'_> {
351        NodeRef::BooleanTest(self)
352    }
353    pub fn to_mut(&mut self) -> NodeMut {
354        NodeMut::BooleanTest(self)
355    }
356}
357
358impl protobuf::CoerceToDomain {
359    pub fn to_ref(&self) -> NodeRef<'_> {
360        NodeRef::CoerceToDomain(self)
361    }
362    pub fn to_mut(&mut self) -> NodeMut {
363        NodeMut::CoerceToDomain(self)
364    }
365}
366
367impl protobuf::CoerceToDomainValue {
368    pub fn to_ref(&self) -> NodeRef<'_> {
369        NodeRef::CoerceToDomainValue(self)
370    }
371    pub fn to_mut(&mut self) -> NodeMut {
372        NodeMut::CoerceToDomainValue(self)
373    }
374}
375
376impl protobuf::SetToDefault {
377    pub fn to_ref(&self) -> NodeRef<'_> {
378        NodeRef::SetToDefault(self)
379    }
380    pub fn to_mut(&mut self) -> NodeMut {
381        NodeMut::SetToDefault(self)
382    }
383}
384
385impl protobuf::CurrentOfExpr {
386    pub fn to_ref(&self) -> NodeRef<'_> {
387        NodeRef::CurrentOfExpr(self)
388    }
389    pub fn to_mut(&mut self) -> NodeMut {
390        NodeMut::CurrentOfExpr(self)
391    }
392}
393
394impl protobuf::NextValueExpr {
395    pub fn to_ref(&self) -> NodeRef<'_> {
396        NodeRef::NextValueExpr(self)
397    }
398    pub fn to_mut(&mut self) -> NodeMut {
399        NodeMut::NextValueExpr(self)
400    }
401}
402
403impl protobuf::InferenceElem {
404    pub fn to_ref(&self) -> NodeRef<'_> {
405        NodeRef::InferenceElem(self)
406    }
407    pub fn to_mut(&mut self) -> NodeMut {
408        NodeMut::InferenceElem(self)
409    }
410}
411
412impl protobuf::TargetEntry {
413    pub fn to_ref(&self) -> NodeRef<'_> {
414        NodeRef::TargetEntry(self)
415    }
416    pub fn to_mut(&mut self) -> NodeMut {
417        NodeMut::TargetEntry(self)
418    }
419}
420
421impl protobuf::RangeTblRef {
422    pub fn to_ref(&self) -> NodeRef<'_> {
423        NodeRef::RangeTblRef(self)
424    }
425    pub fn to_mut(&mut self) -> NodeMut {
426        NodeMut::RangeTblRef(self)
427    }
428}
429
430impl protobuf::JoinExpr {
431    pub fn to_ref(&self) -> NodeRef<'_> {
432        NodeRef::JoinExpr(self)
433    }
434    pub fn to_mut(&mut self) -> NodeMut {
435        NodeMut::JoinExpr(self)
436    }
437}
438
439impl protobuf::FromExpr {
440    pub fn to_ref(&self) -> NodeRef<'_> {
441        NodeRef::FromExpr(self)
442    }
443    pub fn to_mut(&mut self) -> NodeMut {
444        NodeMut::FromExpr(self)
445    }
446}
447
448impl protobuf::OnConflictExpr {
449    pub fn to_ref(&self) -> NodeRef<'_> {
450        NodeRef::OnConflictExpr(self)
451    }
452    pub fn to_mut(&mut self) -> NodeMut {
453        NodeMut::OnConflictExpr(self)
454    }
455}
456
457impl protobuf::IntoClause {
458    pub fn to_ref(&self) -> NodeRef<'_> {
459        NodeRef::IntoClause(self)
460    }
461    pub fn to_mut(&mut self) -> NodeMut {
462        NodeMut::IntoClause(self)
463    }
464}
465
466impl protobuf::RawStmt {
467    pub fn to_ref(&self) -> NodeRef<'_> {
468        NodeRef::RawStmt(self)
469    }
470    pub fn to_mut(&mut self) -> NodeMut {
471        NodeMut::RawStmt(self)
472    }
473}
474
475impl protobuf::Query {
476    pub fn to_ref(&self) -> NodeRef<'_> {
477        NodeRef::Query(self)
478    }
479    pub fn to_mut(&mut self) -> NodeMut {
480        NodeMut::Query(self)
481    }
482}
483
484impl protobuf::InsertStmt {
485    pub fn to_ref(&self) -> NodeRef<'_> {
486        NodeRef::InsertStmt(self)
487    }
488    pub fn to_mut(&mut self) -> NodeMut {
489        NodeMut::InsertStmt(self)
490    }
491}
492
493impl protobuf::DeleteStmt {
494    pub fn to_ref(&self) -> NodeRef<'_> {
495        NodeRef::DeleteStmt(self)
496    }
497    pub fn to_mut(&mut self) -> NodeMut {
498        NodeMut::DeleteStmt(self)
499    }
500}
501
502impl protobuf::UpdateStmt {
503    pub fn to_ref(&self) -> NodeRef<'_> {
504        NodeRef::UpdateStmt(self)
505    }
506    pub fn to_mut(&mut self) -> NodeMut {
507        NodeMut::UpdateStmt(self)
508    }
509}
510
511impl protobuf::SelectStmt {
512    pub fn to_ref(&self) -> NodeRef<'_> {
513        NodeRef::SelectStmt(self)
514    }
515    pub fn to_mut(&mut self) -> NodeMut {
516        NodeMut::SelectStmt(self)
517    }
518}
519
520impl protobuf::AlterTableStmt {
521    pub fn to_ref(&self) -> NodeRef<'_> {
522        NodeRef::AlterTableStmt(self)
523    }
524    pub fn to_mut(&mut self) -> NodeMut {
525        NodeMut::AlterTableStmt(self)
526    }
527}
528
529impl protobuf::AlterTableCmd {
530    pub fn to_ref(&self) -> NodeRef<'_> {
531        NodeRef::AlterTableCmd(self)
532    }
533    pub fn to_mut(&mut self) -> NodeMut {
534        NodeMut::AlterTableCmd(self)
535    }
536}
537
538impl protobuf::AlterDomainStmt {
539    pub fn to_ref(&self) -> NodeRef<'_> {
540        NodeRef::AlterDomainStmt(self)
541    }
542    pub fn to_mut(&mut self) -> NodeMut {
543        NodeMut::AlterDomainStmt(self)
544    }
545}
546
547impl protobuf::SetOperationStmt {
548    pub fn to_ref(&self) -> NodeRef<'_> {
549        NodeRef::SetOperationStmt(self)
550    }
551    pub fn to_mut(&mut self) -> NodeMut {
552        NodeMut::SetOperationStmt(self)
553    }
554}
555
556impl protobuf::GrantStmt {
557    pub fn to_ref(&self) -> NodeRef<'_> {
558        NodeRef::GrantStmt(self)
559    }
560    pub fn to_mut(&mut self) -> NodeMut {
561        NodeMut::GrantStmt(self)
562    }
563}
564
565impl protobuf::GrantRoleStmt {
566    pub fn to_ref(&self) -> NodeRef<'_> {
567        NodeRef::GrantRoleStmt(self)
568    }
569    pub fn to_mut(&mut self) -> NodeMut {
570        NodeMut::GrantRoleStmt(self)
571    }
572}
573
574impl protobuf::AlterDefaultPrivilegesStmt {
575    pub fn to_ref(&self) -> NodeRef<'_> {
576        NodeRef::AlterDefaultPrivilegesStmt(self)
577    }
578    pub fn to_mut(&mut self) -> NodeMut {
579        NodeMut::AlterDefaultPrivilegesStmt(self)
580    }
581}
582
583impl protobuf::ClosePortalStmt {
584    pub fn to_ref(&self) -> NodeRef<'_> {
585        NodeRef::ClosePortalStmt(self)
586    }
587    pub fn to_mut(&mut self) -> NodeMut {
588        NodeMut::ClosePortalStmt(self)
589    }
590}
591
592impl protobuf::ClusterStmt {
593    pub fn to_ref(&self) -> NodeRef<'_> {
594        NodeRef::ClusterStmt(self)
595    }
596    pub fn to_mut(&mut self) -> NodeMut {
597        NodeMut::ClusterStmt(self)
598    }
599}
600
601impl protobuf::CopyStmt {
602    pub fn to_ref(&self) -> NodeRef<'_> {
603        NodeRef::CopyStmt(self)
604    }
605    pub fn to_mut(&mut self) -> NodeMut {
606        NodeMut::CopyStmt(self)
607    }
608}
609
610impl protobuf::CreateStmt {
611    pub fn to_ref(&self) -> NodeRef<'_> {
612        NodeRef::CreateStmt(self)
613    }
614    pub fn to_mut(&mut self) -> NodeMut {
615        NodeMut::CreateStmt(self)
616    }
617}
618
619impl protobuf::DefineStmt {
620    pub fn to_ref(&self) -> NodeRef<'_> {
621        NodeRef::DefineStmt(self)
622    }
623    pub fn to_mut(&mut self) -> NodeMut {
624        NodeMut::DefineStmt(self)
625    }
626}
627
628impl protobuf::DropStmt {
629    pub fn to_ref(&self) -> NodeRef<'_> {
630        NodeRef::DropStmt(self)
631    }
632    pub fn to_mut(&mut self) -> NodeMut {
633        NodeMut::DropStmt(self)
634    }
635}
636
637impl protobuf::TruncateStmt {
638    pub fn to_ref(&self) -> NodeRef<'_> {
639        NodeRef::TruncateStmt(self)
640    }
641    pub fn to_mut(&mut self) -> NodeMut {
642        NodeMut::TruncateStmt(self)
643    }
644}
645
646impl protobuf::CommentStmt {
647    pub fn to_ref(&self) -> NodeRef<'_> {
648        NodeRef::CommentStmt(self)
649    }
650    pub fn to_mut(&mut self) -> NodeMut {
651        NodeMut::CommentStmt(self)
652    }
653}
654
655impl protobuf::FetchStmt {
656    pub fn to_ref(&self) -> NodeRef<'_> {
657        NodeRef::FetchStmt(self)
658    }
659    pub fn to_mut(&mut self) -> NodeMut {
660        NodeMut::FetchStmt(self)
661    }
662}
663
664impl protobuf::IndexStmt {
665    pub fn to_ref(&self) -> NodeRef<'_> {
666        NodeRef::IndexStmt(self)
667    }
668    pub fn to_mut(&mut self) -> NodeMut {
669        NodeMut::IndexStmt(self)
670    }
671}
672
673impl protobuf::CreateFunctionStmt {
674    pub fn to_ref(&self) -> NodeRef<'_> {
675        NodeRef::CreateFunctionStmt(self)
676    }
677    pub fn to_mut(&mut self) -> NodeMut {
678        NodeMut::CreateFunctionStmt(self)
679    }
680}
681
682impl protobuf::AlterFunctionStmt {
683    pub fn to_ref(&self) -> NodeRef<'_> {
684        NodeRef::AlterFunctionStmt(self)
685    }
686    pub fn to_mut(&mut self) -> NodeMut {
687        NodeMut::AlterFunctionStmt(self)
688    }
689}
690
691impl protobuf::DoStmt {
692    pub fn to_ref(&self) -> NodeRef<'_> {
693        NodeRef::DoStmt(self)
694    }
695    pub fn to_mut(&mut self) -> NodeMut {
696        NodeMut::DoStmt(self)
697    }
698}
699
700impl protobuf::RenameStmt {
701    pub fn to_ref(&self) -> NodeRef<'_> {
702        NodeRef::RenameStmt(self)
703    }
704    pub fn to_mut(&mut self) -> NodeMut {
705        NodeMut::RenameStmt(self)
706    }
707}
708
709impl protobuf::RuleStmt {
710    pub fn to_ref(&self) -> NodeRef<'_> {
711        NodeRef::RuleStmt(self)
712    }
713    pub fn to_mut(&mut self) -> NodeMut {
714        NodeMut::RuleStmt(self)
715    }
716}
717
718impl protobuf::NotifyStmt {
719    pub fn to_ref(&self) -> NodeRef<'_> {
720        NodeRef::NotifyStmt(self)
721    }
722    pub fn to_mut(&mut self) -> NodeMut {
723        NodeMut::NotifyStmt(self)
724    }
725}
726
727impl protobuf::ListenStmt {
728    pub fn to_ref(&self) -> NodeRef<'_> {
729        NodeRef::ListenStmt(self)
730    }
731    pub fn to_mut(&mut self) -> NodeMut {
732        NodeMut::ListenStmt(self)
733    }
734}
735
736impl protobuf::UnlistenStmt {
737    pub fn to_ref(&self) -> NodeRef<'_> {
738        NodeRef::UnlistenStmt(self)
739    }
740    pub fn to_mut(&mut self) -> NodeMut {
741        NodeMut::UnlistenStmt(self)
742    }
743}
744
745impl protobuf::TransactionStmt {
746    pub fn to_ref(&self) -> NodeRef<'_> {
747        NodeRef::TransactionStmt(self)
748    }
749    pub fn to_mut(&mut self) -> NodeMut {
750        NodeMut::TransactionStmt(self)
751    }
752}
753
754impl protobuf::ViewStmt {
755    pub fn to_ref(&self) -> NodeRef<'_> {
756        NodeRef::ViewStmt(self)
757    }
758    pub fn to_mut(&mut self) -> NodeMut {
759        NodeMut::ViewStmt(self)
760    }
761}
762
763impl protobuf::LoadStmt {
764    pub fn to_ref(&self) -> NodeRef<'_> {
765        NodeRef::LoadStmt(self)
766    }
767    pub fn to_mut(&mut self) -> NodeMut {
768        NodeMut::LoadStmt(self)
769    }
770}
771
772impl protobuf::CreateDomainStmt {
773    pub fn to_ref(&self) -> NodeRef<'_> {
774        NodeRef::CreateDomainStmt(self)
775    }
776    pub fn to_mut(&mut self) -> NodeMut {
777        NodeMut::CreateDomainStmt(self)
778    }
779}
780
781impl protobuf::CreatedbStmt {
782    pub fn to_ref(&self) -> NodeRef<'_> {
783        NodeRef::CreatedbStmt(self)
784    }
785    pub fn to_mut(&mut self) -> NodeMut {
786        NodeMut::CreatedbStmt(self)
787    }
788}
789
790impl protobuf::DropdbStmt {
791    pub fn to_ref(&self) -> NodeRef<'_> {
792        NodeRef::DropdbStmt(self)
793    }
794    pub fn to_mut(&mut self) -> NodeMut {
795        NodeMut::DropdbStmt(self)
796    }
797}
798
799impl protobuf::VacuumStmt {
800    pub fn to_ref(&self) -> NodeRef<'_> {
801        NodeRef::VacuumStmt(self)
802    }
803    pub fn to_mut(&mut self) -> NodeMut {
804        NodeMut::VacuumStmt(self)
805    }
806}
807
808impl protobuf::ExplainStmt {
809    pub fn to_ref(&self) -> NodeRef<'_> {
810        NodeRef::ExplainStmt(self)
811    }
812    pub fn to_mut(&mut self) -> NodeMut {
813        NodeMut::ExplainStmt(self)
814    }
815}
816
817impl protobuf::CreateTableAsStmt {
818    pub fn to_ref(&self) -> NodeRef<'_> {
819        NodeRef::CreateTableAsStmt(self)
820    }
821    pub fn to_mut(&mut self) -> NodeMut {
822        NodeMut::CreateTableAsStmt(self)
823    }
824}
825
826impl protobuf::CreateSeqStmt {
827    pub fn to_ref(&self) -> NodeRef<'_> {
828        NodeRef::CreateSeqStmt(self)
829    }
830    pub fn to_mut(&mut self) -> NodeMut {
831        NodeMut::CreateSeqStmt(self)
832    }
833}
834
835impl protobuf::AlterSeqStmt {
836    pub fn to_ref(&self) -> NodeRef<'_> {
837        NodeRef::AlterSeqStmt(self)
838    }
839    pub fn to_mut(&mut self) -> NodeMut {
840        NodeMut::AlterSeqStmt(self)
841    }
842}
843
844impl protobuf::VariableSetStmt {
845    pub fn to_ref(&self) -> NodeRef<'_> {
846        NodeRef::VariableSetStmt(self)
847    }
848    pub fn to_mut(&mut self) -> NodeMut {
849        NodeMut::VariableSetStmt(self)
850    }
851}
852
853impl protobuf::VariableShowStmt {
854    pub fn to_ref(&self) -> NodeRef<'_> {
855        NodeRef::VariableShowStmt(self)
856    }
857    pub fn to_mut(&mut self) -> NodeMut {
858        NodeMut::VariableShowStmt(self)
859    }
860}
861
862impl protobuf::DiscardStmt {
863    pub fn to_ref(&self) -> NodeRef<'_> {
864        NodeRef::DiscardStmt(self)
865    }
866    pub fn to_mut(&mut self) -> NodeMut {
867        NodeMut::DiscardStmt(self)
868    }
869}
870
871impl protobuf::CreateTrigStmt {
872    pub fn to_ref(&self) -> NodeRef<'_> {
873        NodeRef::CreateTrigStmt(self)
874    }
875    pub fn to_mut(&mut self) -> NodeMut {
876        NodeMut::CreateTrigStmt(self)
877    }
878}
879
880impl protobuf::CreatePLangStmt {
881    pub fn to_ref(&self) -> NodeRef<'_> {
882        NodeRef::CreatePlangStmt(self)
883    }
884    pub fn to_mut(&mut self) -> NodeMut {
885        NodeMut::CreatePlangStmt(self)
886    }
887}
888
889impl protobuf::CreateRoleStmt {
890    pub fn to_ref(&self) -> NodeRef<'_> {
891        NodeRef::CreateRoleStmt(self)
892    }
893    pub fn to_mut(&mut self) -> NodeMut {
894        NodeMut::CreateRoleStmt(self)
895    }
896}
897
898impl protobuf::AlterRoleStmt {
899    pub fn to_ref(&self) -> NodeRef<'_> {
900        NodeRef::AlterRoleStmt(self)
901    }
902    pub fn to_mut(&mut self) -> NodeMut {
903        NodeMut::AlterRoleStmt(self)
904    }
905}
906
907impl protobuf::DropRoleStmt {
908    pub fn to_ref(&self) -> NodeRef<'_> {
909        NodeRef::DropRoleStmt(self)
910    }
911    pub fn to_mut(&mut self) -> NodeMut {
912        NodeMut::DropRoleStmt(self)
913    }
914}
915
916impl protobuf::LockStmt {
917    pub fn to_ref(&self) -> NodeRef<'_> {
918        NodeRef::LockStmt(self)
919    }
920    pub fn to_mut(&mut self) -> NodeMut {
921        NodeMut::LockStmt(self)
922    }
923}
924
925impl protobuf::ConstraintsSetStmt {
926    pub fn to_ref(&self) -> NodeRef<'_> {
927        NodeRef::ConstraintsSetStmt(self)
928    }
929    pub fn to_mut(&mut self) -> NodeMut {
930        NodeMut::ConstraintsSetStmt(self)
931    }
932}
933
934impl protobuf::ReindexStmt {
935    pub fn to_ref(&self) -> NodeRef<'_> {
936        NodeRef::ReindexStmt(self)
937    }
938    pub fn to_mut(&mut self) -> NodeMut {
939        NodeMut::ReindexStmt(self)
940    }
941}
942
943impl protobuf::CheckPointStmt {
944    pub fn to_ref(&self) -> NodeRef<'_> {
945        NodeRef::CheckPointStmt(self)
946    }
947    pub fn to_mut(&mut self) -> NodeMut {
948        NodeMut::CheckPointStmt(self)
949    }
950}
951
952impl protobuf::CreateSchemaStmt {
953    pub fn to_ref(&self) -> NodeRef<'_> {
954        NodeRef::CreateSchemaStmt(self)
955    }
956    pub fn to_mut(&mut self) -> NodeMut {
957        NodeMut::CreateSchemaStmt(self)
958    }
959}
960
961impl protobuf::AlterDatabaseStmt {
962    pub fn to_ref(&self) -> NodeRef<'_> {
963        NodeRef::AlterDatabaseStmt(self)
964    }
965    pub fn to_mut(&mut self) -> NodeMut {
966        NodeMut::AlterDatabaseStmt(self)
967    }
968}
969
970impl protobuf::AlterDatabaseSetStmt {
971    pub fn to_ref(&self) -> NodeRef<'_> {
972        NodeRef::AlterDatabaseSetStmt(self)
973    }
974    pub fn to_mut(&mut self) -> NodeMut {
975        NodeMut::AlterDatabaseSetStmt(self)
976    }
977}
978
979impl protobuf::AlterRoleSetStmt {
980    pub fn to_ref(&self) -> NodeRef<'_> {
981        NodeRef::AlterRoleSetStmt(self)
982    }
983    pub fn to_mut(&mut self) -> NodeMut {
984        NodeMut::AlterRoleSetStmt(self)
985    }
986}
987
988impl protobuf::CreateConversionStmt {
989    pub fn to_ref(&self) -> NodeRef<'_> {
990        NodeRef::CreateConversionStmt(self)
991    }
992    pub fn to_mut(&mut self) -> NodeMut {
993        NodeMut::CreateConversionStmt(self)
994    }
995}
996
997impl protobuf::CreateCastStmt {
998    pub fn to_ref(&self) -> NodeRef<'_> {
999        NodeRef::CreateCastStmt(self)
1000    }
1001    pub fn to_mut(&mut self) -> NodeMut {
1002        NodeMut::CreateCastStmt(self)
1003    }
1004}
1005
1006impl protobuf::CreateOpClassStmt {
1007    pub fn to_ref(&self) -> NodeRef<'_> {
1008        NodeRef::CreateOpClassStmt(self)
1009    }
1010    pub fn to_mut(&mut self) -> NodeMut {
1011        NodeMut::CreateOpClassStmt(self)
1012    }
1013}
1014
1015impl protobuf::CreateOpFamilyStmt {
1016    pub fn to_ref(&self) -> NodeRef<'_> {
1017        NodeRef::CreateOpFamilyStmt(self)
1018    }
1019    pub fn to_mut(&mut self) -> NodeMut {
1020        NodeMut::CreateOpFamilyStmt(self)
1021    }
1022}
1023
1024impl protobuf::AlterOpFamilyStmt {
1025    pub fn to_ref(&self) -> NodeRef<'_> {
1026        NodeRef::AlterOpFamilyStmt(self)
1027    }
1028    pub fn to_mut(&mut self) -> NodeMut {
1029        NodeMut::AlterOpFamilyStmt(self)
1030    }
1031}
1032
1033impl protobuf::PrepareStmt {
1034    pub fn to_ref(&self) -> NodeRef<'_> {
1035        NodeRef::PrepareStmt(self)
1036    }
1037    pub fn to_mut(&mut self) -> NodeMut {
1038        NodeMut::PrepareStmt(self)
1039    }
1040}
1041
1042impl protobuf::ExecuteStmt {
1043    pub fn to_ref(&self) -> NodeRef<'_> {
1044        NodeRef::ExecuteStmt(self)
1045    }
1046    pub fn to_mut(&mut self) -> NodeMut {
1047        NodeMut::ExecuteStmt(self)
1048    }
1049}
1050
1051impl protobuf::DeallocateStmt {
1052    pub fn to_ref(&self) -> NodeRef<'_> {
1053        NodeRef::DeallocateStmt(self)
1054    }
1055    pub fn to_mut(&mut self) -> NodeMut {
1056        NodeMut::DeallocateStmt(self)
1057    }
1058}
1059
1060impl protobuf::DeclareCursorStmt {
1061    pub fn to_ref(&self) -> NodeRef<'_> {
1062        NodeRef::DeclareCursorStmt(self)
1063    }
1064    pub fn to_mut(&mut self) -> NodeMut {
1065        NodeMut::DeclareCursorStmt(self)
1066    }
1067}
1068
1069impl protobuf::CreateTableSpaceStmt {
1070    pub fn to_ref(&self) -> NodeRef<'_> {
1071        NodeRef::CreateTableSpaceStmt(self)
1072    }
1073    pub fn to_mut(&mut self) -> NodeMut {
1074        NodeMut::CreateTableSpaceStmt(self)
1075    }
1076}
1077
1078impl protobuf::DropTableSpaceStmt {
1079    pub fn to_ref(&self) -> NodeRef<'_> {
1080        NodeRef::DropTableSpaceStmt(self)
1081    }
1082    pub fn to_mut(&mut self) -> NodeMut {
1083        NodeMut::DropTableSpaceStmt(self)
1084    }
1085}
1086
1087impl protobuf::AlterObjectDependsStmt {
1088    pub fn to_ref(&self) -> NodeRef<'_> {
1089        NodeRef::AlterObjectDependsStmt(self)
1090    }
1091    pub fn to_mut(&mut self) -> NodeMut {
1092        NodeMut::AlterObjectDependsStmt(self)
1093    }
1094}
1095
1096impl protobuf::AlterObjectSchemaStmt {
1097    pub fn to_ref(&self) -> NodeRef<'_> {
1098        NodeRef::AlterObjectSchemaStmt(self)
1099    }
1100    pub fn to_mut(&mut self) -> NodeMut {
1101        NodeMut::AlterObjectSchemaStmt(self)
1102    }
1103}
1104
1105impl protobuf::AlterOwnerStmt {
1106    pub fn to_ref(&self) -> NodeRef<'_> {
1107        NodeRef::AlterOwnerStmt(self)
1108    }
1109    pub fn to_mut(&mut self) -> NodeMut {
1110        NodeMut::AlterOwnerStmt(self)
1111    }
1112}
1113
1114impl protobuf::AlterOperatorStmt {
1115    pub fn to_ref(&self) -> NodeRef<'_> {
1116        NodeRef::AlterOperatorStmt(self)
1117    }
1118    pub fn to_mut(&mut self) -> NodeMut {
1119        NodeMut::AlterOperatorStmt(self)
1120    }
1121}
1122
1123impl protobuf::AlterTypeStmt {
1124    pub fn to_ref(&self) -> NodeRef<'_> {
1125        NodeRef::AlterTypeStmt(self)
1126    }
1127    pub fn to_mut(&mut self) -> NodeMut {
1128        NodeMut::AlterTypeStmt(self)
1129    }
1130}
1131
1132impl protobuf::DropOwnedStmt {
1133    pub fn to_ref(&self) -> NodeRef<'_> {
1134        NodeRef::DropOwnedStmt(self)
1135    }
1136    pub fn to_mut(&mut self) -> NodeMut {
1137        NodeMut::DropOwnedStmt(self)
1138    }
1139}
1140
1141impl protobuf::ReassignOwnedStmt {
1142    pub fn to_ref(&self) -> NodeRef<'_> {
1143        NodeRef::ReassignOwnedStmt(self)
1144    }
1145    pub fn to_mut(&mut self) -> NodeMut {
1146        NodeMut::ReassignOwnedStmt(self)
1147    }
1148}
1149
1150impl protobuf::CompositeTypeStmt {
1151    pub fn to_ref(&self) -> NodeRef<'_> {
1152        NodeRef::CompositeTypeStmt(self)
1153    }
1154    pub fn to_mut(&mut self) -> NodeMut {
1155        NodeMut::CompositeTypeStmt(self)
1156    }
1157}
1158
1159impl protobuf::CreateEnumStmt {
1160    pub fn to_ref(&self) -> NodeRef<'_> {
1161        NodeRef::CreateEnumStmt(self)
1162    }
1163    pub fn to_mut(&mut self) -> NodeMut {
1164        NodeMut::CreateEnumStmt(self)
1165    }
1166}
1167
1168impl protobuf::CreateRangeStmt {
1169    pub fn to_ref(&self) -> NodeRef<'_> {
1170        NodeRef::CreateRangeStmt(self)
1171    }
1172    pub fn to_mut(&mut self) -> NodeMut {
1173        NodeMut::CreateRangeStmt(self)
1174    }
1175}
1176
1177impl protobuf::AlterEnumStmt {
1178    pub fn to_ref(&self) -> NodeRef<'_> {
1179        NodeRef::AlterEnumStmt(self)
1180    }
1181    pub fn to_mut(&mut self) -> NodeMut {
1182        NodeMut::AlterEnumStmt(self)
1183    }
1184}
1185
1186impl protobuf::AlterTsDictionaryStmt {
1187    pub fn to_ref(&self) -> NodeRef<'_> {
1188        NodeRef::AlterTsdictionaryStmt(self)
1189    }
1190    pub fn to_mut(&mut self) -> NodeMut {
1191        NodeMut::AlterTsdictionaryStmt(self)
1192    }
1193}
1194
1195impl protobuf::AlterTsConfigurationStmt {
1196    pub fn to_ref(&self) -> NodeRef<'_> {
1197        NodeRef::AlterTsconfigurationStmt(self)
1198    }
1199    pub fn to_mut(&mut self) -> NodeMut {
1200        NodeMut::AlterTsconfigurationStmt(self)
1201    }
1202}
1203
1204impl protobuf::CreateFdwStmt {
1205    pub fn to_ref(&self) -> NodeRef<'_> {
1206        NodeRef::CreateFdwStmt(self)
1207    }
1208    pub fn to_mut(&mut self) -> NodeMut {
1209        NodeMut::CreateFdwStmt(self)
1210    }
1211}
1212
1213impl protobuf::AlterFdwStmt {
1214    pub fn to_ref(&self) -> NodeRef<'_> {
1215        NodeRef::AlterFdwStmt(self)
1216    }
1217    pub fn to_mut(&mut self) -> NodeMut {
1218        NodeMut::AlterFdwStmt(self)
1219    }
1220}
1221
1222impl protobuf::CreateForeignServerStmt {
1223    pub fn to_ref(&self) -> NodeRef<'_> {
1224        NodeRef::CreateForeignServerStmt(self)
1225    }
1226    pub fn to_mut(&mut self) -> NodeMut {
1227        NodeMut::CreateForeignServerStmt(self)
1228    }
1229}
1230
1231impl protobuf::AlterForeignServerStmt {
1232    pub fn to_ref(&self) -> NodeRef<'_> {
1233        NodeRef::AlterForeignServerStmt(self)
1234    }
1235    pub fn to_mut(&mut self) -> NodeMut {
1236        NodeMut::AlterForeignServerStmt(self)
1237    }
1238}
1239
1240impl protobuf::CreateUserMappingStmt {
1241    pub fn to_ref(&self) -> NodeRef<'_> {
1242        NodeRef::CreateUserMappingStmt(self)
1243    }
1244    pub fn to_mut(&mut self) -> NodeMut {
1245        NodeMut::CreateUserMappingStmt(self)
1246    }
1247}
1248
1249impl protobuf::AlterUserMappingStmt {
1250    pub fn to_ref(&self) -> NodeRef<'_> {
1251        NodeRef::AlterUserMappingStmt(self)
1252    }
1253    pub fn to_mut(&mut self) -> NodeMut {
1254        NodeMut::AlterUserMappingStmt(self)
1255    }
1256}
1257
1258impl protobuf::DropUserMappingStmt {
1259    pub fn to_ref(&self) -> NodeRef<'_> {
1260        NodeRef::DropUserMappingStmt(self)
1261    }
1262    pub fn to_mut(&mut self) -> NodeMut {
1263        NodeMut::DropUserMappingStmt(self)
1264    }
1265}
1266
1267impl protobuf::AlterTableSpaceOptionsStmt {
1268    pub fn to_ref(&self) -> NodeRef<'_> {
1269        NodeRef::AlterTableSpaceOptionsStmt(self)
1270    }
1271    pub fn to_mut(&mut self) -> NodeMut {
1272        NodeMut::AlterTableSpaceOptionsStmt(self)
1273    }
1274}
1275
1276impl protobuf::AlterTableMoveAllStmt {
1277    pub fn to_ref(&self) -> NodeRef<'_> {
1278        NodeRef::AlterTableMoveAllStmt(self)
1279    }
1280    pub fn to_mut(&mut self) -> NodeMut {
1281        NodeMut::AlterTableMoveAllStmt(self)
1282    }
1283}
1284
1285impl protobuf::SecLabelStmt {
1286    pub fn to_ref(&self) -> NodeRef<'_> {
1287        NodeRef::SecLabelStmt(self)
1288    }
1289    pub fn to_mut(&mut self) -> NodeMut {
1290        NodeMut::SecLabelStmt(self)
1291    }
1292}
1293
1294impl protobuf::CreateForeignTableStmt {
1295    pub fn to_ref(&self) -> NodeRef<'_> {
1296        NodeRef::CreateForeignTableStmt(self)
1297    }
1298    pub fn to_mut(&mut self) -> NodeMut {
1299        NodeMut::CreateForeignTableStmt(self)
1300    }
1301}
1302
1303impl protobuf::ImportForeignSchemaStmt {
1304    pub fn to_ref(&self) -> NodeRef<'_> {
1305        NodeRef::ImportForeignSchemaStmt(self)
1306    }
1307    pub fn to_mut(&mut self) -> NodeMut {
1308        NodeMut::ImportForeignSchemaStmt(self)
1309    }
1310}
1311
1312impl protobuf::CreateExtensionStmt {
1313    pub fn to_ref(&self) -> NodeRef<'_> {
1314        NodeRef::CreateExtensionStmt(self)
1315    }
1316    pub fn to_mut(&mut self) -> NodeMut {
1317        NodeMut::CreateExtensionStmt(self)
1318    }
1319}
1320
1321impl protobuf::AlterExtensionStmt {
1322    pub fn to_ref(&self) -> NodeRef<'_> {
1323        NodeRef::AlterExtensionStmt(self)
1324    }
1325    pub fn to_mut(&mut self) -> NodeMut {
1326        NodeMut::AlterExtensionStmt(self)
1327    }
1328}
1329
1330impl protobuf::AlterExtensionContentsStmt {
1331    pub fn to_ref(&self) -> NodeRef<'_> {
1332        NodeRef::AlterExtensionContentsStmt(self)
1333    }
1334    pub fn to_mut(&mut self) -> NodeMut {
1335        NodeMut::AlterExtensionContentsStmt(self)
1336    }
1337}
1338
1339impl protobuf::CreateEventTrigStmt {
1340    pub fn to_ref(&self) -> NodeRef<'_> {
1341        NodeRef::CreateEventTrigStmt(self)
1342    }
1343    pub fn to_mut(&mut self) -> NodeMut {
1344        NodeMut::CreateEventTrigStmt(self)
1345    }
1346}
1347
1348impl protobuf::AlterEventTrigStmt {
1349    pub fn to_ref(&self) -> NodeRef<'_> {
1350        NodeRef::AlterEventTrigStmt(self)
1351    }
1352    pub fn to_mut(&mut self) -> NodeMut {
1353        NodeMut::AlterEventTrigStmt(self)
1354    }
1355}
1356
1357impl protobuf::RefreshMatViewStmt {
1358    pub fn to_ref(&self) -> NodeRef<'_> {
1359        NodeRef::RefreshMatViewStmt(self)
1360    }
1361    pub fn to_mut(&mut self) -> NodeMut {
1362        NodeMut::RefreshMatViewStmt(self)
1363    }
1364}
1365
1366impl protobuf::ReplicaIdentityStmt {
1367    pub fn to_ref(&self) -> NodeRef<'_> {
1368        NodeRef::ReplicaIdentityStmt(self)
1369    }
1370    pub fn to_mut(&mut self) -> NodeMut {
1371        NodeMut::ReplicaIdentityStmt(self)
1372    }
1373}
1374
1375impl protobuf::AlterSystemStmt {
1376    pub fn to_ref(&self) -> NodeRef<'_> {
1377        NodeRef::AlterSystemStmt(self)
1378    }
1379    pub fn to_mut(&mut self) -> NodeMut {
1380        NodeMut::AlterSystemStmt(self)
1381    }
1382}
1383
1384impl protobuf::CreatePolicyStmt {
1385    pub fn to_ref(&self) -> NodeRef<'_> {
1386        NodeRef::CreatePolicyStmt(self)
1387    }
1388    pub fn to_mut(&mut self) -> NodeMut {
1389        NodeMut::CreatePolicyStmt(self)
1390    }
1391}
1392
1393impl protobuf::AlterPolicyStmt {
1394    pub fn to_ref(&self) -> NodeRef<'_> {
1395        NodeRef::AlterPolicyStmt(self)
1396    }
1397    pub fn to_mut(&mut self) -> NodeMut {
1398        NodeMut::AlterPolicyStmt(self)
1399    }
1400}
1401
1402impl protobuf::CreateTransformStmt {
1403    pub fn to_ref(&self) -> NodeRef<'_> {
1404        NodeRef::CreateTransformStmt(self)
1405    }
1406    pub fn to_mut(&mut self) -> NodeMut {
1407        NodeMut::CreateTransformStmt(self)
1408    }
1409}
1410
1411impl protobuf::CreateAmStmt {
1412    pub fn to_ref(&self) -> NodeRef<'_> {
1413        NodeRef::CreateAmStmt(self)
1414    }
1415    pub fn to_mut(&mut self) -> NodeMut {
1416        NodeMut::CreateAmStmt(self)
1417    }
1418}
1419
1420impl protobuf::CreatePublicationStmt {
1421    pub fn to_ref(&self) -> NodeRef<'_> {
1422        NodeRef::CreatePublicationStmt(self)
1423    }
1424    pub fn to_mut(&mut self) -> NodeMut {
1425        NodeMut::CreatePublicationStmt(self)
1426    }
1427}
1428
1429impl protobuf::AlterPublicationStmt {
1430    pub fn to_ref(&self) -> NodeRef<'_> {
1431        NodeRef::AlterPublicationStmt(self)
1432    }
1433    pub fn to_mut(&mut self) -> NodeMut {
1434        NodeMut::AlterPublicationStmt(self)
1435    }
1436}
1437
1438impl protobuf::CreateSubscriptionStmt {
1439    pub fn to_ref(&self) -> NodeRef<'_> {
1440        NodeRef::CreateSubscriptionStmt(self)
1441    }
1442    pub fn to_mut(&mut self) -> NodeMut {
1443        NodeMut::CreateSubscriptionStmt(self)
1444    }
1445}
1446
1447impl protobuf::AlterSubscriptionStmt {
1448    pub fn to_ref(&self) -> NodeRef<'_> {
1449        NodeRef::AlterSubscriptionStmt(self)
1450    }
1451    pub fn to_mut(&mut self) -> NodeMut {
1452        NodeMut::AlterSubscriptionStmt(self)
1453    }
1454}
1455
1456impl protobuf::DropSubscriptionStmt {
1457    pub fn to_ref(&self) -> NodeRef<'_> {
1458        NodeRef::DropSubscriptionStmt(self)
1459    }
1460    pub fn to_mut(&mut self) -> NodeMut {
1461        NodeMut::DropSubscriptionStmt(self)
1462    }
1463}
1464
1465impl protobuf::CreateStatsStmt {
1466    pub fn to_ref(&self) -> NodeRef<'_> {
1467        NodeRef::CreateStatsStmt(self)
1468    }
1469    pub fn to_mut(&mut self) -> NodeMut {
1470        NodeMut::CreateStatsStmt(self)
1471    }
1472}
1473
1474impl protobuf::AlterCollationStmt {
1475    pub fn to_ref(&self) -> NodeRef<'_> {
1476        NodeRef::AlterCollationStmt(self)
1477    }
1478    pub fn to_mut(&mut self) -> NodeMut {
1479        NodeMut::AlterCollationStmt(self)
1480    }
1481}
1482
1483impl protobuf::CallStmt {
1484    pub fn to_ref(&self) -> NodeRef<'_> {
1485        NodeRef::CallStmt(self)
1486    }
1487    pub fn to_mut(&mut self) -> NodeMut {
1488        NodeMut::CallStmt(self)
1489    }
1490}
1491
1492impl protobuf::AlterStatsStmt {
1493    pub fn to_ref(&self) -> NodeRef<'_> {
1494        NodeRef::AlterStatsStmt(self)
1495    }
1496    pub fn to_mut(&mut self) -> NodeMut {
1497        NodeMut::AlterStatsStmt(self)
1498    }
1499}
1500
1501impl protobuf::AExpr {
1502    pub fn to_ref(&self) -> NodeRef<'_> {
1503        NodeRef::AExpr(self)
1504    }
1505    pub fn to_mut(&mut self) -> NodeMut {
1506        NodeMut::AExpr(self)
1507    }
1508}
1509
1510impl protobuf::ColumnRef {
1511    pub fn to_ref(&self) -> NodeRef<'_> {
1512        NodeRef::ColumnRef(self)
1513    }
1514    pub fn to_mut(&mut self) -> NodeMut {
1515        NodeMut::ColumnRef(self)
1516    }
1517}
1518
1519impl protobuf::ParamRef {
1520    pub fn to_ref(&self) -> NodeRef<'_> {
1521        NodeRef::ParamRef(self)
1522    }
1523    pub fn to_mut(&mut self) -> NodeMut {
1524        NodeMut::ParamRef(self)
1525    }
1526}
1527
1528impl protobuf::AConst {
1529    pub fn to_ref(&self) -> NodeRef<'_> {
1530        NodeRef::AConst(self)
1531    }
1532    pub fn to_mut(&mut self) -> NodeMut {
1533        NodeMut::AConst(self)
1534    }
1535}
1536
1537impl protobuf::FuncCall {
1538    pub fn to_ref(&self) -> NodeRef<'_> {
1539        NodeRef::FuncCall(self)
1540    }
1541    pub fn to_mut(&mut self) -> NodeMut {
1542        NodeMut::FuncCall(self)
1543    }
1544}
1545
1546impl protobuf::AStar {
1547    pub fn to_ref(&self) -> NodeRef<'_> {
1548        NodeRef::AStar(self)
1549    }
1550    pub fn to_mut(&mut self) -> NodeMut {
1551        NodeMut::AStar(self)
1552    }
1553}
1554
1555impl protobuf::AIndices {
1556    pub fn to_ref(&self) -> NodeRef<'_> {
1557        NodeRef::AIndices(self)
1558    }
1559    pub fn to_mut(&mut self) -> NodeMut {
1560        NodeMut::AIndices(self)
1561    }
1562}
1563
1564impl protobuf::AIndirection {
1565    pub fn to_ref(&self) -> NodeRef<'_> {
1566        NodeRef::AIndirection(self)
1567    }
1568    pub fn to_mut(&mut self) -> NodeMut {
1569        NodeMut::AIndirection(self)
1570    }
1571}
1572
1573impl protobuf::AArrayExpr {
1574    pub fn to_ref(&self) -> NodeRef<'_> {
1575        NodeRef::AArrayExpr(self)
1576    }
1577    pub fn to_mut(&mut self) -> NodeMut {
1578        NodeMut::AArrayExpr(self)
1579    }
1580}
1581
1582impl protobuf::ResTarget {
1583    pub fn to_ref(&self) -> NodeRef<'_> {
1584        NodeRef::ResTarget(self)
1585    }
1586    pub fn to_mut(&mut self) -> NodeMut {
1587        NodeMut::ResTarget(self)
1588    }
1589}
1590
1591impl protobuf::MultiAssignRef {
1592    pub fn to_ref(&self) -> NodeRef<'_> {
1593        NodeRef::MultiAssignRef(self)
1594    }
1595    pub fn to_mut(&mut self) -> NodeMut {
1596        NodeMut::MultiAssignRef(self)
1597    }
1598}
1599
1600impl protobuf::TypeCast {
1601    pub fn to_ref(&self) -> NodeRef<'_> {
1602        NodeRef::TypeCast(self)
1603    }
1604    pub fn to_mut(&mut self) -> NodeMut {
1605        NodeMut::TypeCast(self)
1606    }
1607}
1608
1609impl protobuf::CollateClause {
1610    pub fn to_ref(&self) -> NodeRef<'_> {
1611        NodeRef::CollateClause(self)
1612    }
1613    pub fn to_mut(&mut self) -> NodeMut {
1614        NodeMut::CollateClause(self)
1615    }
1616}
1617
1618impl protobuf::SortBy {
1619    pub fn to_ref(&self) -> NodeRef<'_> {
1620        NodeRef::SortBy(self)
1621    }
1622    pub fn to_mut(&mut self) -> NodeMut {
1623        NodeMut::SortBy(self)
1624    }
1625}
1626
1627impl protobuf::WindowDef {
1628    pub fn to_ref(&self) -> NodeRef<'_> {
1629        NodeRef::WindowDef(self)
1630    }
1631    pub fn to_mut(&mut self) -> NodeMut {
1632        NodeMut::WindowDef(self)
1633    }
1634}
1635
1636impl protobuf::RangeSubselect {
1637    pub fn to_ref(&self) -> NodeRef<'_> {
1638        NodeRef::RangeSubselect(self)
1639    }
1640    pub fn to_mut(&mut self) -> NodeMut {
1641        NodeMut::RangeSubselect(self)
1642    }
1643}
1644
1645impl protobuf::RangeFunction {
1646    pub fn to_ref(&self) -> NodeRef<'_> {
1647        NodeRef::RangeFunction(self)
1648    }
1649    pub fn to_mut(&mut self) -> NodeMut {
1650        NodeMut::RangeFunction(self)
1651    }
1652}
1653
1654impl protobuf::RangeTableSample {
1655    pub fn to_ref(&self) -> NodeRef<'_> {
1656        NodeRef::RangeTableSample(self)
1657    }
1658    pub fn to_mut(&mut self) -> NodeMut {
1659        NodeMut::RangeTableSample(self)
1660    }
1661}
1662
1663impl protobuf::RangeTableFunc {
1664    pub fn to_ref(&self) -> NodeRef<'_> {
1665        NodeRef::RangeTableFunc(self)
1666    }
1667    pub fn to_mut(&mut self) -> NodeMut {
1668        NodeMut::RangeTableFunc(self)
1669    }
1670}
1671
1672impl protobuf::RangeTableFuncCol {
1673    pub fn to_ref(&self) -> NodeRef<'_> {
1674        NodeRef::RangeTableFuncCol(self)
1675    }
1676    pub fn to_mut(&mut self) -> NodeMut {
1677        NodeMut::RangeTableFuncCol(self)
1678    }
1679}
1680
1681impl protobuf::TypeName {
1682    pub fn to_ref(&self) -> NodeRef<'_> {
1683        NodeRef::TypeName(self)
1684    }
1685    pub fn to_mut(&mut self) -> NodeMut {
1686        NodeMut::TypeName(self)
1687    }
1688}
1689
1690impl protobuf::ColumnDef {
1691    pub fn to_ref(&self) -> NodeRef<'_> {
1692        NodeRef::ColumnDef(self)
1693    }
1694    pub fn to_mut(&mut self) -> NodeMut {
1695        NodeMut::ColumnDef(self)
1696    }
1697}
1698
1699impl protobuf::IndexElem {
1700    pub fn to_ref(&self) -> NodeRef<'_> {
1701        NodeRef::IndexElem(self)
1702    }
1703    pub fn to_mut(&mut self) -> NodeMut {
1704        NodeMut::IndexElem(self)
1705    }
1706}
1707
1708impl protobuf::Constraint {
1709    pub fn to_ref(&self) -> NodeRef<'_> {
1710        NodeRef::Constraint(self)
1711    }
1712    pub fn to_mut(&mut self) -> NodeMut {
1713        NodeMut::Constraint(self)
1714    }
1715}
1716
1717impl protobuf::DefElem {
1718    pub fn to_ref(&self) -> NodeRef<'_> {
1719        NodeRef::DefElem(self)
1720    }
1721    pub fn to_mut(&mut self) -> NodeMut {
1722        NodeMut::DefElem(self)
1723    }
1724}
1725
1726impl protobuf::RangeTblEntry {
1727    pub fn to_ref(&self) -> NodeRef<'_> {
1728        NodeRef::RangeTblEntry(self)
1729    }
1730    pub fn to_mut(&mut self) -> NodeMut {
1731        NodeMut::RangeTblEntry(self)
1732    }
1733}
1734
1735impl protobuf::RangeTblFunction {
1736    pub fn to_ref(&self) -> NodeRef<'_> {
1737        NodeRef::RangeTblFunction(self)
1738    }
1739    pub fn to_mut(&mut self) -> NodeMut {
1740        NodeMut::RangeTblFunction(self)
1741    }
1742}
1743
1744impl protobuf::TableSampleClause {
1745    pub fn to_ref(&self) -> NodeRef<'_> {
1746        NodeRef::TableSampleClause(self)
1747    }
1748    pub fn to_mut(&mut self) -> NodeMut {
1749        NodeMut::TableSampleClause(self)
1750    }
1751}
1752
1753impl protobuf::WithCheckOption {
1754    pub fn to_ref(&self) -> NodeRef<'_> {
1755        NodeRef::WithCheckOption(self)
1756    }
1757    pub fn to_mut(&mut self) -> NodeMut {
1758        NodeMut::WithCheckOption(self)
1759    }
1760}
1761
1762impl protobuf::SortGroupClause {
1763    pub fn to_ref(&self) -> NodeRef<'_> {
1764        NodeRef::SortGroupClause(self)
1765    }
1766    pub fn to_mut(&mut self) -> NodeMut {
1767        NodeMut::SortGroupClause(self)
1768    }
1769}
1770
1771impl protobuf::GroupingSet {
1772    pub fn to_ref(&self) -> NodeRef<'_> {
1773        NodeRef::GroupingSet(self)
1774    }
1775    pub fn to_mut(&mut self) -> NodeMut {
1776        NodeMut::GroupingSet(self)
1777    }
1778}
1779
1780impl protobuf::WindowClause {
1781    pub fn to_ref(&self) -> NodeRef<'_> {
1782        NodeRef::WindowClause(self)
1783    }
1784    pub fn to_mut(&mut self) -> NodeMut {
1785        NodeMut::WindowClause(self)
1786    }
1787}
1788
1789impl protobuf::ObjectWithArgs {
1790    pub fn to_ref(&self) -> NodeRef<'_> {
1791        NodeRef::ObjectWithArgs(self)
1792    }
1793    pub fn to_mut(&mut self) -> NodeMut {
1794        NodeMut::ObjectWithArgs(self)
1795    }
1796}
1797
1798impl protobuf::AccessPriv {
1799    pub fn to_ref(&self) -> NodeRef<'_> {
1800        NodeRef::AccessPriv(self)
1801    }
1802    pub fn to_mut(&mut self) -> NodeMut {
1803        NodeMut::AccessPriv(self)
1804    }
1805}
1806
1807impl protobuf::CreateOpClassItem {
1808    pub fn to_ref(&self) -> NodeRef<'_> {
1809        NodeRef::CreateOpClassItem(self)
1810    }
1811    pub fn to_mut(&mut self) -> NodeMut {
1812        NodeMut::CreateOpClassItem(self)
1813    }
1814}
1815
1816impl protobuf::TableLikeClause {
1817    pub fn to_ref(&self) -> NodeRef<'_> {
1818        NodeRef::TableLikeClause(self)
1819    }
1820    pub fn to_mut(&mut self) -> NodeMut {
1821        NodeMut::TableLikeClause(self)
1822    }
1823}
1824
1825impl protobuf::FunctionParameter {
1826    pub fn to_ref(&self) -> NodeRef<'_> {
1827        NodeRef::FunctionParameter(self)
1828    }
1829    pub fn to_mut(&mut self) -> NodeMut {
1830        NodeMut::FunctionParameter(self)
1831    }
1832}
1833
1834impl protobuf::LockingClause {
1835    pub fn to_ref(&self) -> NodeRef<'_> {
1836        NodeRef::LockingClause(self)
1837    }
1838    pub fn to_mut(&mut self) -> NodeMut {
1839        NodeMut::LockingClause(self)
1840    }
1841}
1842
1843impl protobuf::RowMarkClause {
1844    pub fn to_ref(&self) -> NodeRef<'_> {
1845        NodeRef::RowMarkClause(self)
1846    }
1847    pub fn to_mut(&mut self) -> NodeMut {
1848        NodeMut::RowMarkClause(self)
1849    }
1850}
1851
1852impl protobuf::XmlSerialize {
1853    pub fn to_ref(&self) -> NodeRef<'_> {
1854        NodeRef::XmlSerialize(self)
1855    }
1856    pub fn to_mut(&mut self) -> NodeMut {
1857        NodeMut::XmlSerialize(self)
1858    }
1859}
1860
1861impl protobuf::WithClause {
1862    pub fn to_ref(&self) -> NodeRef<'_> {
1863        NodeRef::WithClause(self)
1864    }
1865    pub fn to_mut(&mut self) -> NodeMut {
1866        NodeMut::WithClause(self)
1867    }
1868}
1869
1870impl protobuf::InferClause {
1871    pub fn to_ref(&self) -> NodeRef<'_> {
1872        NodeRef::InferClause(self)
1873    }
1874    pub fn to_mut(&mut self) -> NodeMut {
1875        NodeMut::InferClause(self)
1876    }
1877}
1878
1879impl protobuf::OnConflictClause {
1880    pub fn to_ref(&self) -> NodeRef<'_> {
1881        NodeRef::OnConflictClause(self)
1882    }
1883    pub fn to_mut(&mut self) -> NodeMut {
1884        NodeMut::OnConflictClause(self)
1885    }
1886}
1887
1888impl protobuf::CommonTableExpr {
1889    pub fn to_ref(&self) -> NodeRef<'_> {
1890        NodeRef::CommonTableExpr(self)
1891    }
1892    pub fn to_mut(&mut self) -> NodeMut {
1893        NodeMut::CommonTableExpr(self)
1894    }
1895}
1896
1897impl protobuf::RoleSpec {
1898    pub fn to_ref(&self) -> NodeRef<'_> {
1899        NodeRef::RoleSpec(self)
1900    }
1901    pub fn to_mut(&mut self) -> NodeMut {
1902        NodeMut::RoleSpec(self)
1903    }
1904}
1905
1906impl protobuf::TriggerTransition {
1907    pub fn to_ref(&self) -> NodeRef<'_> {
1908        NodeRef::TriggerTransition(self)
1909    }
1910    pub fn to_mut(&mut self) -> NodeMut {
1911        NodeMut::TriggerTransition(self)
1912    }
1913}
1914
1915impl protobuf::PartitionElem {
1916    pub fn to_ref(&self) -> NodeRef<'_> {
1917        NodeRef::PartitionElem(self)
1918    }
1919    pub fn to_mut(&mut self) -> NodeMut {
1920        NodeMut::PartitionElem(self)
1921    }
1922}
1923
1924impl protobuf::PartitionSpec {
1925    pub fn to_ref(&self) -> NodeRef<'_> {
1926        NodeRef::PartitionSpec(self)
1927    }
1928    pub fn to_mut(&mut self) -> NodeMut {
1929        NodeMut::PartitionSpec(self)
1930    }
1931}
1932
1933impl protobuf::PartitionBoundSpec {
1934    pub fn to_ref(&self) -> NodeRef<'_> {
1935        NodeRef::PartitionBoundSpec(self)
1936    }
1937    pub fn to_mut(&mut self) -> NodeMut {
1938        NodeMut::PartitionBoundSpec(self)
1939    }
1940}
1941
1942impl protobuf::PartitionRangeDatum {
1943    pub fn to_ref(&self) -> NodeRef<'_> {
1944        NodeRef::PartitionRangeDatum(self)
1945    }
1946    pub fn to_mut(&mut self) -> NodeMut {
1947        NodeMut::PartitionRangeDatum(self)
1948    }
1949}
1950
1951impl protobuf::PartitionCmd {
1952    pub fn to_ref(&self) -> NodeRef<'_> {
1953        NodeRef::PartitionCmd(self)
1954    }
1955    pub fn to_mut(&mut self) -> NodeMut {
1956        NodeMut::PartitionCmd(self)
1957    }
1958}
1959
1960impl protobuf::VacuumRelation {
1961    pub fn to_ref(&self) -> NodeRef<'_> {
1962        NodeRef::VacuumRelation(self)
1963    }
1964    pub fn to_mut(&mut self) -> NodeMut {
1965        NodeMut::VacuumRelation(self)
1966    }
1967}
1968
1969impl protobuf::InlineCodeBlock {
1970    pub fn to_ref(&self) -> NodeRef<'_> {
1971        NodeRef::InlineCodeBlock(self)
1972    }
1973    pub fn to_mut(&mut self) -> NodeMut {
1974        NodeMut::InlineCodeBlock(self)
1975    }
1976}
1977
1978impl protobuf::CallContext {
1979    pub fn to_ref(&self) -> NodeRef<'_> {
1980        NodeRef::CallContext(self)
1981    }
1982    pub fn to_mut(&mut self) -> NodeMut {
1983        NodeMut::CallContext(self)
1984    }
1985}
1986
1987impl protobuf::Integer {
1988    pub fn to_ref(&self) -> NodeRef<'_> {
1989        NodeRef::Integer(self)
1990    }
1991    pub fn to_mut(&mut self) -> NodeMut {
1992        NodeMut::Integer(self)
1993    }
1994}
1995
1996impl protobuf::Float {
1997    pub fn to_ref(&self) -> NodeRef<'_> {
1998        NodeRef::Float(self)
1999    }
2000    pub fn to_mut(&mut self) -> NodeMut {
2001        NodeMut::Float(self)
2002    }
2003}
2004
2005impl protobuf::String {
2006    pub fn to_ref(&self) -> NodeRef<'_> {
2007        NodeRef::String(self)
2008    }
2009    pub fn to_mut(&mut self) -> NodeMut {
2010        NodeMut::String(self)
2011    }
2012}
2013
2014impl protobuf::BitString {
2015    pub fn to_ref(&self) -> NodeRef<'_> {
2016        NodeRef::BitString(self)
2017    }
2018    pub fn to_mut(&mut self) -> NodeMut {
2019        NodeMut::BitString(self)
2020    }
2021}
2022
2023impl protobuf::List {
2024    pub fn to_ref(&self) -> NodeRef<'_> {
2025        NodeRef::List(self)
2026    }
2027    pub fn to_mut(&mut self) -> NodeMut {
2028        NodeMut::List(self)
2029    }
2030}
2031
2032impl protobuf::IntList {
2033    pub fn to_ref(&self) -> NodeRef<'_> {
2034        NodeRef::IntList(self)
2035    }
2036    pub fn to_mut(&mut self) -> NodeMut {
2037        NodeMut::IntList(self)
2038    }
2039}
2040
2041impl protobuf::OidList {
2042    pub fn to_ref(&self) -> NodeRef<'_> {
2043        NodeRef::OidList(self)
2044    }
2045    pub fn to_mut(&mut self) -> NodeMut {
2046        NodeMut::OidList(self)
2047    }
2048}