1pub trait Fold<T: AstInfo, T2: AstInfo, > {
2 fn fold_abbreviated_grant_or_revoke_statement(&mut self, node: AbbreviatedGrantOrRevokeStatement<T>) -> AbbreviatedGrantOrRevokeStatement<T2> {
3 fold_abbreviated_grant_or_revoke_statement(self, node)
4 }
5 fn fold_abbreviated_grant_statement(&mut self, node: AbbreviatedGrantStatement<T>) -> AbbreviatedGrantStatement<T2> {
6 fold_abbreviated_grant_statement(self, node)
7 }
8 fn fold_abbreviated_revoke_statement(&mut self, node: AbbreviatedRevokeStatement<T>) -> AbbreviatedRevokeStatement<T2> {
9 fold_abbreviated_revoke_statement(self, node)
10 }
11 fn fold_alter_cluster_action(&mut self, node: AlterClusterAction<T>) -> AlterClusterAction<T2> {
12 fold_alter_cluster_action(self, node)
13 }
14 fn fold_alter_cluster_statement(&mut self, node: AlterClusterStatement<T>) -> AlterClusterStatement<T2> {
15 fold_alter_cluster_statement(self, node)
16 }
17 fn fold_alter_connection_action(&mut self, node: AlterConnectionAction<T>) -> AlterConnectionAction<T2> {
18 fold_alter_connection_action(self, node)
19 }
20 fn fold_alter_connection_option(&mut self, node: AlterConnectionOption<T>) -> AlterConnectionOption<T2> {
21 fold_alter_connection_option(self, node)
22 }
23 fn fold_alter_connection_option_name(&mut self, node: AlterConnectionOptionName) -> AlterConnectionOptionName {
24 fold_alter_connection_option_name(self, node)
25 }
26 fn fold_alter_connection_statement(&mut self, node: AlterConnectionStatement<T>) -> AlterConnectionStatement<T2> {
27 fold_alter_connection_statement(self, node)
28 }
29 fn fold_alter_default_privileges_statement(&mut self, node: AlterDefaultPrivilegesStatement<T>) -> AlterDefaultPrivilegesStatement<T2> {
30 fold_alter_default_privileges_statement(self, node)
31 }
32 fn fold_alter_index_action(&mut self, node: AlterIndexAction<T>) -> AlterIndexAction<T2> {
33 fold_alter_index_action(self, node)
34 }
35 fn fold_alter_index_statement(&mut self, node: AlterIndexStatement<T>) -> AlterIndexStatement<T2> {
36 fold_alter_index_statement(self, node)
37 }
38 fn fold_alter_materialized_view_apply_replacement_statement(&mut self, node: AlterMaterializedViewApplyReplacementStatement) -> AlterMaterializedViewApplyReplacementStatement {
39 fold_alter_materialized_view_apply_replacement_statement(self, node)
40 }
41 fn fold_alter_network_policy_statement(&mut self, node: AlterNetworkPolicyStatement<T>) -> AlterNetworkPolicyStatement<T2> {
42 fold_alter_network_policy_statement(self, node)
43 }
44 fn fold_alter_object_rename_statement(&mut self, node: AlterObjectRenameStatement) -> AlterObjectRenameStatement {
45 fold_alter_object_rename_statement(self, node)
46 }
47 fn fold_alter_object_swap_statement(&mut self, node: AlterObjectSwapStatement) -> AlterObjectSwapStatement {
48 fold_alter_object_swap_statement(self, node)
49 }
50 fn fold_alter_owner_statement(&mut self, node: AlterOwnerStatement<T>) -> AlterOwnerStatement<T2> {
51 fold_alter_owner_statement(self, node)
52 }
53 fn fold_alter_retain_history_statement(&mut self, node: AlterRetainHistoryStatement<T>) -> AlterRetainHistoryStatement<T2> {
54 fold_alter_retain_history_statement(self, node)
55 }
56 fn fold_alter_role_option(&mut self, node: AlterRoleOption) -> AlterRoleOption {
57 fold_alter_role_option(self, node)
58 }
59 fn fold_alter_role_statement(&mut self, node: AlterRoleStatement<T>) -> AlterRoleStatement<T2> {
60 fold_alter_role_statement(self, node)
61 }
62 fn fold_alter_secret_statement(&mut self, node: AlterSecretStatement<T>) -> AlterSecretStatement<T2> {
63 fold_alter_secret_statement(self, node)
64 }
65 fn fold_alter_set_cluster_statement(&mut self, node: AlterSetClusterStatement<T>) -> AlterSetClusterStatement<T2> {
66 fold_alter_set_cluster_statement(self, node)
67 }
68 fn fold_alter_sink_action(&mut self, node: AlterSinkAction<T>) -> AlterSinkAction<T2> {
69 fold_alter_sink_action(self, node)
70 }
71 fn fold_alter_sink_statement(&mut self, node: AlterSinkStatement<T>) -> AlterSinkStatement<T2> {
72 fold_alter_sink_statement(self, node)
73 }
74 fn fold_alter_source_action(&mut self, node: AlterSourceAction<T>) -> AlterSourceAction<T2> {
75 fold_alter_source_action(self, node)
76 }
77 fn fold_alter_source_add_subsource_option(&mut self, node: AlterSourceAddSubsourceOption<T>) -> AlterSourceAddSubsourceOption<T2> {
78 fold_alter_source_add_subsource_option(self, node)
79 }
80 fn fold_alter_source_add_subsource_option_name(&mut self, node: AlterSourceAddSubsourceOptionName) -> AlterSourceAddSubsourceOptionName {
81 fold_alter_source_add_subsource_option_name(self, node)
82 }
83 fn fold_alter_source_statement(&mut self, node: AlterSourceStatement<T>) -> AlterSourceStatement<T2> {
84 fold_alter_source_statement(self, node)
85 }
86 fn fold_alter_system_reset_all_statement(&mut self, node: AlterSystemResetAllStatement) -> AlterSystemResetAllStatement {
87 fold_alter_system_reset_all_statement(self, node)
88 }
89 fn fold_alter_system_reset_statement(&mut self, node: AlterSystemResetStatement) -> AlterSystemResetStatement {
90 fold_alter_system_reset_statement(self, node)
91 }
92 fn fold_alter_system_set_statement(&mut self, node: AlterSystemSetStatement) -> AlterSystemSetStatement {
93 fold_alter_system_set_statement(self, node)
94 }
95 fn fold_alter_table_add_column_statement(&mut self, node: AlterTableAddColumnStatement<T>) -> AlterTableAddColumnStatement<T2> {
96 fold_alter_table_add_column_statement(self, node)
97 }
98 fn fold_as_of(&mut self, node: AsOf<T>) -> AsOf<T2> {
99 fold_as_of(self, node)
100 }
101 fn fold_assignment(&mut self, node: Assignment<T>) -> Assignment<T2> {
102 fold_assignment(self, node)
103 }
104 fn fold_avro_doc_on(&mut self, node: AvroDocOn<T>) -> AvroDocOn<T2> {
105 fold_avro_doc_on(self, node)
106 }
107 fn fold_avro_schema(&mut self, node: AvroSchema<T>) -> AvroSchema<T2> {
108 fold_avro_schema(self, node)
109 }
110 fn fold_avro_schema_option(&mut self, node: AvroSchemaOption<T>) -> AvroSchemaOption<T2> {
111 fold_avro_schema_option(self, node)
112 }
113 fn fold_avro_schema_option_name(&mut self, node: AvroSchemaOptionName) -> AvroSchemaOptionName {
114 fold_avro_schema_option_name(self, node)
115 }
116 fn fold_cast_failure_mode(&mut self, node: CastFailureMode) -> CastFailureMode {
117 fold_cast_failure_mode(self, node)
118 }
119 fn fold_catalog_name(&mut self, node: CatalogName) -> CatalogName {
120 fold_catalog_name(self, node)
121 }
122 fn fold_close_statement(&mut self, node: CloseStatement) -> CloseStatement {
123 fold_close_statement(self, node)
124 }
125 fn fold_cluster_alter_option(&mut self, node: ClusterAlterOption<T>) -> ClusterAlterOption<T2> {
126 fold_cluster_alter_option(self, node)
127 }
128 fn fold_cluster_alter_option_name(&mut self, node: ClusterAlterOptionName) -> ClusterAlterOptionName {
129 fold_cluster_alter_option_name(self, node)
130 }
131 fn fold_cluster_alter_option_value(&mut self, node: ClusterAlterOptionValue<T>) -> ClusterAlterOptionValue<T2> {
132 fold_cluster_alter_option_value(self, node)
133 }
134 fn fold_cluster_alter_until_ready_option(&mut self, node: ClusterAlterUntilReadyOption<T>) -> ClusterAlterUntilReadyOption<T2> {
135 fold_cluster_alter_until_ready_option(self, node)
136 }
137 fn fold_cluster_alter_until_ready_option_name(&mut self, node: ClusterAlterUntilReadyOptionName) -> ClusterAlterUntilReadyOptionName {
138 fold_cluster_alter_until_ready_option_name(self, node)
139 }
140 fn fold_cluster_auto_scaling_strategy_option_value(&mut self, node: ClusterAutoScalingStrategyOptionValue) -> ClusterAutoScalingStrategyOptionValue {
141 fold_cluster_auto_scaling_strategy_option_value(self, node)
142 }
143 fn fold_cluster_feature(&mut self, node: ClusterFeature<T>) -> ClusterFeature<T2> {
144 fold_cluster_feature(self, node)
145 }
146 fn fold_cluster_feature_name(&mut self, node: ClusterFeatureName) -> ClusterFeatureName {
147 fold_cluster_feature_name(self, node)
148 }
149 fn fold_cluster_option(&mut self, node: ClusterOption<T>) -> ClusterOption<T2> {
150 fold_cluster_option(self, node)
151 }
152 fn fold_cluster_option_name(&mut self, node: ClusterOptionName) -> ClusterOptionName {
153 fold_cluster_option_name(self, node)
154 }
155 fn fold_cluster_schedule_option_value(&mut self, node: ClusterScheduleOptionValue) -> ClusterScheduleOptionValue {
156 fold_cluster_schedule_option_value(self, node)
157 }
158 fn fold_column_def(&mut self, node: ColumnDef<T>) -> ColumnDef<T2> {
159 fold_column_def(self, node)
160 }
161 fn fold_column_name(&mut self, node: ColumnName<T>) -> ColumnName<T2> {
162 fold_column_name(self, node)
163 }
164 fn fold_column_option(&mut self, node: ColumnOption<T>) -> ColumnOption<T2> {
165 fold_column_option(self, node)
166 }
167 fn fold_column_option_def(&mut self, node: ColumnOptionDef<T>) -> ColumnOptionDef<T2> {
168 fold_column_option_def(self, node)
169 }
170 fn fold_column_versioned(&mut self, node: ColumnVersioned) -> ColumnVersioned {
171 fold_column_versioned(self, node)
172 }
173 fn fold_comment_object_type(&mut self, node: CommentObjectType<T>) -> CommentObjectType<T2> {
174 fold_comment_object_type(self, node)
175 }
176 fn fold_comment_statement(&mut self, node: CommentStatement<T>) -> CommentStatement<T2> {
177 fold_comment_statement(self, node)
178 }
179 fn fold_commit_statement(&mut self, node: CommitStatement) -> CommitStatement {
180 fold_commit_statement(self, node)
181 }
182 fn fold_connection_default_aws_privatelink(&mut self, node: ConnectionDefaultAwsPrivatelink<T>) -> ConnectionDefaultAwsPrivatelink<T2> {
183 fold_connection_default_aws_privatelink(self, node)
184 }
185 fn fold_connection_option(&mut self, node: ConnectionOption<T>) -> ConnectionOption<T2> {
186 fold_connection_option(self, node)
187 }
188 fn fold_connection_option_name(&mut self, node: ConnectionOptionName) -> ConnectionOptionName {
189 fold_connection_option_name(self, node)
190 }
191 fn fold_connection_rule_pattern(&mut self, node: ConnectionRulePattern) -> ConnectionRulePattern {
192 fold_connection_rule_pattern(self, node)
193 }
194 fn fold_copy_direction(&mut self, node: CopyDirection) -> CopyDirection {
195 fold_copy_direction(self, node)
196 }
197 fn fold_copy_option(&mut self, node: CopyOption<T>) -> CopyOption<T2> {
198 fold_copy_option(self, node)
199 }
200 fn fold_copy_option_name(&mut self, node: CopyOptionName) -> CopyOptionName {
201 fold_copy_option_name(self, node)
202 }
203 fn fold_copy_relation(&mut self, node: CopyRelation<T>) -> CopyRelation<T2> {
204 fold_copy_relation(self, node)
205 }
206 fn fold_copy_statement(&mut self, node: CopyStatement<T>) -> CopyStatement<T2> {
207 fold_copy_statement(self, node)
208 }
209 fn fold_copy_target(&mut self, node: CopyTarget<T>) -> CopyTarget<T2> {
210 fold_copy_target(self, node)
211 }
212 fn fold_create_cluster_replica_statement(&mut self, node: CreateClusterReplicaStatement<T>) -> CreateClusterReplicaStatement<T2> {
213 fold_create_cluster_replica_statement(self, node)
214 }
215 fn fold_create_cluster_statement(&mut self, node: CreateClusterStatement<T>) -> CreateClusterStatement<T2> {
216 fold_create_cluster_statement(self, node)
217 }
218 fn fold_create_connection_option(&mut self, node: CreateConnectionOption<T>) -> CreateConnectionOption<T2> {
219 fold_create_connection_option(self, node)
220 }
221 fn fold_create_connection_option_name(&mut self, node: CreateConnectionOptionName) -> CreateConnectionOptionName {
222 fold_create_connection_option_name(self, node)
223 }
224 fn fold_create_connection_statement(&mut self, node: CreateConnectionStatement<T>) -> CreateConnectionStatement<T2> {
225 fold_create_connection_statement(self, node)
226 }
227 fn fold_create_connection_type(&mut self, node: CreateConnectionType) -> CreateConnectionType {
228 fold_create_connection_type(self, node)
229 }
230 fn fold_create_database_statement(&mut self, node: CreateDatabaseStatement) -> CreateDatabaseStatement {
231 fold_create_database_statement(self, node)
232 }
233 fn fold_create_index_statement(&mut self, node: CreateIndexStatement<T>) -> CreateIndexStatement<T2> {
234 fold_create_index_statement(self, node)
235 }
236 fn fold_create_materialized_view_statement(&mut self, node: CreateMaterializedViewStatement<T>) -> CreateMaterializedViewStatement<T2> {
237 fold_create_materialized_view_statement(self, node)
238 }
239 fn fold_create_metric_sink_option(&mut self, node: CreateMetricSinkOption<T>) -> CreateMetricSinkOption<T2> {
240 fold_create_metric_sink_option(self, node)
241 }
242 fn fold_create_metric_sink_option_name(&mut self, node: CreateMetricSinkOptionName) -> CreateMetricSinkOptionName {
243 fold_create_metric_sink_option_name(self, node)
244 }
245 fn fold_create_metric_sink_statement(&mut self, node: CreateMetricSinkStatement<T>) -> CreateMetricSinkStatement<T2> {
246 fold_create_metric_sink_statement(self, node)
247 }
248 fn fold_create_network_policy_statement(&mut self, node: CreateNetworkPolicyStatement<T>) -> CreateNetworkPolicyStatement<T2> {
249 fold_create_network_policy_statement(self, node)
250 }
251 fn fold_create_role_statement(&mut self, node: CreateRoleStatement) -> CreateRoleStatement {
252 fold_create_role_statement(self, node)
253 }
254 fn fold_create_schema_statement(&mut self, node: CreateSchemaStatement) -> CreateSchemaStatement {
255 fold_create_schema_statement(self, node)
256 }
257 fn fold_create_secret_statement(&mut self, node: CreateSecretStatement<T>) -> CreateSecretStatement<T2> {
258 fold_create_secret_statement(self, node)
259 }
260 fn fold_create_sink_connection(&mut self, node: CreateSinkConnection<T>) -> CreateSinkConnection<T2> {
261 fold_create_sink_connection(self, node)
262 }
263 fn fold_create_sink_option(&mut self, node: CreateSinkOption<T>) -> CreateSinkOption<T2> {
264 fold_create_sink_option(self, node)
265 }
266 fn fold_create_sink_option_name(&mut self, node: CreateSinkOptionName) -> CreateSinkOptionName {
267 fold_create_sink_option_name(self, node)
268 }
269 fn fold_create_sink_statement(&mut self, node: CreateSinkStatement<T>) -> CreateSinkStatement<T2> {
270 fold_create_sink_statement(self, node)
271 }
272 fn fold_create_source_connection(&mut self, node: CreateSourceConnection<T>) -> CreateSourceConnection<T2> {
273 fold_create_source_connection(self, node)
274 }
275 fn fold_create_source_option(&mut self, node: CreateSourceOption<T>) -> CreateSourceOption<T2> {
276 fold_create_source_option(self, node)
277 }
278 fn fold_create_source_option_name(&mut self, node: CreateSourceOptionName) -> CreateSourceOptionName {
279 fold_create_source_option_name(self, node)
280 }
281 fn fold_create_source_statement(&mut self, node: CreateSourceStatement<T>) -> CreateSourceStatement<T2> {
282 fold_create_source_statement(self, node)
283 }
284 fn fold_create_subsource_option(&mut self, node: CreateSubsourceOption<T>) -> CreateSubsourceOption<T2> {
285 fold_create_subsource_option(self, node)
286 }
287 fn fold_create_subsource_option_name(&mut self, node: CreateSubsourceOptionName) -> CreateSubsourceOptionName {
288 fold_create_subsource_option_name(self, node)
289 }
290 fn fold_create_subsource_statement(&mut self, node: CreateSubsourceStatement<T>) -> CreateSubsourceStatement<T2> {
291 fold_create_subsource_statement(self, node)
292 }
293 fn fold_create_table_from_source_statement(&mut self, node: CreateTableFromSourceStatement<T>) -> CreateTableFromSourceStatement<T2> {
294 fold_create_table_from_source_statement(self, node)
295 }
296 fn fold_create_table_statement(&mut self, node: CreateTableStatement<T>) -> CreateTableStatement<T2> {
297 fold_create_table_statement(self, node)
298 }
299 fn fold_create_type_as(&mut self, node: CreateTypeAs<T>) -> CreateTypeAs<T2> {
300 fold_create_type_as(self, node)
301 }
302 fn fold_create_type_list_option(&mut self, node: CreateTypeListOption<T>) -> CreateTypeListOption<T2> {
303 fold_create_type_list_option(self, node)
304 }
305 fn fold_create_type_list_option_name(&mut self, node: CreateTypeListOptionName) -> CreateTypeListOptionName {
306 fold_create_type_list_option_name(self, node)
307 }
308 fn fold_create_type_map_option(&mut self, node: CreateTypeMapOption<T>) -> CreateTypeMapOption<T2> {
309 fold_create_type_map_option(self, node)
310 }
311 fn fold_create_type_map_option_name(&mut self, node: CreateTypeMapOptionName) -> CreateTypeMapOptionName {
312 fold_create_type_map_option_name(self, node)
313 }
314 fn fold_create_type_statement(&mut self, node: CreateTypeStatement<T>) -> CreateTypeStatement<T2> {
315 fold_create_type_statement(self, node)
316 }
317 fn fold_create_view_statement(&mut self, node: CreateViewStatement<T>) -> CreateViewStatement<T2> {
318 fold_create_view_statement(self, node)
319 }
320 fn fold_create_webhook_source_body(&mut self, node: CreateWebhookSourceBody) -> CreateWebhookSourceBody {
321 fold_create_webhook_source_body(self, node)
322 }
323 fn fold_create_webhook_source_check(&mut self, node: CreateWebhookSourceCheck<T>) -> CreateWebhookSourceCheck<T2> {
324 fold_create_webhook_source_check(self, node)
325 }
326 fn fold_create_webhook_source_check_options(&mut self, node: CreateWebhookSourceCheckOptions<T>) -> CreateWebhookSourceCheckOptions<T2> {
327 fold_create_webhook_source_check_options(self, node)
328 }
329 fn fold_create_webhook_source_filter_header(&mut self, node: CreateWebhookSourceFilterHeader) -> CreateWebhookSourceFilterHeader {
330 fold_create_webhook_source_filter_header(self, node)
331 }
332 fn fold_create_webhook_source_header(&mut self, node: CreateWebhookSourceHeader) -> CreateWebhookSourceHeader {
333 fold_create_webhook_source_header(self, node)
334 }
335 fn fold_create_webhook_source_include_headers(&mut self, node: CreateWebhookSourceIncludeHeaders) -> CreateWebhookSourceIncludeHeaders {
336 fold_create_webhook_source_include_headers(self, node)
337 }
338 fn fold_create_webhook_source_map_header(&mut self, node: CreateWebhookSourceMapHeader) -> CreateWebhookSourceMapHeader {
339 fold_create_webhook_source_map_header(self, node)
340 }
341 fn fold_create_webhook_source_secret(&mut self, node: CreateWebhookSourceSecret<T>) -> CreateWebhookSourceSecret<T2> {
342 fold_create_webhook_source_secret(self, node)
343 }
344 fn fold_create_webhook_source_statement(&mut self, node: CreateWebhookSourceStatement<T>) -> CreateWebhookSourceStatement<T2> {
345 fold_create_webhook_source_statement(self, node)
346 }
347 fn fold_csr_config_option(&mut self, node: CsrConfigOption<T>) -> CsrConfigOption<T2> {
348 fold_csr_config_option(self, node)
349 }
350 fn fold_csr_config_option_name(&mut self, node: CsrConfigOptionName<T>) -> CsrConfigOptionName<T2> {
351 fold_csr_config_option_name(self, node)
352 }
353 fn fold_csr_connection(&mut self, node: CsrConnection<T>) -> CsrConnection<T2> {
354 fold_csr_connection(self, node)
355 }
356 fn fold_csr_connection_avro(&mut self, node: CsrConnectionAvro<T>) -> CsrConnectionAvro<T2> {
357 fold_csr_connection_avro(self, node)
358 }
359 fn fold_csr_connection_protobuf(&mut self, node: CsrConnectionProtobuf<T>) -> CsrConnectionProtobuf<T2> {
360 fold_csr_connection_protobuf(self, node)
361 }
362 fn fold_csr_seed_avro(&mut self, node: CsrSeedAvro) -> CsrSeedAvro {
363 fold_csr_seed_avro(self, node)
364 }
365 fn fold_csr_seed_protobuf(&mut self, node: CsrSeedProtobuf) -> CsrSeedProtobuf {
366 fold_csr_seed_protobuf(self, node)
367 }
368 fn fold_csr_seed_protobuf_schema(&mut self, node: CsrSeedProtobufSchema) -> CsrSeedProtobufSchema {
369 fold_csr_seed_protobuf_schema(self, node)
370 }
371 fn fold_csv_columns(&mut self, node: CsvColumns) -> CsvColumns {
372 fold_csv_columns(self, node)
373 }
374 fn fold_cte(&mut self, node: Cte<T>) -> Cte<T2> {
375 fold_cte(self, node)
376 }
377 fn fold_cte_block(&mut self, node: CteBlock<T>) -> CteBlock<T2> {
378 fold_cte_block(self, node)
379 }
380 fn fold_cte_mut_rec(&mut self, node: CteMutRec<T>) -> CteMutRec<T2> {
381 fold_cte_mut_rec(self, node)
382 }
383 fn fold_cte_mut_rec_column_def(&mut self, node: CteMutRecColumnDef<T>) -> CteMutRecColumnDef<T2> {
384 fold_cte_mut_rec_column_def(self, node)
385 }
386 fn fold_date_time_field(&mut self, node: DateTimeField) -> DateTimeField {
387 fold_date_time_field(self, node)
388 }
389 fn fold_deallocate_statement(&mut self, node: DeallocateStatement) -> DeallocateStatement {
390 fold_deallocate_statement(self, node)
391 }
392 fn fold_declare_statement(&mut self, node: DeclareStatement<T>) -> DeclareStatement<T2> {
393 fold_declare_statement(self, node)
394 }
395 fn fold_deferred_item_name(&mut self, node: DeferredItemName<T>) -> DeferredItemName<T2> {
396 fold_deferred_item_name(self, node)
397 }
398 fn fold_delete_statement(&mut self, node: DeleteStatement<T>) -> DeleteStatement<T2> {
399 fold_delete_statement(self, node)
400 }
401 fn fold_discard_statement(&mut self, node: DiscardStatement) -> DiscardStatement {
402 fold_discard_statement(self, node)
403 }
404 fn fold_discard_target(&mut self, node: DiscardTarget) -> DiscardTarget {
405 fold_discard_target(self, node)
406 }
407 fn fold_distinct(&mut self, node: Distinct<T>) -> Distinct<T2> {
408 fold_distinct(self, node)
409 }
410 fn fold_doc_on_identifier(&mut self, node: DocOnIdentifier<T>) -> DocOnIdentifier<T2> {
411 fold_doc_on_identifier(self, node)
412 }
413 fn fold_doc_on_schema(&mut self, node: DocOnSchema) -> DocOnSchema {
414 fold_doc_on_schema(self, node)
415 }
416 fn fold_drop_objects_statement(&mut self, node: DropObjectsStatement) -> DropObjectsStatement {
417 fold_drop_objects_statement(self, node)
418 }
419 fn fold_drop_owned_statement(&mut self, node: DropOwnedStatement<T>) -> DropOwnedStatement<T2> {
420 fold_drop_owned_statement(self, node)
421 }
422 fn fold_execute_statement(&mut self, node: ExecuteStatement<T>) -> ExecuteStatement<T2> {
423 fold_execute_statement(self, node)
424 }
425 fn fold_execute_unit_test_statement(&mut self, node: ExecuteUnitTestStatement<T>) -> ExecuteUnitTestStatement<T2> {
426 fold_execute_unit_test_statement(self, node)
427 }
428 fn fold_expected_result_def(&mut self, node: ExpectedResultDef<T>) -> ExpectedResultDef<T2> {
429 fold_expected_result_def(self, node)
430 }
431 fn fold_explain_analyze_cluster_statement(&mut self, node: ExplainAnalyzeClusterStatement) -> ExplainAnalyzeClusterStatement {
432 fold_explain_analyze_cluster_statement(self, node)
433 }
434 fn fold_explain_analyze_computation_properties(&mut self, node: ExplainAnalyzeComputationProperties) -> ExplainAnalyzeComputationProperties {
435 fold_explain_analyze_computation_properties(self, node)
436 }
437 fn fold_explain_analyze_computation_property(&mut self, node: ExplainAnalyzeComputationProperty) -> ExplainAnalyzeComputationProperty {
438 fold_explain_analyze_computation_property(self, node)
439 }
440 fn fold_explain_analyze_object_statement(&mut self, node: ExplainAnalyzeObjectStatement<T>) -> ExplainAnalyzeObjectStatement<T2> {
441 fold_explain_analyze_object_statement(self, node)
442 }
443 fn fold_explain_analyze_property(&mut self, node: ExplainAnalyzeProperty) -> ExplainAnalyzeProperty {
444 fold_explain_analyze_property(self, node)
445 }
446 fn fold_explain_format(&mut self, node: ExplainFormat) -> ExplainFormat {
447 fold_explain_format(self, node)
448 }
449 fn fold_explain_plan_option(&mut self, node: ExplainPlanOption<T>) -> ExplainPlanOption<T2> {
450 fold_explain_plan_option(self, node)
451 }
452 fn fold_explain_plan_option_name(&mut self, node: ExplainPlanOptionName) -> ExplainPlanOptionName {
453 fold_explain_plan_option_name(self, node)
454 }
455 fn fold_explain_plan_statement(&mut self, node: ExplainPlanStatement<T>) -> ExplainPlanStatement<T2> {
456 fold_explain_plan_statement(self, node)
457 }
458 fn fold_explain_pushdown_statement(&mut self, node: ExplainPushdownStatement<T>) -> ExplainPushdownStatement<T2> {
459 fold_explain_pushdown_statement(self, node)
460 }
461 fn fold_explain_sink_schema_for(&mut self, node: ExplainSinkSchemaFor) -> ExplainSinkSchemaFor {
462 fold_explain_sink_schema_for(self, node)
463 }
464 fn fold_explain_sink_schema_statement(&mut self, node: ExplainSinkSchemaStatement<T>) -> ExplainSinkSchemaStatement<T2> {
465 fold_explain_sink_schema_statement(self, node)
466 }
467 fn fold_explain_stage(&mut self, node: ExplainStage) -> ExplainStage {
468 fold_explain_stage(self, node)
469 }
470 fn fold_explain_timestamp_statement(&mut self, node: ExplainTimestampStatement<T>) -> ExplainTimestampStatement<T2> {
471 fold_explain_timestamp_statement(self, node)
472 }
473 fn fold_explainee(&mut self, node: Explainee<T>) -> Explainee<T2> {
474 fold_explainee(self, node)
475 }
476 fn fold_expr(&mut self, node: Expr<T>) -> Expr<T2> {
477 fold_expr(self, node)
478 }
479 fn fold_external_reference_export(&mut self, node: ExternalReferenceExport) -> ExternalReferenceExport {
480 fold_external_reference_export(self, node)
481 }
482 fn fold_external_references(&mut self, node: ExternalReferences) -> ExternalReferences {
483 fold_external_references(self, node)
484 }
485 fn fold_fetch_direction(&mut self, node: FetchDirection) -> FetchDirection {
486 fold_fetch_direction(self, node)
487 }
488 fn fold_fetch_option(&mut self, node: FetchOption<T>) -> FetchOption<T2> {
489 fold_fetch_option(self, node)
490 }
491 fn fold_fetch_option_name(&mut self, node: FetchOptionName) -> FetchOptionName {
492 fold_fetch_option_name(self, node)
493 }
494 fn fold_fetch_statement(&mut self, node: FetchStatement<T>) -> FetchStatement<T2> {
495 fold_fetch_statement(self, node)
496 }
497 fn fold_format(&mut self, node: Format<T>) -> Format<T2> {
498 fold_format(self, node)
499 }
500 fn fold_format_specifier(&mut self, node: FormatSpecifier<T>) -> FormatSpecifier<T2> {
501 fold_format_specifier(self, node)
502 }
503 fn fold_function(&mut self, node: Function<T>) -> Function<T2> {
504 fold_function(self, node)
505 }
506 fn fold_function_args(&mut self, node: FunctionArgs<T>) -> FunctionArgs<T2> {
507 fold_function_args(self, node)
508 }
509 fn fold_glue_avro_option(&mut self, node: GlueAvroOption<T>) -> GlueAvroOption<T2> {
510 fold_glue_avro_option(self, node)
511 }
512 fn fold_glue_avro_option_name(&mut self, node: GlueAvroOptionName) -> GlueAvroOptionName {
513 fold_glue_avro_option_name(self, node)
514 }
515 fn fold_glue_avro_seed(&mut self, node: GlueAvroSeed) -> GlueAvroSeed {
516 fold_glue_avro_seed(self, node)
517 }
518 fn fold_grant_privileges_statement(&mut self, node: GrantPrivilegesStatement<T>) -> GrantPrivilegesStatement<T2> {
519 fold_grant_privileges_statement(self, node)
520 }
521 fn fold_grant_role_statement(&mut self, node: GrantRoleStatement<T>) -> GrantRoleStatement<T2> {
522 fold_grant_role_statement(self, node)
523 }
524 fn fold_grant_target_all_specification(&mut self, node: GrantTargetAllSpecification<T>) -> GrantTargetAllSpecification<T2> {
525 fold_grant_target_all_specification(self, node)
526 }
527 fn fold_grant_target_specification(&mut self, node: GrantTargetSpecification<T>) -> GrantTargetSpecification<T2> {
528 fold_grant_target_specification(self, node)
529 }
530 fn fold_grant_target_specification_inner(&mut self, node: GrantTargetSpecificationInner<T>) -> GrantTargetSpecificationInner<T2> {
531 fold_grant_target_specification_inner(self, node)
532 }
533 fn fold_homogenizing_function(&mut self, node: HomogenizingFunction) -> HomogenizingFunction {
534 fold_homogenizing_function(self, node)
535 }
536 fn fold_iceberg_sink_config_option(&mut self, node: IcebergSinkConfigOption<T>) -> IcebergSinkConfigOption<T2> {
537 fold_iceberg_sink_config_option(self, node)
538 }
539 fn fold_iceberg_sink_config_option_name(&mut self, node: IcebergSinkConfigOptionName) -> IcebergSinkConfigOptionName {
540 fold_iceberg_sink_config_option_name(self, node)
541 }
542 fn fold_iceberg_sink_mode(&mut self, node: IcebergSinkMode) -> IcebergSinkMode {
543 fold_iceberg_sink_mode(self, node)
544 }
545 fn fold_ident(&mut self, node: Ident) -> Ident {
546 fold_ident(self, node)
547 }
548 fn fold_ident_error(&mut self, node: IdentError) -> IdentError {
549 fold_ident_error(self, node)
550 }
551 fn fold_if_exists_behavior(&mut self, node: IfExistsBehavior) -> IfExistsBehavior {
552 fold_if_exists_behavior(self, node)
553 }
554 fn fold_index_option(&mut self, node: IndexOption<T>) -> IndexOption<T2> {
555 fold_index_option(self, node)
556 }
557 fn fold_index_option_name(&mut self, node: IndexOptionName) -> IndexOptionName {
558 fold_index_option_name(self, node)
559 }
560 fn fold_insert_source(&mut self, node: InsertSource<T>) -> InsertSource<T2> {
561 fold_insert_source(self, node)
562 }
563 fn fold_insert_statement(&mut self, node: InsertStatement<T>) -> InsertStatement<T2> {
564 fold_insert_statement(self, node)
565 }
566 fn fold_inspect_shard_statement(&mut self, node: InspectShardStatement) -> InspectShardStatement {
567 fold_inspect_shard_statement(self, node)
568 }
569 fn fold_interval_value(&mut self, node: IntervalValue) -> IntervalValue {
570 fold_interval_value(self, node)
571 }
572 fn fold_is_expr_construct(&mut self, node: IsExprConstruct<T>) -> IsExprConstruct<T2> {
573 fold_is_expr_construct(self, node)
574 }
575 fn fold_join(&mut self, node: Join<T>) -> Join<T2> {
576 fold_join(self, node)
577 }
578 fn fold_join_constraint(&mut self, node: JoinConstraint<T>) -> JoinConstraint<T2> {
579 fold_join_constraint(self, node)
580 }
581 fn fold_join_operator(&mut self, node: JoinOperator<T>) -> JoinOperator<T2> {
582 fold_join_operator(self, node)
583 }
584 fn fold_kafka_broker(&mut self, node: KafkaBroker<T>) -> KafkaBroker<T2> {
585 fold_kafka_broker(self, node)
586 }
587 fn fold_kafka_broker_aws_privatelink(&mut self, node: KafkaBrokerAwsPrivatelink<T>) -> KafkaBrokerAwsPrivatelink<T2> {
588 fold_kafka_broker_aws_privatelink(self, node)
589 }
590 fn fold_kafka_broker_aws_privatelink_option(&mut self, node: KafkaBrokerAwsPrivatelinkOption<T>) -> KafkaBrokerAwsPrivatelinkOption<T2> {
591 fold_kafka_broker_aws_privatelink_option(self, node)
592 }
593 fn fold_kafka_broker_aws_privatelink_option_name(&mut self, node: KafkaBrokerAwsPrivatelinkOptionName) -> KafkaBrokerAwsPrivatelinkOptionName {
594 fold_kafka_broker_aws_privatelink_option_name(self, node)
595 }
596 fn fold_kafka_broker_tunnel(&mut self, node: KafkaBrokerTunnel<T>) -> KafkaBrokerTunnel<T2> {
597 fold_kafka_broker_tunnel(self, node)
598 }
599 fn fold_kafka_matching_broker_rule(&mut self, node: KafkaMatchingBrokerRule<T>) -> KafkaMatchingBrokerRule<T2> {
600 fold_kafka_matching_broker_rule(self, node)
601 }
602 fn fold_kafka_sink_config_option(&mut self, node: KafkaSinkConfigOption<T>) -> KafkaSinkConfigOption<T2> {
603 fold_kafka_sink_config_option(self, node)
604 }
605 fn fold_kafka_sink_config_option_name(&mut self, node: KafkaSinkConfigOptionName) -> KafkaSinkConfigOptionName {
606 fold_kafka_sink_config_option_name(self, node)
607 }
608 fn fold_kafka_source_config_option(&mut self, node: KafkaSourceConfigOption<T>) -> KafkaSourceConfigOption<T2> {
609 fold_kafka_source_config_option(self, node)
610 }
611 fn fold_kafka_source_config_option_name(&mut self, node: KafkaSourceConfigOptionName) -> KafkaSourceConfigOptionName {
612 fold_kafka_source_config_option_name(self, node)
613 }
614 fn fold_key_constraint(&mut self, node: KeyConstraint) -> KeyConstraint {
615 fold_key_constraint(self, node)
616 }
617 fn fold_limit(&mut self, node: Limit<T>) -> Limit<T2> {
618 fold_limit(self, node)
619 }
620 fn fold_load_generator(&mut self, node: LoadGenerator) -> LoadGenerator {
621 fold_load_generator(self, node)
622 }
623 fn fold_load_generator_option(&mut self, node: LoadGeneratorOption<T>) -> LoadGeneratorOption<T2> {
624 fold_load_generator_option(self, node)
625 }
626 fn fold_load_generator_option_name(&mut self, node: LoadGeneratorOptionName) -> LoadGeneratorOptionName {
627 fold_load_generator_option_name(self, node)
628 }
629 fn fold_map_entry(&mut self, node: MapEntry<T>) -> MapEntry<T2> {
630 fold_map_entry(self, node)
631 }
632 fn fold_materialized_view_option(&mut self, node: MaterializedViewOption<T>) -> MaterializedViewOption<T2> {
633 fold_materialized_view_option(self, node)
634 }
635 fn fold_materialized_view_option_name(&mut self, node: MaterializedViewOptionName) -> MaterializedViewOptionName {
636 fold_materialized_view_option_name(self, node)
637 }
638 fn fold_mock_view_def(&mut self, node: MockViewDef<T>) -> MockViewDef<T2> {
639 fold_mock_view_def(self, node)
640 }
641 fn fold_mut_rec_block(&mut self, node: MutRecBlock<T>) -> MutRecBlock<T2> {
642 fold_mut_rec_block(self, node)
643 }
644 fn fold_mut_rec_block_option(&mut self, node: MutRecBlockOption<T>) -> MutRecBlockOption<T2> {
645 fold_mut_rec_block_option(self, node)
646 }
647 fn fold_mut_rec_block_option_name(&mut self, node: MutRecBlockOptionName) -> MutRecBlockOptionName {
648 fold_mut_rec_block_option_name(self, node)
649 }
650 fn fold_my_sql_config_option(&mut self, node: MySqlConfigOption<T>) -> MySqlConfigOption<T2> {
651 fold_my_sql_config_option(self, node)
652 }
653 fn fold_my_sql_config_option_name(&mut self, node: MySqlConfigOptionName) -> MySqlConfigOptionName {
654 fold_my_sql_config_option_name(self, node)
655 }
656 fn fold_named_plan(&mut self, node: NamedPlan) -> NamedPlan {
657 fold_named_plan(self, node)
658 }
659 fn fold_network_policy_option(&mut self, node: NetworkPolicyOption<T>) -> NetworkPolicyOption<T2> {
660 fold_network_policy_option(self, node)
661 }
662 fn fold_network_policy_option_name(&mut self, node: NetworkPolicyOptionName) -> NetworkPolicyOptionName {
663 fold_network_policy_option_name(self, node)
664 }
665 fn fold_network_policy_rule_definition(&mut self, node: NetworkPolicyRuleDefinition<T>) -> NetworkPolicyRuleDefinition<T2> {
666 fold_network_policy_rule_definition(self, node)
667 }
668 fn fold_network_policy_rule_option(&mut self, node: NetworkPolicyRuleOption<T>) -> NetworkPolicyRuleOption<T2> {
669 fold_network_policy_rule_option(self, node)
670 }
671 fn fold_network_policy_rule_option_name(&mut self, node: NetworkPolicyRuleOptionName) -> NetworkPolicyRuleOptionName {
672 fold_network_policy_rule_option_name(self, node)
673 }
674 fn fold_notice_severity(&mut self, node: NoticeSeverity) -> NoticeSeverity {
675 fold_notice_severity(self, node)
676 }
677 fn fold_object_type(&mut self, node: ObjectType) -> ObjectType {
678 fold_object_type(self, node)
679 }
680 fn fold_on_hydration_option_value(&mut self, node: OnHydrationOptionValue) -> OnHydrationOptionValue {
681 fold_on_hydration_option_value(self, node)
682 }
683 fn fold_op(&mut self, node: Op) -> Op {
684 fold_op(self, node)
685 }
686 fn fold_order_by_expr(&mut self, node: OrderByExpr<T>) -> OrderByExpr<T2> {
687 fold_order_by_expr(self, node)
688 }
689 fn fold_pg_config_option(&mut self, node: PgConfigOption<T>) -> PgConfigOption<T2> {
690 fold_pg_config_option(self, node)
691 }
692 fn fold_pg_config_option_name(&mut self, node: PgConfigOptionName) -> PgConfigOptionName {
693 fold_pg_config_option_name(self, node)
694 }
695 fn fold_prepare_statement(&mut self, node: PrepareStatement<T>) -> PrepareStatement<T2> {
696 fold_prepare_statement(self, node)
697 }
698 fn fold_privilege(&mut self, node: Privilege) -> Privilege {
699 fold_privilege(self, node)
700 }
701 fn fold_privilege_specification(&mut self, node: PrivilegeSpecification) -> PrivilegeSpecification {
702 fold_privilege_specification(self, node)
703 }
704 fn fold_protobuf_schema(&mut self, node: ProtobufSchema<T>) -> ProtobufSchema<T2> {
705 fold_protobuf_schema(self, node)
706 }
707 fn fold_qualified_replica(&mut self, node: QualifiedReplica) -> QualifiedReplica {
708 fold_qualified_replica(self, node)
709 }
710 fn fold_query(&mut self, node: Query<T>) -> Query<T2> {
711 fold_query(self, node)
712 }
713 fn fold_raise_statement(&mut self, node: RaiseStatement) -> RaiseStatement {
714 fold_raise_statement(self, node)
715 }
716 fn fold_reader_schema_selection_strategy(&mut self, node: ReaderSchemaSelectionStrategy) -> ReaderSchemaSelectionStrategy {
717 fold_reader_schema_selection_strategy(self, node)
718 }
719 fn fold_reassign_owned_statement(&mut self, node: ReassignOwnedStatement<T>) -> ReassignOwnedStatement<T2> {
720 fold_reassign_owned_statement(self, node)
721 }
722 fn fold_refresh_at_option_value(&mut self, node: RefreshAtOptionValue<T>) -> RefreshAtOptionValue<T2> {
723 fold_refresh_at_option_value(self, node)
724 }
725 fn fold_refresh_every_option_value(&mut self, node: RefreshEveryOptionValue<T>) -> RefreshEveryOptionValue<T2> {
726 fold_refresh_every_option_value(self, node)
727 }
728 fn fold_refresh_option_value(&mut self, node: RefreshOptionValue<T>) -> RefreshOptionValue<T2> {
729 fold_refresh_option_value(self, node)
730 }
731 fn fold_replica_definition(&mut self, node: ReplicaDefinition<T>) -> ReplicaDefinition<T2> {
732 fold_replica_definition(self, node)
733 }
734 fn fold_replica_option(&mut self, node: ReplicaOption<T>) -> ReplicaOption<T2> {
735 fold_replica_option(self, node)
736 }
737 fn fold_replica_option_name(&mut self, node: ReplicaOptionName) -> ReplicaOptionName {
738 fold_replica_option_name(self, node)
739 }
740 fn fold_reset_variable_statement(&mut self, node: ResetVariableStatement) -> ResetVariableStatement {
741 fold_reset_variable_statement(self, node)
742 }
743 fn fold_revoke_privileges_statement(&mut self, node: RevokePrivilegesStatement<T>) -> RevokePrivilegesStatement<T2> {
744 fold_revoke_privileges_statement(self, node)
745 }
746 fn fold_revoke_role_statement(&mut self, node: RevokeRoleStatement<T>) -> RevokeRoleStatement<T2> {
747 fold_revoke_role_statement(self, node)
748 }
749 fn fold_role_attribute(&mut self, node: RoleAttribute) -> RoleAttribute {
750 fold_role_attribute(self, node)
751 }
752 fn fold_rollback_statement(&mut self, node: RollbackStatement) -> RollbackStatement {
753 fold_rollback_statement(self, node)
754 }
755 fn fold_schema(&mut self, node: Schema) -> Schema {
756 fold_schema(self, node)
757 }
758 fn fold_select(&mut self, node: Select<T>) -> Select<T2> {
759 fold_select(self, node)
760 }
761 fn fold_select_item(&mut self, node: SelectItem<T>) -> SelectItem<T2> {
762 fold_select_item(self, node)
763 }
764 fn fold_select_option(&mut self, node: SelectOption<T>) -> SelectOption<T2> {
765 fold_select_option(self, node)
766 }
767 fn fold_select_option_name(&mut self, node: SelectOptionName) -> SelectOptionName {
768 fold_select_option_name(self, node)
769 }
770 fn fold_select_statement(&mut self, node: SelectStatement<T>) -> SelectStatement<T2> {
771 fold_select_statement(self, node)
772 }
773 fn fold_set_expr(&mut self, node: SetExpr<T>) -> SetExpr<T2> {
774 fold_set_expr(self, node)
775 }
776 fn fold_set_operator(&mut self, node: SetOperator) -> SetOperator {
777 fold_set_operator(self, node)
778 }
779 fn fold_set_role_var(&mut self, node: SetRoleVar) -> SetRoleVar {
780 fold_set_role_var(self, node)
781 }
782 fn fold_set_transaction_statement(&mut self, node: SetTransactionStatement) -> SetTransactionStatement {
783 fold_set_transaction_statement(self, node)
784 }
785 fn fold_set_variable_statement(&mut self, node: SetVariableStatement) -> SetVariableStatement {
786 fold_set_variable_statement(self, node)
787 }
788 fn fold_set_variable_to(&mut self, node: SetVariableTo) -> SetVariableTo {
789 fold_set_variable_to(self, node)
790 }
791 fn fold_set_variable_value(&mut self, node: SetVariableValue) -> SetVariableValue {
792 fold_set_variable_value(self, node)
793 }
794 fn fold_show_columns_statement(&mut self, node: ShowColumnsStatement<T>) -> ShowColumnsStatement<T2> {
795 fold_show_columns_statement(self, node)
796 }
797 fn fold_show_create_cluster_statement(&mut self, node: ShowCreateClusterStatement<T>) -> ShowCreateClusterStatement<T2> {
798 fold_show_create_cluster_statement(self, node)
799 }
800 fn fold_show_create_connection_statement(&mut self, node: ShowCreateConnectionStatement<T>) -> ShowCreateConnectionStatement<T2> {
801 fold_show_create_connection_statement(self, node)
802 }
803 fn fold_show_create_index_statement(&mut self, node: ShowCreateIndexStatement<T>) -> ShowCreateIndexStatement<T2> {
804 fold_show_create_index_statement(self, node)
805 }
806 fn fold_show_create_materialized_view_statement(&mut self, node: ShowCreateMaterializedViewStatement<T>) -> ShowCreateMaterializedViewStatement<T2> {
807 fold_show_create_materialized_view_statement(self, node)
808 }
809 fn fold_show_create_metric_sink_statement(&mut self, node: ShowCreateMetricSinkStatement<T>) -> ShowCreateMetricSinkStatement<T2> {
810 fold_show_create_metric_sink_statement(self, node)
811 }
812 fn fold_show_create_sink_statement(&mut self, node: ShowCreateSinkStatement<T>) -> ShowCreateSinkStatement<T2> {
813 fold_show_create_sink_statement(self, node)
814 }
815 fn fold_show_create_source_statement(&mut self, node: ShowCreateSourceStatement<T>) -> ShowCreateSourceStatement<T2> {
816 fold_show_create_source_statement(self, node)
817 }
818 fn fold_show_create_table_statement(&mut self, node: ShowCreateTableStatement<T>) -> ShowCreateTableStatement<T2> {
819 fold_show_create_table_statement(self, node)
820 }
821 fn fold_show_create_type_statement(&mut self, node: ShowCreateTypeStatement<T>) -> ShowCreateTypeStatement<T2> {
822 fold_show_create_type_statement(self, node)
823 }
824 fn fold_show_create_view_statement(&mut self, node: ShowCreateViewStatement<T>) -> ShowCreateViewStatement<T2> {
825 fold_show_create_view_statement(self, node)
826 }
827 fn fold_show_object_type(&mut self, node: ShowObjectType<T>) -> ShowObjectType<T2> {
828 fold_show_object_type(self, node)
829 }
830 fn fold_show_objects_statement(&mut self, node: ShowObjectsStatement<T>) -> ShowObjectsStatement<T2> {
831 fold_show_objects_statement(self, node)
832 }
833 fn fold_show_statement(&mut self, node: ShowStatement<T>) -> ShowStatement<T2> {
834 fold_show_statement(self, node)
835 }
836 fn fold_show_statement_filter(&mut self, node: ShowStatementFilter<T>) -> ShowStatementFilter<T2> {
837 fold_show_statement_filter(self, node)
838 }
839 fn fold_show_variable_statement(&mut self, node: ShowVariableStatement) -> ShowVariableStatement {
840 fold_show_variable_statement(self, node)
841 }
842 fn fold_sink_envelope(&mut self, node: SinkEnvelope) -> SinkEnvelope {
843 fold_sink_envelope(self, node)
844 }
845 fn fold_sink_key(&mut self, node: SinkKey) -> SinkKey {
846 fold_sink_key(self, node)
847 }
848 fn fold_source_envelope(&mut self, node: SourceEnvelope) -> SourceEnvelope {
849 fold_source_envelope(self, node)
850 }
851 fn fold_source_error_policy(&mut self, node: SourceErrorPolicy) -> SourceErrorPolicy {
852 fold_source_error_policy(self, node)
853 }
854 fn fold_source_include_metadata(&mut self, node: SourceIncludeMetadata) -> SourceIncludeMetadata {
855 fold_source_include_metadata(self, node)
856 }
857 fn fold_sql_server_config_option(&mut self, node: SqlServerConfigOption<T>) -> SqlServerConfigOption<T2> {
858 fold_sql_server_config_option(self, node)
859 }
860 fn fold_sql_server_config_option_name(&mut self, node: SqlServerConfigOptionName) -> SqlServerConfigOptionName {
861 fold_sql_server_config_option_name(self, node)
862 }
863 fn fold_start_transaction_statement(&mut self, node: StartTransactionStatement) -> StartTransactionStatement {
864 fold_start_transaction_statement(self, node)
865 }
866 fn fold_statement(&mut self, node: Statement<T>) -> Statement<T2> {
867 fold_statement(self, node)
868 }
869 fn fold_subscribe_option(&mut self, node: SubscribeOption<T>) -> SubscribeOption<T2> {
870 fold_subscribe_option(self, node)
871 }
872 fn fold_subscribe_option_name(&mut self, node: SubscribeOptionName) -> SubscribeOptionName {
873 fold_subscribe_option_name(self, node)
874 }
875 fn fold_subscribe_output(&mut self, node: SubscribeOutput<T>) -> SubscribeOutput<T2> {
876 fold_subscribe_output(self, node)
877 }
878 fn fold_subscribe_relation(&mut self, node: SubscribeRelation<T>) -> SubscribeRelation<T2> {
879 fold_subscribe_relation(self, node)
880 }
881 fn fold_subscribe_statement(&mut self, node: SubscribeStatement<T>) -> SubscribeStatement<T2> {
882 fold_subscribe_statement(self, node)
883 }
884 fn fold_subscript_position(&mut self, node: SubscriptPosition<T>) -> SubscriptPosition<T2> {
885 fold_subscript_position(self, node)
886 }
887 fn fold_system_object_type(&mut self, node: SystemObjectType) -> SystemObjectType {
888 fold_system_object_type(self, node)
889 }
890 fn fold_cluster_name(&mut self, node: T::ClusterName) -> T2::ClusterName;
891 fn fold_column_reference(&mut self, node: T::ColumnReference) -> T2::ColumnReference;
892 fn fold_cte_id(&mut self, node: T::CteId) -> T2::CteId;
893 fn fold_data_type(&mut self, node: T::DataType) -> T2::DataType;
894 fn fold_database_name(&mut self, node: T::DatabaseName) -> T2::DatabaseName;
895 fn fold_item_name(&mut self, node: T::ItemName) -> T2::ItemName;
896 fn fold_nested_statement(&mut self, node: T::NestedStatement) -> T2::NestedStatement;
897 fn fold_network_policy_name(&mut self, node: T::NetworkPolicyName) -> T2::NetworkPolicyName;
898 fn fold_object_name(&mut self, node: T::ObjectName) -> T2::ObjectName;
899 fn fold_role_name(&mut self, node: T::RoleName) -> T2::RoleName;
900 fn fold_schema_name(&mut self, node: T::SchemaName) -> T2::SchemaName;
901 fn fold_table_alias(&mut self, node: TableAlias) -> TableAlias {
902 fold_table_alias(self, node)
903 }
904 fn fold_table_constraint(&mut self, node: TableConstraint<T>) -> TableConstraint<T2> {
905 fold_table_constraint(self, node)
906 }
907 fn fold_table_factor(&mut self, node: TableFactor<T>) -> TableFactor<T2> {
908 fold_table_factor(self, node)
909 }
910 fn fold_table_from_source_columns(&mut self, node: TableFromSourceColumns<T>) -> TableFromSourceColumns<T2> {
911 fold_table_from_source_columns(self, node)
912 }
913 fn fold_table_from_source_option(&mut self, node: TableFromSourceOption<T>) -> TableFromSourceOption<T2> {
914 fold_table_from_source_option(self, node)
915 }
916 fn fold_table_from_source_option_name(&mut self, node: TableFromSourceOptionName) -> TableFromSourceOptionName {
917 fold_table_from_source_option_name(self, node)
918 }
919 fn fold_table_option(&mut self, node: TableOption<T>) -> TableOption<T2> {
920 fold_table_option(self, node)
921 }
922 fn fold_table_option_name(&mut self, node: TableOptionName) -> TableOptionName {
923 fold_table_option_name(self, node)
924 }
925 fn fold_table_with_joins(&mut self, node: TableWithJoins<T>) -> TableWithJoins<T2> {
926 fold_table_with_joins(self, node)
927 }
928 fn fold_target_role_specification(&mut self, node: TargetRoleSpecification<T>) -> TargetRoleSpecification<T2> {
929 fold_target_role_specification(self, node)
930 }
931 fn fold_transaction_access_mode(&mut self, node: TransactionAccessMode) -> TransactionAccessMode {
932 fold_transaction_access_mode(self, node)
933 }
934 fn fold_transaction_isolation_level(&mut self, node: TransactionIsolationLevel) -> TransactionIsolationLevel {
935 fold_transaction_isolation_level(self, node)
936 }
937 fn fold_transaction_mode(&mut self, node: TransactionMode) -> TransactionMode {
938 fold_transaction_mode(self, node)
939 }
940 fn fold_unresolved_database_name(&mut self, node: UnresolvedDatabaseName) -> UnresolvedDatabaseName {
941 fold_unresolved_database_name(self, node)
942 }
943 fn fold_unresolved_item_name(&mut self, node: UnresolvedItemName) -> UnresolvedItemName {
944 fold_unresolved_item_name(self, node)
945 }
946 fn fold_unresolved_object_name(&mut self, node: UnresolvedObjectName) -> UnresolvedObjectName {
947 fold_unresolved_object_name(self, node)
948 }
949 fn fold_unresolved_schema_name(&mut self, node: UnresolvedSchemaName) -> UnresolvedSchemaName {
950 fold_unresolved_schema_name(self, node)
951 }
952 fn fold_update_statement(&mut self, node: UpdateStatement<T>) -> UpdateStatement<T2> {
953 fold_update_statement(self, node)
954 }
955 fn fold_validate_connection_statement(&mut self, node: ValidateConnectionStatement<T>) -> ValidateConnectionStatement<T2> {
956 fold_validate_connection_statement(self, node)
957 }
958 fn fold_value(&mut self, node: Value) -> Value {
959 fold_value(self, node)
960 }
961 fn fold_value_error(&mut self, node: ValueError) -> ValueError {
962 fold_value_error(self, node)
963 }
964 fn fold_values(&mut self, node: Values<T>) -> Values<T2> {
965 fold_values(self, node)
966 }
967 fn fold_version(&mut self, node: Version) -> Version {
968 fold_version(self, node)
969 }
970 fn fold_view_definition(&mut self, node: ViewDefinition<T>) -> ViewDefinition<T2> {
971 fold_view_definition(self, node)
972 }
973 fn fold_window_frame(&mut self, node: WindowFrame) -> WindowFrame {
974 fold_window_frame(self, node)
975 }
976 fn fold_window_frame_bound(&mut self, node: WindowFrameBound) -> WindowFrameBound {
977 fold_window_frame_bound(self, node)
978 }
979 fn fold_window_frame_units(&mut self, node: WindowFrameUnits) -> WindowFrameUnits {
980 fold_window_frame_units(self, node)
981 }
982 fn fold_window_spec(&mut self, node: WindowSpec<T>) -> WindowSpec<T2> {
983 fold_window_spec(self, node)
984 }
985 fn fold_with_option_value(&mut self, node: WithOptionValue<T>) -> WithOptionValue<T2> {
986 fold_with_option_value(self, node)
987 }
988}
989pub trait FoldNode<T: AstInfo, T2: AstInfo, > {
990 type Folded;
991 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded;
992}
993impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AbbreviatedGrantOrRevokeStatement<T> {
994 type Folded = AbbreviatedGrantOrRevokeStatement<T2>;
995 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
996 folder.fold_abbreviated_grant_or_revoke_statement(self)
997 }
998}
999#[allow(clippy::needless_pass_by_ref_mut)]
1000pub fn fold_abbreviated_grant_or_revoke_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AbbreviatedGrantOrRevokeStatement<T>) -> AbbreviatedGrantOrRevokeStatement<T2>
1001where
1002 F: Fold<T, T2, > + ?Sized,
1003{
1004 match node {
1005 AbbreviatedGrantOrRevokeStatement::Grant {
1006 0: binding0,
1007 } => {
1008 AbbreviatedGrantOrRevokeStatement::Grant {
1009 0: folder.fold_abbreviated_grant_statement(binding0),
1010 }
1011 }
1012 AbbreviatedGrantOrRevokeStatement::Revoke {
1013 0: binding0,
1014 } => {
1015 AbbreviatedGrantOrRevokeStatement::Revoke {
1016 0: folder.fold_abbreviated_revoke_statement(binding0),
1017 }
1018 }
1019 }
1020}
1021impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AbbreviatedGrantStatement<T> {
1022 type Folded = AbbreviatedGrantStatement<T2>;
1023 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1024 folder.fold_abbreviated_grant_statement(self)
1025 }
1026}
1027#[allow(clippy::needless_pass_by_ref_mut)]
1028pub fn fold_abbreviated_grant_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AbbreviatedGrantStatement<T>) -> AbbreviatedGrantStatement<T2>
1029where
1030 F: Fold<T, T2, > + ?Sized,
1031{
1032 AbbreviatedGrantStatement {
1033 privileges: folder.fold_privilege_specification(node.privileges),
1034 object_type: folder.fold_object_type(node.object_type),
1035 grantees: node.grantees.into_iter().map(|v| folder.fold_role_name(v)).collect(),
1036 }
1037}
1038impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AbbreviatedRevokeStatement<T> {
1039 type Folded = AbbreviatedRevokeStatement<T2>;
1040 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1041 folder.fold_abbreviated_revoke_statement(self)
1042 }
1043}
1044#[allow(clippy::needless_pass_by_ref_mut)]
1045pub fn fold_abbreviated_revoke_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AbbreviatedRevokeStatement<T>) -> AbbreviatedRevokeStatement<T2>
1046where
1047 F: Fold<T, T2, > + ?Sized,
1048{
1049 AbbreviatedRevokeStatement {
1050 privileges: folder.fold_privilege_specification(node.privileges),
1051 object_type: folder.fold_object_type(node.object_type),
1052 revokees: node.revokees.into_iter().map(|v| folder.fold_role_name(v)).collect(),
1053 }
1054}
1055impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterClusterAction<T> {
1056 type Folded = AlterClusterAction<T2>;
1057 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1058 folder.fold_alter_cluster_action(self)
1059 }
1060}
1061#[allow(clippy::needless_pass_by_ref_mut)]
1062pub fn fold_alter_cluster_action<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterClusterAction<T>) -> AlterClusterAction<T2>
1063where
1064 F: Fold<T, T2, > + ?Sized,
1065{
1066 match node {
1067 AlterClusterAction::SetOptions {
1068 options: binding0,
1069 with_options: binding1,
1070 } => {
1071 AlterClusterAction::SetOptions {
1072 options: binding0.into_iter().map(|v| folder.fold_cluster_option(v)).collect(),
1073 with_options: binding1.into_iter().map(|v| folder.fold_cluster_alter_option(v)).collect(),
1074 }
1075 }
1076 AlterClusterAction::ResetOptions {
1077 0: binding0,
1078 } => {
1079 AlterClusterAction::ResetOptions {
1080 0: binding0.into_iter().map(|v| folder.fold_cluster_option_name(v)).collect(),
1081 }
1082 }
1083 }
1084}
1085impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterClusterStatement<T> {
1086 type Folded = AlterClusterStatement<T2>;
1087 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1088 folder.fold_alter_cluster_statement(self)
1089 }
1090}
1091#[allow(clippy::needless_pass_by_ref_mut)]
1092pub fn fold_alter_cluster_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterClusterStatement<T>) -> AlterClusterStatement<T2>
1093where
1094 F: Fold<T, T2, > + ?Sized,
1095{
1096 AlterClusterStatement {
1097 if_exists: node.if_exists,
1098 name: folder.fold_ident(node.name),
1099 action: folder.fold_alter_cluster_action(node.action),
1100 }
1101}
1102impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterConnectionAction<T> {
1103 type Folded = AlterConnectionAction<T2>;
1104 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1105 folder.fold_alter_connection_action(self)
1106 }
1107}
1108#[allow(clippy::needless_pass_by_ref_mut)]
1109pub fn fold_alter_connection_action<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterConnectionAction<T>) -> AlterConnectionAction<T2>
1110where
1111 F: Fold<T, T2, > + ?Sized,
1112{
1113 match node {
1114 AlterConnectionAction::RotateKeys {
1115 } => {
1116 AlterConnectionAction::RotateKeys {
1117 }
1118 }
1119 AlterConnectionAction::SetOption {
1120 0: binding0,
1121 } => {
1122 AlterConnectionAction::SetOption {
1123 0: folder.fold_connection_option(binding0),
1124 }
1125 }
1126 AlterConnectionAction::DropOption {
1127 0: binding0,
1128 } => {
1129 AlterConnectionAction::DropOption {
1130 0: folder.fold_connection_option_name(binding0),
1131 }
1132 }
1133 }
1134}
1135impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterConnectionOption<T> {
1136 type Folded = AlterConnectionOption<T2>;
1137 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1138 folder.fold_alter_connection_option(self)
1139 }
1140}
1141#[allow(clippy::needless_pass_by_ref_mut)]
1142pub fn fold_alter_connection_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterConnectionOption<T>) -> AlterConnectionOption<T2>
1143where
1144 F: Fold<T, T2, > + ?Sized,
1145{
1146 AlterConnectionOption {
1147 name: folder.fold_alter_connection_option_name(node.name),
1148 value: node.value.map(|v| folder.fold_with_option_value(v)),
1149 }
1150}
1151impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterConnectionOptionName {
1152 type Folded = AlterConnectionOptionName;
1153 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1154 folder.fold_alter_connection_option_name(self)
1155 }
1156}
1157#[allow(clippy::needless_pass_by_ref_mut)]
1158pub fn fold_alter_connection_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterConnectionOptionName) -> AlterConnectionOptionName
1159where
1160 F: Fold<T, T2, > + ?Sized,
1161{
1162 match node {
1163 AlterConnectionOptionName::Validate {
1164 } => {
1165 AlterConnectionOptionName::Validate {
1166 }
1167 }
1168 }
1169}
1170impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterConnectionStatement<T> {
1171 type Folded = AlterConnectionStatement<T2>;
1172 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1173 folder.fold_alter_connection_statement(self)
1174 }
1175}
1176#[allow(clippy::needless_pass_by_ref_mut)]
1177pub fn fold_alter_connection_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterConnectionStatement<T>) -> AlterConnectionStatement<T2>
1178where
1179 F: Fold<T, T2, > + ?Sized,
1180{
1181 AlterConnectionStatement {
1182 name: folder.fold_unresolved_item_name(node.name),
1183 if_exists: node.if_exists,
1184 actions: node.actions.into_iter().map(|v| folder.fold_alter_connection_action(v)).collect(),
1185 with_options: node.with_options.into_iter().map(|v| folder.fold_alter_connection_option(v)).collect(),
1186 }
1187}
1188impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterDefaultPrivilegesStatement<T> {
1189 type Folded = AlterDefaultPrivilegesStatement<T2>;
1190 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1191 folder.fold_alter_default_privileges_statement(self)
1192 }
1193}
1194#[allow(clippy::needless_pass_by_ref_mut)]
1195pub fn fold_alter_default_privileges_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterDefaultPrivilegesStatement<T>) -> AlterDefaultPrivilegesStatement<T2>
1196where
1197 F: Fold<T, T2, > + ?Sized,
1198{
1199 AlterDefaultPrivilegesStatement {
1200 target_roles: folder.fold_target_role_specification(node.target_roles),
1201 target_objects: folder.fold_grant_target_all_specification(node.target_objects),
1202 grant_or_revoke: folder.fold_abbreviated_grant_or_revoke_statement(node.grant_or_revoke),
1203 }
1204}
1205impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterIndexAction<T> {
1206 type Folded = AlterIndexAction<T2>;
1207 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1208 folder.fold_alter_index_action(self)
1209 }
1210}
1211#[allow(clippy::needless_pass_by_ref_mut)]
1212pub fn fold_alter_index_action<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterIndexAction<T>) -> AlterIndexAction<T2>
1213where
1214 F: Fold<T, T2, > + ?Sized,
1215{
1216 match node {
1217 AlterIndexAction::SetOptions {
1218 0: binding0,
1219 } => {
1220 AlterIndexAction::SetOptions {
1221 0: binding0.into_iter().map(|v| folder.fold_index_option(v)).collect(),
1222 }
1223 }
1224 AlterIndexAction::ResetOptions {
1225 0: binding0,
1226 } => {
1227 AlterIndexAction::ResetOptions {
1228 0: binding0.into_iter().map(|v| folder.fold_index_option_name(v)).collect(),
1229 }
1230 }
1231 }
1232}
1233impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterIndexStatement<T> {
1234 type Folded = AlterIndexStatement<T2>;
1235 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1236 folder.fold_alter_index_statement(self)
1237 }
1238}
1239#[allow(clippy::needless_pass_by_ref_mut)]
1240pub fn fold_alter_index_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterIndexStatement<T>) -> AlterIndexStatement<T2>
1241where
1242 F: Fold<T, T2, > + ?Sized,
1243{
1244 AlterIndexStatement {
1245 index_name: folder.fold_unresolved_item_name(node.index_name),
1246 if_exists: node.if_exists,
1247 action: folder.fold_alter_index_action(node.action),
1248 }
1249}
1250impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterMaterializedViewApplyReplacementStatement {
1251 type Folded = AlterMaterializedViewApplyReplacementStatement;
1252 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1253 folder.fold_alter_materialized_view_apply_replacement_statement(self)
1254 }
1255}
1256#[allow(clippy::needless_pass_by_ref_mut)]
1257pub fn fold_alter_materialized_view_apply_replacement_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterMaterializedViewApplyReplacementStatement) -> AlterMaterializedViewApplyReplacementStatement
1258where
1259 F: Fold<T, T2, > + ?Sized,
1260{
1261 AlterMaterializedViewApplyReplacementStatement {
1262 if_exists: node.if_exists,
1263 name: folder.fold_unresolved_item_name(node.name),
1264 replacement_name: folder.fold_unresolved_item_name(node.replacement_name),
1265 }
1266}
1267impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterNetworkPolicyStatement<T> {
1268 type Folded = AlterNetworkPolicyStatement<T2>;
1269 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1270 folder.fold_alter_network_policy_statement(self)
1271 }
1272}
1273#[allow(clippy::needless_pass_by_ref_mut)]
1274pub fn fold_alter_network_policy_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterNetworkPolicyStatement<T>) -> AlterNetworkPolicyStatement<T2>
1275where
1276 F: Fold<T, T2, > + ?Sized,
1277{
1278 AlterNetworkPolicyStatement {
1279 name: folder.fold_ident(node.name),
1280 options: node.options.into_iter().map(|v| folder.fold_network_policy_option(v)).collect(),
1281 }
1282}
1283impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterObjectRenameStatement {
1284 type Folded = AlterObjectRenameStatement;
1285 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1286 folder.fold_alter_object_rename_statement(self)
1287 }
1288}
1289#[allow(clippy::needless_pass_by_ref_mut)]
1290pub fn fold_alter_object_rename_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterObjectRenameStatement) -> AlterObjectRenameStatement
1291where
1292 F: Fold<T, T2, > + ?Sized,
1293{
1294 AlterObjectRenameStatement {
1295 object_type: folder.fold_object_type(node.object_type),
1296 if_exists: node.if_exists,
1297 name: folder.fold_unresolved_object_name(node.name),
1298 to_item_name: folder.fold_ident(node.to_item_name),
1299 }
1300}
1301impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterObjectSwapStatement {
1302 type Folded = AlterObjectSwapStatement;
1303 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1304 folder.fold_alter_object_swap_statement(self)
1305 }
1306}
1307#[allow(clippy::needless_pass_by_ref_mut)]
1308pub fn fold_alter_object_swap_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterObjectSwapStatement) -> AlterObjectSwapStatement
1309where
1310 F: Fold<T, T2, > + ?Sized,
1311{
1312 AlterObjectSwapStatement {
1313 object_type: folder.fold_object_type(node.object_type),
1314 if_exists: node.if_exists,
1315 name_a: folder.fold_unresolved_object_name(node.name_a),
1316 name_b: folder.fold_ident(node.name_b),
1317 }
1318}
1319impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterOwnerStatement<T> {
1320 type Folded = AlterOwnerStatement<T2>;
1321 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1322 folder.fold_alter_owner_statement(self)
1323 }
1324}
1325#[allow(clippy::needless_pass_by_ref_mut)]
1326pub fn fold_alter_owner_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterOwnerStatement<T>) -> AlterOwnerStatement<T2>
1327where
1328 F: Fold<T, T2, > + ?Sized,
1329{
1330 AlterOwnerStatement {
1331 object_type: folder.fold_object_type(node.object_type),
1332 if_exists: node.if_exists,
1333 name: folder.fold_unresolved_object_name(node.name),
1334 new_owner: folder.fold_role_name(node.new_owner),
1335 }
1336}
1337impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterRetainHistoryStatement<T> {
1338 type Folded = AlterRetainHistoryStatement<T2>;
1339 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1340 folder.fold_alter_retain_history_statement(self)
1341 }
1342}
1343#[allow(clippy::needless_pass_by_ref_mut)]
1344pub fn fold_alter_retain_history_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterRetainHistoryStatement<T>) -> AlterRetainHistoryStatement<T2>
1345where
1346 F: Fold<T, T2, > + ?Sized,
1347{
1348 AlterRetainHistoryStatement {
1349 object_type: folder.fold_object_type(node.object_type),
1350 if_exists: node.if_exists,
1351 name: folder.fold_unresolved_object_name(node.name),
1352 history: node.history.map(|v| folder.fold_with_option_value(v)),
1353 }
1354}
1355impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterRoleOption {
1356 type Folded = AlterRoleOption;
1357 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1358 folder.fold_alter_role_option(self)
1359 }
1360}
1361#[allow(clippy::needless_pass_by_ref_mut)]
1362pub fn fold_alter_role_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterRoleOption) -> AlterRoleOption
1363where
1364 F: Fold<T, T2, > + ?Sized,
1365{
1366 match node {
1367 AlterRoleOption::Attributes {
1368 0: binding0,
1369 } => {
1370 AlterRoleOption::Attributes {
1371 0: binding0.into_iter().map(|v| folder.fold_role_attribute(v)).collect(),
1372 }
1373 }
1374 AlterRoleOption::Variable {
1375 0: binding0,
1376 } => {
1377 AlterRoleOption::Variable {
1378 0: folder.fold_set_role_var(binding0),
1379 }
1380 }
1381 }
1382}
1383impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterRoleStatement<T> {
1384 type Folded = AlterRoleStatement<T2>;
1385 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1386 folder.fold_alter_role_statement(self)
1387 }
1388}
1389#[allow(clippy::needless_pass_by_ref_mut)]
1390pub fn fold_alter_role_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterRoleStatement<T>) -> AlterRoleStatement<T2>
1391where
1392 F: Fold<T, T2, > + ?Sized,
1393{
1394 AlterRoleStatement {
1395 name: folder.fold_role_name(node.name),
1396 option: folder.fold_alter_role_option(node.option),
1397 }
1398}
1399impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSecretStatement<T> {
1400 type Folded = AlterSecretStatement<T2>;
1401 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1402 folder.fold_alter_secret_statement(self)
1403 }
1404}
1405#[allow(clippy::needless_pass_by_ref_mut)]
1406pub fn fold_alter_secret_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSecretStatement<T>) -> AlterSecretStatement<T2>
1407where
1408 F: Fold<T, T2, > + ?Sized,
1409{
1410 AlterSecretStatement {
1411 name: folder.fold_unresolved_item_name(node.name),
1412 if_exists: node.if_exists,
1413 value: folder.fold_expr(node.value),
1414 }
1415}
1416impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSetClusterStatement<T> {
1417 type Folded = AlterSetClusterStatement<T2>;
1418 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1419 folder.fold_alter_set_cluster_statement(self)
1420 }
1421}
1422#[allow(clippy::needless_pass_by_ref_mut)]
1423pub fn fold_alter_set_cluster_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSetClusterStatement<T>) -> AlterSetClusterStatement<T2>
1424where
1425 F: Fold<T, T2, > + ?Sized,
1426{
1427 AlterSetClusterStatement {
1428 if_exists: node.if_exists,
1429 name: folder.fold_unresolved_item_name(node.name),
1430 object_type: folder.fold_object_type(node.object_type),
1431 set_cluster: folder.fold_cluster_name(node.set_cluster),
1432 }
1433}
1434impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSinkAction<T> {
1435 type Folded = AlterSinkAction<T2>;
1436 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1437 folder.fold_alter_sink_action(self)
1438 }
1439}
1440#[allow(clippy::needless_pass_by_ref_mut)]
1441pub fn fold_alter_sink_action<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSinkAction<T>) -> AlterSinkAction<T2>
1442where
1443 F: Fold<T, T2, > + ?Sized,
1444{
1445 match node {
1446 AlterSinkAction::SetOptions {
1447 0: binding0,
1448 } => {
1449 AlterSinkAction::SetOptions {
1450 0: binding0.into_iter().map(|v| folder.fold_create_sink_option(v)).collect(),
1451 }
1452 }
1453 AlterSinkAction::ResetOptions {
1454 0: binding0,
1455 } => {
1456 AlterSinkAction::ResetOptions {
1457 0: binding0.into_iter().map(|v| folder.fold_create_sink_option_name(v)).collect(),
1458 }
1459 }
1460 AlterSinkAction::ChangeRelation {
1461 0: binding0,
1462 } => {
1463 AlterSinkAction::ChangeRelation {
1464 0: folder.fold_item_name(binding0),
1465 }
1466 }
1467 }
1468}
1469impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSinkStatement<T> {
1470 type Folded = AlterSinkStatement<T2>;
1471 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1472 folder.fold_alter_sink_statement(self)
1473 }
1474}
1475#[allow(clippy::needless_pass_by_ref_mut)]
1476pub fn fold_alter_sink_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSinkStatement<T>) -> AlterSinkStatement<T2>
1477where
1478 F: Fold<T, T2, > + ?Sized,
1479{
1480 AlterSinkStatement {
1481 sink_name: folder.fold_unresolved_item_name(node.sink_name),
1482 if_exists: node.if_exists,
1483 action: folder.fold_alter_sink_action(node.action),
1484 }
1485}
1486impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSourceAction<T> {
1487 type Folded = AlterSourceAction<T2>;
1488 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1489 folder.fold_alter_source_action(self)
1490 }
1491}
1492#[allow(clippy::needless_pass_by_ref_mut)]
1493pub fn fold_alter_source_action<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSourceAction<T>) -> AlterSourceAction<T2>
1494where
1495 F: Fold<T, T2, > + ?Sized,
1496{
1497 match node {
1498 AlterSourceAction::SetOptions {
1499 0: binding0,
1500 } => {
1501 AlterSourceAction::SetOptions {
1502 0: binding0.into_iter().map(|v| folder.fold_create_source_option(v)).collect(),
1503 }
1504 }
1505 AlterSourceAction::ResetOptions {
1506 0: binding0,
1507 } => {
1508 AlterSourceAction::ResetOptions {
1509 0: binding0.into_iter().map(|v| folder.fold_create_source_option_name(v)).collect(),
1510 }
1511 }
1512 AlterSourceAction::AddSubsources {
1513 external_references: binding0,
1514 options: binding1,
1515 } => {
1516 AlterSourceAction::AddSubsources {
1517 external_references: binding0.into_iter().map(|v| folder.fold_external_reference_export(v)).collect(),
1518 options: binding1.into_iter().map(|v| folder.fold_alter_source_add_subsource_option(v)).collect(),
1519 }
1520 }
1521 AlterSourceAction::DropSubsources {
1522 if_exists: binding0,
1523 cascade: binding1,
1524 names: binding2,
1525 } => {
1526 AlterSourceAction::DropSubsources {
1527 if_exists: binding0,
1528 cascade: binding1,
1529 names: binding2.into_iter().map(|v| folder.fold_unresolved_item_name(v)).collect(),
1530 }
1531 }
1532 AlterSourceAction::RefreshReferences {
1533 } => {
1534 AlterSourceAction::RefreshReferences {
1535 }
1536 }
1537 }
1538}
1539impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSourceAddSubsourceOption<T> {
1540 type Folded = AlterSourceAddSubsourceOption<T2>;
1541 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1542 folder.fold_alter_source_add_subsource_option(self)
1543 }
1544}
1545#[allow(clippy::needless_pass_by_ref_mut)]
1546pub fn fold_alter_source_add_subsource_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSourceAddSubsourceOption<T>) -> AlterSourceAddSubsourceOption<T2>
1547where
1548 F: Fold<T, T2, > + ?Sized,
1549{
1550 AlterSourceAddSubsourceOption {
1551 name: folder.fold_alter_source_add_subsource_option_name(node.name),
1552 value: node.value.map(|v| folder.fold_with_option_value(v)),
1553 }
1554}
1555impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSourceAddSubsourceOptionName {
1556 type Folded = AlterSourceAddSubsourceOptionName;
1557 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1558 folder.fold_alter_source_add_subsource_option_name(self)
1559 }
1560}
1561#[allow(clippy::needless_pass_by_ref_mut)]
1562pub fn fold_alter_source_add_subsource_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSourceAddSubsourceOptionName) -> AlterSourceAddSubsourceOptionName
1563where
1564 F: Fold<T, T2, > + ?Sized,
1565{
1566 match node {
1567 AlterSourceAddSubsourceOptionName::TextColumns {
1568 } => {
1569 AlterSourceAddSubsourceOptionName::TextColumns {
1570 }
1571 }
1572 AlterSourceAddSubsourceOptionName::ExcludeColumns {
1573 } => {
1574 AlterSourceAddSubsourceOptionName::ExcludeColumns {
1575 }
1576 }
1577 AlterSourceAddSubsourceOptionName::Details {
1578 } => {
1579 AlterSourceAddSubsourceOptionName::Details {
1580 }
1581 }
1582 }
1583}
1584impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSourceStatement<T> {
1585 type Folded = AlterSourceStatement<T2>;
1586 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1587 folder.fold_alter_source_statement(self)
1588 }
1589}
1590#[allow(clippy::needless_pass_by_ref_mut)]
1591pub fn fold_alter_source_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSourceStatement<T>) -> AlterSourceStatement<T2>
1592where
1593 F: Fold<T, T2, > + ?Sized,
1594{
1595 AlterSourceStatement {
1596 source_name: folder.fold_unresolved_item_name(node.source_name),
1597 if_exists: node.if_exists,
1598 action: folder.fold_alter_source_action(node.action),
1599 }
1600}
1601impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSystemResetAllStatement {
1602 type Folded = AlterSystemResetAllStatement;
1603 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1604 folder.fold_alter_system_reset_all_statement(self)
1605 }
1606}
1607#[allow(clippy::needless_pass_by_ref_mut)]
1608pub fn fold_alter_system_reset_all_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSystemResetAllStatement) -> AlterSystemResetAllStatement
1609where
1610 F: Fold<T, T2, > + ?Sized,
1611{
1612 AlterSystemResetAllStatement {
1613 }
1614}
1615impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSystemResetStatement {
1616 type Folded = AlterSystemResetStatement;
1617 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1618 folder.fold_alter_system_reset_statement(self)
1619 }
1620}
1621#[allow(clippy::needless_pass_by_ref_mut)]
1622pub fn fold_alter_system_reset_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSystemResetStatement) -> AlterSystemResetStatement
1623where
1624 F: Fold<T, T2, > + ?Sized,
1625{
1626 AlterSystemResetStatement {
1627 name: folder.fold_ident(node.name),
1628 }
1629}
1630impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterSystemSetStatement {
1631 type Folded = AlterSystemSetStatement;
1632 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1633 folder.fold_alter_system_set_statement(self)
1634 }
1635}
1636#[allow(clippy::needless_pass_by_ref_mut)]
1637pub fn fold_alter_system_set_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterSystemSetStatement) -> AlterSystemSetStatement
1638where
1639 F: Fold<T, T2, > + ?Sized,
1640{
1641 AlterSystemSetStatement {
1642 name: folder.fold_ident(node.name),
1643 to: folder.fold_set_variable_to(node.to),
1644 }
1645}
1646impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AlterTableAddColumnStatement<T> {
1647 type Folded = AlterTableAddColumnStatement<T2>;
1648 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1649 folder.fold_alter_table_add_column_statement(self)
1650 }
1651}
1652#[allow(clippy::needless_pass_by_ref_mut)]
1653pub fn fold_alter_table_add_column_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AlterTableAddColumnStatement<T>) -> AlterTableAddColumnStatement<T2>
1654where
1655 F: Fold<T, T2, > + ?Sized,
1656{
1657 AlterTableAddColumnStatement {
1658 if_exists: node.if_exists,
1659 name: folder.fold_unresolved_item_name(node.name),
1660 if_col_not_exist: node.if_col_not_exist,
1661 column_name: folder.fold_ident(node.column_name),
1662 data_type: folder.fold_data_type(node.data_type),
1663 }
1664}
1665impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AsOf<T> {
1666 type Folded = AsOf<T2>;
1667 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1668 folder.fold_as_of(self)
1669 }
1670}
1671#[allow(clippy::needless_pass_by_ref_mut)]
1672pub fn fold_as_of<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AsOf<T>) -> AsOf<T2>
1673where
1674 F: Fold<T, T2, > + ?Sized,
1675{
1676 match node {
1677 AsOf::At {
1678 0: binding0,
1679 } => {
1680 AsOf::At {
1681 0: folder.fold_expr(binding0),
1682 }
1683 }
1684 AsOf::AtLeast {
1685 0: binding0,
1686 } => {
1687 AsOf::AtLeast {
1688 0: folder.fold_expr(binding0),
1689 }
1690 }
1691 }
1692}
1693impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Assignment<T> {
1694 type Folded = Assignment<T2>;
1695 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1696 folder.fold_assignment(self)
1697 }
1698}
1699#[allow(clippy::needless_pass_by_ref_mut)]
1700pub fn fold_assignment<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Assignment<T>) -> Assignment<T2>
1701where
1702 F: Fold<T, T2, > + ?Sized,
1703{
1704 Assignment {
1705 id: folder.fold_ident(node.id),
1706 value: folder.fold_expr(node.value),
1707 }
1708}
1709impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AvroDocOn<T> {
1710 type Folded = AvroDocOn<T2>;
1711 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1712 folder.fold_avro_doc_on(self)
1713 }
1714}
1715#[allow(clippy::needless_pass_by_ref_mut)]
1716pub fn fold_avro_doc_on<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AvroDocOn<T>) -> AvroDocOn<T2>
1717where
1718 F: Fold<T, T2, > + ?Sized,
1719{
1720 AvroDocOn {
1721 identifier: folder.fold_doc_on_identifier(node.identifier),
1722 for_schema: folder.fold_doc_on_schema(node.for_schema),
1723 }
1724}
1725impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AvroSchema<T> {
1726 type Folded = AvroSchema<T2>;
1727 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1728 folder.fold_avro_schema(self)
1729 }
1730}
1731#[allow(clippy::needless_pass_by_ref_mut)]
1732pub fn fold_avro_schema<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AvroSchema<T>) -> AvroSchema<T2>
1733where
1734 F: Fold<T, T2, > + ?Sized,
1735{
1736 match node {
1737 AvroSchema::Csr {
1738 csr_connection: binding0,
1739 } => {
1740 AvroSchema::Csr {
1741 csr_connection: folder.fold_csr_connection_avro(binding0),
1742 }
1743 }
1744 AvroSchema::InlineSchema {
1745 schema: binding0,
1746 with_options: binding1,
1747 } => {
1748 AvroSchema::InlineSchema {
1749 schema: folder.fold_schema(binding0),
1750 with_options: binding1.into_iter().map(|v| folder.fold_avro_schema_option(v)).collect(),
1751 }
1752 }
1753 AvroSchema::Glue {
1754 connection: binding0,
1755 with_options: binding1,
1756 seed: binding2,
1757 } => {
1758 AvroSchema::Glue {
1759 connection: folder.fold_item_name(binding0),
1760 with_options: binding1.into_iter().map(|v| folder.fold_glue_avro_option(v)).collect(),
1761 seed: binding2.map(|v| folder.fold_glue_avro_seed(v)),
1762 }
1763 }
1764 }
1765}
1766impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AvroSchemaOption<T> {
1767 type Folded = AvroSchemaOption<T2>;
1768 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1769 folder.fold_avro_schema_option(self)
1770 }
1771}
1772#[allow(clippy::needless_pass_by_ref_mut)]
1773pub fn fold_avro_schema_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AvroSchemaOption<T>) -> AvroSchemaOption<T2>
1774where
1775 F: Fold<T, T2, > + ?Sized,
1776{
1777 AvroSchemaOption {
1778 name: folder.fold_avro_schema_option_name(node.name),
1779 value: node.value.map(|v| folder.fold_with_option_value(v)),
1780 }
1781}
1782impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for AvroSchemaOptionName {
1783 type Folded = AvroSchemaOptionName;
1784 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1785 folder.fold_avro_schema_option_name(self)
1786 }
1787}
1788#[allow(clippy::needless_pass_by_ref_mut)]
1789pub fn fold_avro_schema_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: AvroSchemaOptionName) -> AvroSchemaOptionName
1790where
1791 F: Fold<T, T2, > + ?Sized,
1792{
1793 match node {
1794 AvroSchemaOptionName::ConfluentWireFormat {
1795 } => {
1796 AvroSchemaOptionName::ConfluentWireFormat {
1797 }
1798 }
1799 }
1800}
1801impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CastFailureMode {
1802 type Folded = CastFailureMode;
1803 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1804 folder.fold_cast_failure_mode(self)
1805 }
1806}
1807#[allow(clippy::needless_pass_by_ref_mut)]
1808pub fn fold_cast_failure_mode<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CastFailureMode) -> CastFailureMode
1809where
1810 F: Fold<T, T2, > + ?Sized,
1811{
1812 match node {
1813 CastFailureMode::Error {
1814 } => {
1815 CastFailureMode::Error {
1816 }
1817 }
1818 CastFailureMode::NullFallback {
1819 } => {
1820 CastFailureMode::NullFallback {
1821 }
1822 }
1823 }
1824}
1825impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CatalogName {
1826 type Folded = CatalogName;
1827 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1828 folder.fold_catalog_name(self)
1829 }
1830}
1831#[allow(clippy::needless_pass_by_ref_mut)]
1832pub fn fold_catalog_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CatalogName) -> CatalogName
1833where
1834 F: Fold<T, T2, > + ?Sized,
1835{
1836 match node {
1837 CatalogName::ItemName {
1838 0: binding0,
1839 } => {
1840 CatalogName::ItemName {
1841 0: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
1842 }
1843 }
1844 CatalogName::FuncName {
1845 0: binding0,
1846 } => {
1847 CatalogName::FuncName {
1848 0: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
1849 }
1850 }
1851 }
1852}
1853impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CloseStatement {
1854 type Folded = CloseStatement;
1855 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1856 folder.fold_close_statement(self)
1857 }
1858}
1859#[allow(clippy::needless_pass_by_ref_mut)]
1860pub fn fold_close_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CloseStatement) -> CloseStatement
1861where
1862 F: Fold<T, T2, > + ?Sized,
1863{
1864 CloseStatement {
1865 name: folder.fold_ident(node.name),
1866 }
1867}
1868impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterAlterOption<T> {
1869 type Folded = ClusterAlterOption<T2>;
1870 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1871 folder.fold_cluster_alter_option(self)
1872 }
1873}
1874#[allow(clippy::needless_pass_by_ref_mut)]
1875pub fn fold_cluster_alter_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterAlterOption<T>) -> ClusterAlterOption<T2>
1876where
1877 F: Fold<T, T2, > + ?Sized,
1878{
1879 ClusterAlterOption {
1880 name: folder.fold_cluster_alter_option_name(node.name),
1881 value: node.value.map(|v| folder.fold_with_option_value(v)),
1882 }
1883}
1884impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterAlterOptionName {
1885 type Folded = ClusterAlterOptionName;
1886 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1887 folder.fold_cluster_alter_option_name(self)
1888 }
1889}
1890#[allow(clippy::needless_pass_by_ref_mut)]
1891pub fn fold_cluster_alter_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterAlterOptionName) -> ClusterAlterOptionName
1892where
1893 F: Fold<T, T2, > + ?Sized,
1894{
1895 match node {
1896 ClusterAlterOptionName::Wait {
1897 } => {
1898 ClusterAlterOptionName::Wait {
1899 }
1900 }
1901 }
1902}
1903impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterAlterOptionValue<T> {
1904 type Folded = ClusterAlterOptionValue<T2>;
1905 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1906 folder.fold_cluster_alter_option_value(self)
1907 }
1908}
1909#[allow(clippy::needless_pass_by_ref_mut)]
1910pub fn fold_cluster_alter_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterAlterOptionValue<T>) -> ClusterAlterOptionValue<T2>
1911where
1912 F: Fold<T, T2, > + ?Sized,
1913{
1914 match node {
1915 ClusterAlterOptionValue::For {
1916 0: binding0,
1917 } => {
1918 ClusterAlterOptionValue::For {
1919 0: folder.fold_value(binding0),
1920 }
1921 }
1922 ClusterAlterOptionValue::UntilReady {
1923 0: binding0,
1924 } => {
1925 ClusterAlterOptionValue::UntilReady {
1926 0: binding0.into_iter().map(|v| folder.fold_cluster_alter_until_ready_option(v)).collect(),
1927 }
1928 }
1929 }
1930}
1931impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterAlterUntilReadyOption<T> {
1932 type Folded = ClusterAlterUntilReadyOption<T2>;
1933 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1934 folder.fold_cluster_alter_until_ready_option(self)
1935 }
1936}
1937#[allow(clippy::needless_pass_by_ref_mut)]
1938pub fn fold_cluster_alter_until_ready_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterAlterUntilReadyOption<T>) -> ClusterAlterUntilReadyOption<T2>
1939where
1940 F: Fold<T, T2, > + ?Sized,
1941{
1942 ClusterAlterUntilReadyOption {
1943 name: folder.fold_cluster_alter_until_ready_option_name(node.name),
1944 value: node.value.map(|v| folder.fold_with_option_value(v)),
1945 }
1946}
1947impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterAlterUntilReadyOptionName {
1948 type Folded = ClusterAlterUntilReadyOptionName;
1949 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1950 folder.fold_cluster_alter_until_ready_option_name(self)
1951 }
1952}
1953#[allow(clippy::needless_pass_by_ref_mut)]
1954pub fn fold_cluster_alter_until_ready_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterAlterUntilReadyOptionName) -> ClusterAlterUntilReadyOptionName
1955where
1956 F: Fold<T, T2, > + ?Sized,
1957{
1958 match node {
1959 ClusterAlterUntilReadyOptionName::Timeout {
1960 } => {
1961 ClusterAlterUntilReadyOptionName::Timeout {
1962 }
1963 }
1964 ClusterAlterUntilReadyOptionName::OnTimeout {
1965 } => {
1966 ClusterAlterUntilReadyOptionName::OnTimeout {
1967 }
1968 }
1969 }
1970}
1971impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterAutoScalingStrategyOptionValue {
1972 type Folded = ClusterAutoScalingStrategyOptionValue;
1973 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1974 folder.fold_cluster_auto_scaling_strategy_option_value(self)
1975 }
1976}
1977#[allow(clippy::needless_pass_by_ref_mut)]
1978pub fn fold_cluster_auto_scaling_strategy_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterAutoScalingStrategyOptionValue) -> ClusterAutoScalingStrategyOptionValue
1979where
1980 F: Fold<T, T2, > + ?Sized,
1981{
1982 ClusterAutoScalingStrategyOptionValue {
1983 on_hydration: node.on_hydration.map(|v| folder.fold_on_hydration_option_value(v)),
1984 }
1985}
1986impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterFeature<T> {
1987 type Folded = ClusterFeature<T2>;
1988 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
1989 folder.fold_cluster_feature(self)
1990 }
1991}
1992#[allow(clippy::needless_pass_by_ref_mut)]
1993pub fn fold_cluster_feature<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterFeature<T>) -> ClusterFeature<T2>
1994where
1995 F: Fold<T, T2, > + ?Sized,
1996{
1997 ClusterFeature {
1998 name: folder.fold_cluster_feature_name(node.name),
1999 value: node.value.map(|v| folder.fold_with_option_value(v)),
2000 }
2001}
2002impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterFeatureName {
2003 type Folded = ClusterFeatureName;
2004 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2005 folder.fold_cluster_feature_name(self)
2006 }
2007}
2008#[allow(clippy::needless_pass_by_ref_mut)]
2009pub fn fold_cluster_feature_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterFeatureName) -> ClusterFeatureName
2010where
2011 F: Fold<T, T2, > + ?Sized,
2012{
2013 match node {
2014 ClusterFeatureName::ReoptimizeImportedViews {
2015 } => {
2016 ClusterFeatureName::ReoptimizeImportedViews {
2017 }
2018 }
2019 ClusterFeatureName::EnableNewOuterJoinLowering {
2020 } => {
2021 ClusterFeatureName::EnableNewOuterJoinLowering {
2022 }
2023 }
2024 ClusterFeatureName::EnableEagerDeltaJoins {
2025 } => {
2026 ClusterFeatureName::EnableEagerDeltaJoins {
2027 }
2028 }
2029 ClusterFeatureName::EnableVariadicLeftJoinLowering {
2030 } => {
2031 ClusterFeatureName::EnableVariadicLeftJoinLowering {
2032 }
2033 }
2034 ClusterFeatureName::EnableLetrecFixpointAnalysis {
2035 } => {
2036 ClusterFeatureName::EnableLetrecFixpointAnalysis {
2037 }
2038 }
2039 ClusterFeatureName::EnableJoinPrioritizeArranged {
2040 } => {
2041 ClusterFeatureName::EnableJoinPrioritizeArranged {
2042 }
2043 }
2044 ClusterFeatureName::EnableProjectionPushdownAfterRelationCse {
2045 } => {
2046 ClusterFeatureName::EnableProjectionPushdownAfterRelationCse {
2047 }
2048 }
2049 ClusterFeatureName::EnableUnionCancellationAfterRelationCse {
2050 } => {
2051 ClusterFeatureName::EnableUnionCancellationAfterRelationCse {
2052 }
2053 }
2054 }
2055}
2056impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterOption<T> {
2057 type Folded = ClusterOption<T2>;
2058 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2059 folder.fold_cluster_option(self)
2060 }
2061}
2062#[allow(clippy::needless_pass_by_ref_mut)]
2063pub fn fold_cluster_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterOption<T>) -> ClusterOption<T2>
2064where
2065 F: Fold<T, T2, > + ?Sized,
2066{
2067 ClusterOption {
2068 name: folder.fold_cluster_option_name(node.name),
2069 value: node.value.map(|v| folder.fold_with_option_value(v)),
2070 }
2071}
2072impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterOptionName {
2073 type Folded = ClusterOptionName;
2074 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2075 folder.fold_cluster_option_name(self)
2076 }
2077}
2078#[allow(clippy::needless_pass_by_ref_mut)]
2079pub fn fold_cluster_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterOptionName) -> ClusterOptionName
2080where
2081 F: Fold<T, T2, > + ?Sized,
2082{
2083 match node {
2084 ClusterOptionName::AutoScalingStrategy {
2085 } => {
2086 ClusterOptionName::AutoScalingStrategy {
2087 }
2088 }
2089 ClusterOptionName::AvailabilityZones {
2090 } => {
2091 ClusterOptionName::AvailabilityZones {
2092 }
2093 }
2094 ClusterOptionName::Disk {
2095 } => {
2096 ClusterOptionName::Disk {
2097 }
2098 }
2099 ClusterOptionName::ExperimentalArrangementCompression {
2100 } => {
2101 ClusterOptionName::ExperimentalArrangementCompression {
2102 }
2103 }
2104 ClusterOptionName::IntrospectionInterval {
2105 } => {
2106 ClusterOptionName::IntrospectionInterval {
2107 }
2108 }
2109 ClusterOptionName::IntrospectionDebugging {
2110 } => {
2111 ClusterOptionName::IntrospectionDebugging {
2112 }
2113 }
2114 ClusterOptionName::Managed {
2115 } => {
2116 ClusterOptionName::Managed {
2117 }
2118 }
2119 ClusterOptionName::Replicas {
2120 } => {
2121 ClusterOptionName::Replicas {
2122 }
2123 }
2124 ClusterOptionName::ReplicationFactor {
2125 } => {
2126 ClusterOptionName::ReplicationFactor {
2127 }
2128 }
2129 ClusterOptionName::Size {
2130 } => {
2131 ClusterOptionName::Size {
2132 }
2133 }
2134 ClusterOptionName::Schedule {
2135 } => {
2136 ClusterOptionName::Schedule {
2137 }
2138 }
2139 ClusterOptionName::WorkloadClass {
2140 } => {
2141 ClusterOptionName::WorkloadClass {
2142 }
2143 }
2144 }
2145}
2146impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ClusterScheduleOptionValue {
2147 type Folded = ClusterScheduleOptionValue;
2148 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2149 folder.fold_cluster_schedule_option_value(self)
2150 }
2151}
2152#[allow(clippy::needless_pass_by_ref_mut)]
2153pub fn fold_cluster_schedule_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ClusterScheduleOptionValue) -> ClusterScheduleOptionValue
2154where
2155 F: Fold<T, T2, > + ?Sized,
2156{
2157 match node {
2158 ClusterScheduleOptionValue::Manual {
2159 } => {
2160 ClusterScheduleOptionValue::Manual {
2161 }
2162 }
2163 ClusterScheduleOptionValue::Refresh {
2164 hydration_time_estimate: binding0,
2165 } => {
2166 ClusterScheduleOptionValue::Refresh {
2167 hydration_time_estimate: binding0.map(|v| folder.fold_interval_value(v)),
2168 }
2169 }
2170 }
2171}
2172impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ColumnDef<T> {
2173 type Folded = ColumnDef<T2>;
2174 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2175 folder.fold_column_def(self)
2176 }
2177}
2178#[allow(clippy::needless_pass_by_ref_mut)]
2179pub fn fold_column_def<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ColumnDef<T>) -> ColumnDef<T2>
2180where
2181 F: Fold<T, T2, > + ?Sized,
2182{
2183 ColumnDef {
2184 name: folder.fold_ident(node.name),
2185 data_type: folder.fold_data_type(node.data_type),
2186 collation: node.collation.map(|v| folder.fold_unresolved_item_name(v)),
2187 options: node.options.into_iter().map(|v| folder.fold_column_option_def(v)).collect(),
2188 }
2189}
2190impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ColumnName<T> {
2191 type Folded = ColumnName<T2>;
2192 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2193 folder.fold_column_name(self)
2194 }
2195}
2196#[allow(clippy::needless_pass_by_ref_mut)]
2197pub fn fold_column_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ColumnName<T>) -> ColumnName<T2>
2198where
2199 F: Fold<T, T2, > + ?Sized,
2200{
2201 ColumnName {
2202 relation: folder.fold_item_name(node.relation),
2203 column: folder.fold_column_reference(node.column),
2204 }
2205}
2206impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ColumnOption<T> {
2207 type Folded = ColumnOption<T2>;
2208 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2209 folder.fold_column_option(self)
2210 }
2211}
2212#[allow(clippy::needless_pass_by_ref_mut)]
2213pub fn fold_column_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ColumnOption<T>) -> ColumnOption<T2>
2214where
2215 F: Fold<T, T2, > + ?Sized,
2216{
2217 match node {
2218 ColumnOption::Null {
2219 } => {
2220 ColumnOption::Null {
2221 }
2222 }
2223 ColumnOption::NotNull {
2224 } => {
2225 ColumnOption::NotNull {
2226 }
2227 }
2228 ColumnOption::Default {
2229 0: binding0,
2230 } => {
2231 ColumnOption::Default {
2232 0: folder.fold_expr(binding0),
2233 }
2234 }
2235 ColumnOption::Unique {
2236 is_primary: binding0,
2237 } => {
2238 ColumnOption::Unique {
2239 is_primary: binding0,
2240 }
2241 }
2242 ColumnOption::ForeignKey {
2243 foreign_table: binding0,
2244 referred_columns: binding1,
2245 } => {
2246 ColumnOption::ForeignKey {
2247 foreign_table: folder.fold_unresolved_item_name(binding0),
2248 referred_columns: binding1.into_iter().map(|v| folder.fold_ident(v)).collect(),
2249 }
2250 }
2251 ColumnOption::Check {
2252 0: binding0,
2253 } => {
2254 ColumnOption::Check {
2255 0: folder.fold_expr(binding0),
2256 }
2257 }
2258 ColumnOption::Versioned {
2259 action: binding0,
2260 version: binding1,
2261 } => {
2262 ColumnOption::Versioned {
2263 action: folder.fold_column_versioned(binding0),
2264 version: folder.fold_version(binding1),
2265 }
2266 }
2267 }
2268}
2269impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ColumnOptionDef<T> {
2270 type Folded = ColumnOptionDef<T2>;
2271 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2272 folder.fold_column_option_def(self)
2273 }
2274}
2275#[allow(clippy::needless_pass_by_ref_mut)]
2276pub fn fold_column_option_def<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ColumnOptionDef<T>) -> ColumnOptionDef<T2>
2277where
2278 F: Fold<T, T2, > + ?Sized,
2279{
2280 ColumnOptionDef {
2281 name: node.name.map(|v| folder.fold_ident(v)),
2282 option: folder.fold_column_option(node.option),
2283 }
2284}
2285impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ColumnVersioned {
2286 type Folded = ColumnVersioned;
2287 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2288 folder.fold_column_versioned(self)
2289 }
2290}
2291#[allow(clippy::needless_pass_by_ref_mut)]
2292pub fn fold_column_versioned<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ColumnVersioned) -> ColumnVersioned
2293where
2294 F: Fold<T, T2, > + ?Sized,
2295{
2296 match node {
2297 ColumnVersioned::Added {
2298 } => {
2299 ColumnVersioned::Added {
2300 }
2301 }
2302 }
2303}
2304impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CommentObjectType<T> {
2305 type Folded = CommentObjectType<T2>;
2306 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2307 folder.fold_comment_object_type(self)
2308 }
2309}
2310#[allow(clippy::needless_pass_by_ref_mut)]
2311pub fn fold_comment_object_type<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CommentObjectType<T>) -> CommentObjectType<T2>
2312where
2313 F: Fold<T, T2, > + ?Sized,
2314{
2315 match node {
2316 CommentObjectType::Table {
2317 name: binding0,
2318 } => {
2319 CommentObjectType::Table {
2320 name: folder.fold_item_name(binding0),
2321 }
2322 }
2323 CommentObjectType::View {
2324 name: binding0,
2325 } => {
2326 CommentObjectType::View {
2327 name: folder.fold_item_name(binding0),
2328 }
2329 }
2330 CommentObjectType::Column {
2331 name: binding0,
2332 } => {
2333 CommentObjectType::Column {
2334 name: folder.fold_column_name(binding0),
2335 }
2336 }
2337 CommentObjectType::MaterializedView {
2338 name: binding0,
2339 } => {
2340 CommentObjectType::MaterializedView {
2341 name: folder.fold_item_name(binding0),
2342 }
2343 }
2344 CommentObjectType::Source {
2345 name: binding0,
2346 } => {
2347 CommentObjectType::Source {
2348 name: folder.fold_item_name(binding0),
2349 }
2350 }
2351 CommentObjectType::Sink {
2352 name: binding0,
2353 } => {
2354 CommentObjectType::Sink {
2355 name: folder.fold_item_name(binding0),
2356 }
2357 }
2358 CommentObjectType::Index {
2359 name: binding0,
2360 } => {
2361 CommentObjectType::Index {
2362 name: folder.fold_item_name(binding0),
2363 }
2364 }
2365 CommentObjectType::Func {
2366 name: binding0,
2367 } => {
2368 CommentObjectType::Func {
2369 name: folder.fold_item_name(binding0),
2370 }
2371 }
2372 CommentObjectType::Connection {
2373 name: binding0,
2374 } => {
2375 CommentObjectType::Connection {
2376 name: folder.fold_item_name(binding0),
2377 }
2378 }
2379 CommentObjectType::Type {
2380 ty: binding0,
2381 } => {
2382 CommentObjectType::Type {
2383 ty: folder.fold_data_type(binding0),
2384 }
2385 }
2386 CommentObjectType::Secret {
2387 name: binding0,
2388 } => {
2389 CommentObjectType::Secret {
2390 name: folder.fold_item_name(binding0),
2391 }
2392 }
2393 CommentObjectType::Role {
2394 name: binding0,
2395 } => {
2396 CommentObjectType::Role {
2397 name: folder.fold_role_name(binding0),
2398 }
2399 }
2400 CommentObjectType::Database {
2401 name: binding0,
2402 } => {
2403 CommentObjectType::Database {
2404 name: folder.fold_database_name(binding0),
2405 }
2406 }
2407 CommentObjectType::Schema {
2408 name: binding0,
2409 } => {
2410 CommentObjectType::Schema {
2411 name: folder.fold_schema_name(binding0),
2412 }
2413 }
2414 CommentObjectType::Cluster {
2415 name: binding0,
2416 } => {
2417 CommentObjectType::Cluster {
2418 name: folder.fold_cluster_name(binding0),
2419 }
2420 }
2421 CommentObjectType::ClusterReplica {
2422 name: binding0,
2423 } => {
2424 CommentObjectType::ClusterReplica {
2425 name: folder.fold_qualified_replica(binding0),
2426 }
2427 }
2428 CommentObjectType::NetworkPolicy {
2429 name: binding0,
2430 } => {
2431 CommentObjectType::NetworkPolicy {
2432 name: folder.fold_network_policy_name(binding0),
2433 }
2434 }
2435 }
2436}
2437impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CommentStatement<T> {
2438 type Folded = CommentStatement<T2>;
2439 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2440 folder.fold_comment_statement(self)
2441 }
2442}
2443#[allow(clippy::needless_pass_by_ref_mut)]
2444pub fn fold_comment_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CommentStatement<T>) -> CommentStatement<T2>
2445where
2446 F: Fold<T, T2, > + ?Sized,
2447{
2448 CommentStatement {
2449 object: folder.fold_comment_object_type(node.object),
2450 comment: node.comment.map(|v| v),
2451 }
2452}
2453impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CommitStatement {
2454 type Folded = CommitStatement;
2455 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2456 folder.fold_commit_statement(self)
2457 }
2458}
2459#[allow(clippy::needless_pass_by_ref_mut)]
2460pub fn fold_commit_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CommitStatement) -> CommitStatement
2461where
2462 F: Fold<T, T2, > + ?Sized,
2463{
2464 CommitStatement {
2465 chain: node.chain,
2466 }
2467}
2468impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ConnectionDefaultAwsPrivatelink<T> {
2469 type Folded = ConnectionDefaultAwsPrivatelink<T2>;
2470 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2471 folder.fold_connection_default_aws_privatelink(self)
2472 }
2473}
2474#[allow(clippy::needless_pass_by_ref_mut)]
2475pub fn fold_connection_default_aws_privatelink<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ConnectionDefaultAwsPrivatelink<T>) -> ConnectionDefaultAwsPrivatelink<T2>
2476where
2477 F: Fold<T, T2, > + ?Sized,
2478{
2479 ConnectionDefaultAwsPrivatelink {
2480 connection: folder.fold_item_name(node.connection),
2481 port: node.port.map(|v| v),
2482 }
2483}
2484impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ConnectionOption<T> {
2485 type Folded = ConnectionOption<T2>;
2486 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2487 folder.fold_connection_option(self)
2488 }
2489}
2490#[allow(clippy::needless_pass_by_ref_mut)]
2491pub fn fold_connection_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ConnectionOption<T>) -> ConnectionOption<T2>
2492where
2493 F: Fold<T, T2, > + ?Sized,
2494{
2495 ConnectionOption {
2496 name: folder.fold_connection_option_name(node.name),
2497 value: node.value.map(|v| folder.fold_with_option_value(v)),
2498 }
2499}
2500impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ConnectionOptionName {
2501 type Folded = ConnectionOptionName;
2502 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2503 folder.fold_connection_option_name(self)
2504 }
2505}
2506#[allow(clippy::needless_pass_by_ref_mut)]
2507pub fn fold_connection_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ConnectionOptionName) -> ConnectionOptionName
2508where
2509 F: Fold<T, T2, > + ?Sized,
2510{
2511 match node {
2512 ConnectionOptionName::AccessDelegation {
2513 } => {
2514 ConnectionOptionName::AccessDelegation {
2515 }
2516 }
2517 ConnectionOptionName::AccessKeyId {
2518 } => {
2519 ConnectionOptionName::AccessKeyId {
2520 }
2521 }
2522 ConnectionOptionName::AssumeRoleArn {
2523 } => {
2524 ConnectionOptionName::AssumeRoleArn {
2525 }
2526 }
2527 ConnectionOptionName::AssumeRoleSessionName {
2528 } => {
2529 ConnectionOptionName::AssumeRoleSessionName {
2530 }
2531 }
2532 ConnectionOptionName::AvailabilityZones {
2533 } => {
2534 ConnectionOptionName::AvailabilityZones {
2535 }
2536 }
2537 ConnectionOptionName::AwsConnection {
2538 } => {
2539 ConnectionOptionName::AwsConnection {
2540 }
2541 }
2542 ConnectionOptionName::AwsPrivatelink {
2543 } => {
2544 ConnectionOptionName::AwsPrivatelink {
2545 }
2546 }
2547 ConnectionOptionName::Broker {
2548 } => {
2549 ConnectionOptionName::Broker {
2550 }
2551 }
2552 ConnectionOptionName::Brokers {
2553 } => {
2554 ConnectionOptionName::Brokers {
2555 }
2556 }
2557 ConnectionOptionName::Credential {
2558 } => {
2559 ConnectionOptionName::Credential {
2560 }
2561 }
2562 ConnectionOptionName::Database {
2563 } => {
2564 ConnectionOptionName::Database {
2565 }
2566 }
2567 ConnectionOptionName::Endpoint {
2568 } => {
2569 ConnectionOptionName::Endpoint {
2570 }
2571 }
2572 ConnectionOptionName::GcpConnection {
2573 } => {
2574 ConnectionOptionName::GcpConnection {
2575 }
2576 }
2577 ConnectionOptionName::Host {
2578 } => {
2579 ConnectionOptionName::Host {
2580 }
2581 }
2582 ConnectionOptionName::Oauth2ServerUrl {
2583 } => {
2584 ConnectionOptionName::Oauth2ServerUrl {
2585 }
2586 }
2587 ConnectionOptionName::Password {
2588 } => {
2589 ConnectionOptionName::Password {
2590 }
2591 }
2592 ConnectionOptionName::Port {
2593 } => {
2594 ConnectionOptionName::Port {
2595 }
2596 }
2597 ConnectionOptionName::ProgressTopic {
2598 } => {
2599 ConnectionOptionName::ProgressTopic {
2600 }
2601 }
2602 ConnectionOptionName::ProgressTopicReplicationFactor {
2603 } => {
2604 ConnectionOptionName::ProgressTopicReplicationFactor {
2605 }
2606 }
2607 ConnectionOptionName::PublicKey1 {
2608 } => {
2609 ConnectionOptionName::PublicKey1 {
2610 }
2611 }
2612 ConnectionOptionName::PublicKey2 {
2613 } => {
2614 ConnectionOptionName::PublicKey2 {
2615 }
2616 }
2617 ConnectionOptionName::Region {
2618 } => {
2619 ConnectionOptionName::Region {
2620 }
2621 }
2622 ConnectionOptionName::Registry {
2623 } => {
2624 ConnectionOptionName::Registry {
2625 }
2626 }
2627 ConnectionOptionName::SaslMechanisms {
2628 } => {
2629 ConnectionOptionName::SaslMechanisms {
2630 }
2631 }
2632 ConnectionOptionName::SaslPassword {
2633 } => {
2634 ConnectionOptionName::SaslPassword {
2635 }
2636 }
2637 ConnectionOptionName::SaslUsername {
2638 } => {
2639 ConnectionOptionName::SaslUsername {
2640 }
2641 }
2642 ConnectionOptionName::Scope {
2643 } => {
2644 ConnectionOptionName::Scope {
2645 }
2646 }
2647 ConnectionOptionName::SecretAccessKey {
2648 } => {
2649 ConnectionOptionName::SecretAccessKey {
2650 }
2651 }
2652 ConnectionOptionName::SecurityProtocol {
2653 } => {
2654 ConnectionOptionName::SecurityProtocol {
2655 }
2656 }
2657 ConnectionOptionName::ServiceAccountKey {
2658 } => {
2659 ConnectionOptionName::ServiceAccountKey {
2660 }
2661 }
2662 ConnectionOptionName::ServiceName {
2663 } => {
2664 ConnectionOptionName::ServiceName {
2665 }
2666 }
2667 ConnectionOptionName::SshTunnel {
2668 } => {
2669 ConnectionOptionName::SshTunnel {
2670 }
2671 }
2672 ConnectionOptionName::SslCertificate {
2673 } => {
2674 ConnectionOptionName::SslCertificate {
2675 }
2676 }
2677 ConnectionOptionName::SslCertificateAuthority {
2678 } => {
2679 ConnectionOptionName::SslCertificateAuthority {
2680 }
2681 }
2682 ConnectionOptionName::SslKey {
2683 } => {
2684 ConnectionOptionName::SslKey {
2685 }
2686 }
2687 ConnectionOptionName::SslMode {
2688 } => {
2689 ConnectionOptionName::SslMode {
2690 }
2691 }
2692 ConnectionOptionName::SessionToken {
2693 } => {
2694 ConnectionOptionName::SessionToken {
2695 }
2696 }
2697 ConnectionOptionName::CatalogType {
2698 } => {
2699 ConnectionOptionName::CatalogType {
2700 }
2701 }
2702 ConnectionOptionName::StorageProvider {
2703 } => {
2704 ConnectionOptionName::StorageProvider {
2705 }
2706 }
2707 ConnectionOptionName::Url {
2708 } => {
2709 ConnectionOptionName::Url {
2710 }
2711 }
2712 ConnectionOptionName::User {
2713 } => {
2714 ConnectionOptionName::User {
2715 }
2716 }
2717 ConnectionOptionName::Warehouse {
2718 } => {
2719 ConnectionOptionName::Warehouse {
2720 }
2721 }
2722 }
2723}
2724impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ConnectionRulePattern {
2725 type Folded = ConnectionRulePattern;
2726 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2727 folder.fold_connection_rule_pattern(self)
2728 }
2729}
2730#[allow(clippy::needless_pass_by_ref_mut)]
2731pub fn fold_connection_rule_pattern<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ConnectionRulePattern) -> ConnectionRulePattern
2732where
2733 F: Fold<T, T2, > + ?Sized,
2734{
2735 ConnectionRulePattern {
2736 prefix_wildcard: node.prefix_wildcard,
2737 literal_match: node.literal_match,
2738 suffix_wildcard: node.suffix_wildcard,
2739 }
2740}
2741impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CopyDirection {
2742 type Folded = CopyDirection;
2743 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2744 folder.fold_copy_direction(self)
2745 }
2746}
2747#[allow(clippy::needless_pass_by_ref_mut)]
2748pub fn fold_copy_direction<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CopyDirection) -> CopyDirection
2749where
2750 F: Fold<T, T2, > + ?Sized,
2751{
2752 match node {
2753 CopyDirection::To {
2754 } => {
2755 CopyDirection::To {
2756 }
2757 }
2758 CopyDirection::From {
2759 } => {
2760 CopyDirection::From {
2761 }
2762 }
2763 }
2764}
2765impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CopyOption<T> {
2766 type Folded = CopyOption<T2>;
2767 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2768 folder.fold_copy_option(self)
2769 }
2770}
2771#[allow(clippy::needless_pass_by_ref_mut)]
2772pub fn fold_copy_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CopyOption<T>) -> CopyOption<T2>
2773where
2774 F: Fold<T, T2, > + ?Sized,
2775{
2776 CopyOption {
2777 name: folder.fold_copy_option_name(node.name),
2778 value: node.value.map(|v| folder.fold_with_option_value(v)),
2779 }
2780}
2781impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CopyOptionName {
2782 type Folded = CopyOptionName;
2783 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2784 folder.fold_copy_option_name(self)
2785 }
2786}
2787#[allow(clippy::needless_pass_by_ref_mut)]
2788pub fn fold_copy_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CopyOptionName) -> CopyOptionName
2789where
2790 F: Fold<T, T2, > + ?Sized,
2791{
2792 match node {
2793 CopyOptionName::Format {
2794 } => {
2795 CopyOptionName::Format {
2796 }
2797 }
2798 CopyOptionName::Delimiter {
2799 } => {
2800 CopyOptionName::Delimiter {
2801 }
2802 }
2803 CopyOptionName::Null {
2804 } => {
2805 CopyOptionName::Null {
2806 }
2807 }
2808 CopyOptionName::Escape {
2809 } => {
2810 CopyOptionName::Escape {
2811 }
2812 }
2813 CopyOptionName::Quote {
2814 } => {
2815 CopyOptionName::Quote {
2816 }
2817 }
2818 CopyOptionName::Header {
2819 } => {
2820 CopyOptionName::Header {
2821 }
2822 }
2823 CopyOptionName::AwsConnection {
2824 } => {
2825 CopyOptionName::AwsConnection {
2826 }
2827 }
2828 CopyOptionName::MaxFileSize {
2829 } => {
2830 CopyOptionName::MaxFileSize {
2831 }
2832 }
2833 CopyOptionName::Files {
2834 } => {
2835 CopyOptionName::Files {
2836 }
2837 }
2838 CopyOptionName::Pattern {
2839 } => {
2840 CopyOptionName::Pattern {
2841 }
2842 }
2843 }
2844}
2845impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CopyRelation<T> {
2846 type Folded = CopyRelation<T2>;
2847 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2848 folder.fold_copy_relation(self)
2849 }
2850}
2851#[allow(clippy::needless_pass_by_ref_mut)]
2852pub fn fold_copy_relation<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CopyRelation<T>) -> CopyRelation<T2>
2853where
2854 F: Fold<T, T2, > + ?Sized,
2855{
2856 match node {
2857 CopyRelation::Named {
2858 name: binding0,
2859 columns: binding1,
2860 } => {
2861 CopyRelation::Named {
2862 name: folder.fold_item_name(binding0),
2863 columns: binding1.into_iter().map(|v| folder.fold_ident(v)).collect(),
2864 }
2865 }
2866 CopyRelation::Select {
2867 0: binding0,
2868 } => {
2869 CopyRelation::Select {
2870 0: folder.fold_select_statement(binding0),
2871 }
2872 }
2873 CopyRelation::Subscribe {
2874 0: binding0,
2875 } => {
2876 CopyRelation::Subscribe {
2877 0: folder.fold_subscribe_statement(binding0),
2878 }
2879 }
2880 }
2881}
2882impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CopyStatement<T> {
2883 type Folded = CopyStatement<T2>;
2884 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2885 folder.fold_copy_statement(self)
2886 }
2887}
2888#[allow(clippy::needless_pass_by_ref_mut)]
2889pub fn fold_copy_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CopyStatement<T>) -> CopyStatement<T2>
2890where
2891 F: Fold<T, T2, > + ?Sized,
2892{
2893 CopyStatement {
2894 relation: folder.fold_copy_relation(node.relation),
2895 direction: folder.fold_copy_direction(node.direction),
2896 target: folder.fold_copy_target(node.target),
2897 options: node.options.into_iter().map(|v| folder.fold_copy_option(v)).collect(),
2898 }
2899}
2900impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CopyTarget<T> {
2901 type Folded = CopyTarget<T2>;
2902 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2903 folder.fold_copy_target(self)
2904 }
2905}
2906#[allow(clippy::needless_pass_by_ref_mut)]
2907pub fn fold_copy_target<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CopyTarget<T>) -> CopyTarget<T2>
2908where
2909 F: Fold<T, T2, > + ?Sized,
2910{
2911 match node {
2912 CopyTarget::Stdin {
2913 } => {
2914 CopyTarget::Stdin {
2915 }
2916 }
2917 CopyTarget::Stdout {
2918 } => {
2919 CopyTarget::Stdout {
2920 }
2921 }
2922 CopyTarget::Expr {
2923 0: binding0,
2924 } => {
2925 CopyTarget::Expr {
2926 0: folder.fold_expr(binding0),
2927 }
2928 }
2929 }
2930}
2931impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateClusterReplicaStatement<T> {
2932 type Folded = CreateClusterReplicaStatement<T2>;
2933 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2934 folder.fold_create_cluster_replica_statement(self)
2935 }
2936}
2937#[allow(clippy::needless_pass_by_ref_mut)]
2938pub fn fold_create_cluster_replica_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateClusterReplicaStatement<T>) -> CreateClusterReplicaStatement<T2>
2939where
2940 F: Fold<T, T2, > + ?Sized,
2941{
2942 CreateClusterReplicaStatement {
2943 of_cluster: folder.fold_ident(node.of_cluster),
2944 definition: folder.fold_replica_definition(node.definition),
2945 if_not_exists: node.if_not_exists,
2946 }
2947}
2948impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateClusterStatement<T> {
2949 type Folded = CreateClusterStatement<T2>;
2950 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2951 folder.fold_create_cluster_statement(self)
2952 }
2953}
2954#[allow(clippy::needless_pass_by_ref_mut)]
2955pub fn fold_create_cluster_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateClusterStatement<T>) -> CreateClusterStatement<T2>
2956where
2957 F: Fold<T, T2, > + ?Sized,
2958{
2959 CreateClusterStatement {
2960 name: folder.fold_ident(node.name),
2961 options: node.options.into_iter().map(|v| folder.fold_cluster_option(v)).collect(),
2962 features: node.features.into_iter().map(|v| folder.fold_cluster_feature(v)).collect(),
2963 if_not_exists: node.if_not_exists,
2964 }
2965}
2966impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateConnectionOption<T> {
2967 type Folded = CreateConnectionOption<T2>;
2968 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2969 folder.fold_create_connection_option(self)
2970 }
2971}
2972#[allow(clippy::needless_pass_by_ref_mut)]
2973pub fn fold_create_connection_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateConnectionOption<T>) -> CreateConnectionOption<T2>
2974where
2975 F: Fold<T, T2, > + ?Sized,
2976{
2977 CreateConnectionOption {
2978 name: folder.fold_create_connection_option_name(node.name),
2979 value: node.value.map(|v| folder.fold_with_option_value(v)),
2980 }
2981}
2982impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateConnectionOptionName {
2983 type Folded = CreateConnectionOptionName;
2984 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
2985 folder.fold_create_connection_option_name(self)
2986 }
2987}
2988#[allow(clippy::needless_pass_by_ref_mut)]
2989pub fn fold_create_connection_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateConnectionOptionName) -> CreateConnectionOptionName
2990where
2991 F: Fold<T, T2, > + ?Sized,
2992{
2993 match node {
2994 CreateConnectionOptionName::Validate {
2995 } => {
2996 CreateConnectionOptionName::Validate {
2997 }
2998 }
2999 }
3000}
3001impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateConnectionStatement<T> {
3002 type Folded = CreateConnectionStatement<T2>;
3003 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3004 folder.fold_create_connection_statement(self)
3005 }
3006}
3007#[allow(clippy::needless_pass_by_ref_mut)]
3008pub fn fold_create_connection_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateConnectionStatement<T>) -> CreateConnectionStatement<T2>
3009where
3010 F: Fold<T, T2, > + ?Sized,
3011{
3012 CreateConnectionStatement {
3013 name: folder.fold_unresolved_item_name(node.name),
3014 connection_type: folder.fold_create_connection_type(node.connection_type),
3015 if_not_exists: node.if_not_exists,
3016 values: node.values.into_iter().map(|v| folder.fold_connection_option(v)).collect(),
3017 with_options: node.with_options.into_iter().map(|v| folder.fold_create_connection_option(v)).collect(),
3018 }
3019}
3020impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateConnectionType {
3021 type Folded = CreateConnectionType;
3022 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3023 folder.fold_create_connection_type(self)
3024 }
3025}
3026#[allow(clippy::needless_pass_by_ref_mut)]
3027pub fn fold_create_connection_type<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateConnectionType) -> CreateConnectionType
3028where
3029 F: Fold<T, T2, > + ?Sized,
3030{
3031 match node {
3032 CreateConnectionType::Aws {
3033 } => {
3034 CreateConnectionType::Aws {
3035 }
3036 }
3037 CreateConnectionType::AwsPrivatelink {
3038 } => {
3039 CreateConnectionType::AwsPrivatelink {
3040 }
3041 }
3042 CreateConnectionType::GlueSchemaRegistry {
3043 } => {
3044 CreateConnectionType::GlueSchemaRegistry {
3045 }
3046 }
3047 CreateConnectionType::Gcp {
3048 } => {
3049 CreateConnectionType::Gcp {
3050 }
3051 }
3052 CreateConnectionType::Kafka {
3053 } => {
3054 CreateConnectionType::Kafka {
3055 }
3056 }
3057 CreateConnectionType::Csr {
3058 } => {
3059 CreateConnectionType::Csr {
3060 }
3061 }
3062 CreateConnectionType::Postgres {
3063 } => {
3064 CreateConnectionType::Postgres {
3065 }
3066 }
3067 CreateConnectionType::Ssh {
3068 } => {
3069 CreateConnectionType::Ssh {
3070 }
3071 }
3072 CreateConnectionType::SqlServer {
3073 } => {
3074 CreateConnectionType::SqlServer {
3075 }
3076 }
3077 CreateConnectionType::MySql {
3078 } => {
3079 CreateConnectionType::MySql {
3080 }
3081 }
3082 CreateConnectionType::IcebergCatalog {
3083 } => {
3084 CreateConnectionType::IcebergCatalog {
3085 }
3086 }
3087 }
3088}
3089impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateDatabaseStatement {
3090 type Folded = CreateDatabaseStatement;
3091 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3092 folder.fold_create_database_statement(self)
3093 }
3094}
3095#[allow(clippy::needless_pass_by_ref_mut)]
3096pub fn fold_create_database_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateDatabaseStatement) -> CreateDatabaseStatement
3097where
3098 F: Fold<T, T2, > + ?Sized,
3099{
3100 CreateDatabaseStatement {
3101 name: folder.fold_unresolved_database_name(node.name),
3102 if_not_exists: node.if_not_exists,
3103 }
3104}
3105impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateIndexStatement<T> {
3106 type Folded = CreateIndexStatement<T2>;
3107 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3108 folder.fold_create_index_statement(self)
3109 }
3110}
3111#[allow(clippy::needless_pass_by_ref_mut)]
3112pub fn fold_create_index_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateIndexStatement<T>) -> CreateIndexStatement<T2>
3113where
3114 F: Fold<T, T2, > + ?Sized,
3115{
3116 CreateIndexStatement {
3117 name: node.name.map(|v| folder.fold_ident(v)),
3118 in_cluster: node.in_cluster.map(|v| folder.fold_cluster_name(v)),
3119 on_name: folder.fold_item_name(node.on_name),
3120 key_parts: node.key_parts.map(|v| v.into_iter().map(|v| folder.fold_expr(v)).collect()),
3121 with_options: node.with_options.into_iter().map(|v| folder.fold_index_option(v)).collect(),
3122 if_not_exists: node.if_not_exists,
3123 }
3124}
3125impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateMaterializedViewStatement<T> {
3126 type Folded = CreateMaterializedViewStatement<T2>;
3127 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3128 folder.fold_create_materialized_view_statement(self)
3129 }
3130}
3131#[allow(clippy::needless_pass_by_ref_mut)]
3132pub fn fold_create_materialized_view_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateMaterializedViewStatement<T>) -> CreateMaterializedViewStatement<T2>
3133where
3134 F: Fold<T, T2, > + ?Sized,
3135{
3136 CreateMaterializedViewStatement {
3137 if_exists: folder.fold_if_exists_behavior(node.if_exists),
3138 name: folder.fold_unresolved_item_name(node.name),
3139 columns: node.columns.into_iter().map(|v| folder.fold_ident(v)).collect(),
3140 replacement_for: node.replacement_for.map(|v| folder.fold_item_name(v)),
3141 in_cluster: node.in_cluster.map(|v| folder.fold_cluster_name(v)),
3142 in_cluster_replica: node.in_cluster_replica.map(|v| folder.fold_ident(v)),
3143 query: folder.fold_query(node.query),
3144 as_of: node.as_of.map(|v| v),
3145 with_options: node.with_options.into_iter().map(|v| folder.fold_materialized_view_option(v)).collect(),
3146 }
3147}
3148impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateMetricSinkOption<T> {
3149 type Folded = CreateMetricSinkOption<T2>;
3150 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3151 folder.fold_create_metric_sink_option(self)
3152 }
3153}
3154#[allow(clippy::needless_pass_by_ref_mut)]
3155pub fn fold_create_metric_sink_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateMetricSinkOption<T>) -> CreateMetricSinkOption<T2>
3156where
3157 F: Fold<T, T2, > + ?Sized,
3158{
3159 CreateMetricSinkOption {
3160 name: folder.fold_create_metric_sink_option_name(node.name),
3161 value: node.value.map(|v| folder.fold_with_option_value(v)),
3162 }
3163}
3164impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateMetricSinkOptionName {
3165 type Folded = CreateMetricSinkOptionName;
3166 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3167 folder.fold_create_metric_sink_option_name(self)
3168 }
3169}
3170#[allow(clippy::needless_pass_by_ref_mut)]
3171pub fn fold_create_metric_sink_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateMetricSinkOptionName) -> CreateMetricSinkOptionName
3172where
3173 F: Fold<T, T2, > + ?Sized,
3174{
3175 match node {
3176 CreateMetricSinkOptionName::Prefix {
3177 } => {
3178 CreateMetricSinkOptionName::Prefix {
3179 }
3180 }
3181 }
3182}
3183impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateMetricSinkStatement<T> {
3184 type Folded = CreateMetricSinkStatement<T2>;
3185 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3186 folder.fold_create_metric_sink_statement(self)
3187 }
3188}
3189#[allow(clippy::needless_pass_by_ref_mut)]
3190pub fn fold_create_metric_sink_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateMetricSinkStatement<T>) -> CreateMetricSinkStatement<T2>
3191where
3192 F: Fold<T, T2, > + ?Sized,
3193{
3194 CreateMetricSinkStatement {
3195 name: folder.fold_unresolved_item_name(node.name),
3196 in_cluster: node.in_cluster.map(|v| folder.fold_cluster_name(v)),
3197 if_not_exists: node.if_not_exists,
3198 from: folder.fold_item_name(node.from),
3199 with_options: node.with_options.into_iter().map(|v| folder.fold_create_metric_sink_option(v)).collect(),
3200 }
3201}
3202impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateNetworkPolicyStatement<T> {
3203 type Folded = CreateNetworkPolicyStatement<T2>;
3204 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3205 folder.fold_create_network_policy_statement(self)
3206 }
3207}
3208#[allow(clippy::needless_pass_by_ref_mut)]
3209pub fn fold_create_network_policy_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateNetworkPolicyStatement<T>) -> CreateNetworkPolicyStatement<T2>
3210where
3211 F: Fold<T, T2, > + ?Sized,
3212{
3213 CreateNetworkPolicyStatement {
3214 name: folder.fold_ident(node.name),
3215 options: node.options.into_iter().map(|v| folder.fold_network_policy_option(v)).collect(),
3216 }
3217}
3218impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateRoleStatement {
3219 type Folded = CreateRoleStatement;
3220 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3221 folder.fold_create_role_statement(self)
3222 }
3223}
3224#[allow(clippy::needless_pass_by_ref_mut)]
3225pub fn fold_create_role_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateRoleStatement) -> CreateRoleStatement
3226where
3227 F: Fold<T, T2, > + ?Sized,
3228{
3229 CreateRoleStatement {
3230 name: folder.fold_ident(node.name),
3231 options: node.options.into_iter().map(|v| folder.fold_role_attribute(v)).collect(),
3232 }
3233}
3234impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSchemaStatement {
3235 type Folded = CreateSchemaStatement;
3236 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3237 folder.fold_create_schema_statement(self)
3238 }
3239}
3240#[allow(clippy::needless_pass_by_ref_mut)]
3241pub fn fold_create_schema_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSchemaStatement) -> CreateSchemaStatement
3242where
3243 F: Fold<T, T2, > + ?Sized,
3244{
3245 CreateSchemaStatement {
3246 name: folder.fold_unresolved_schema_name(node.name),
3247 if_not_exists: node.if_not_exists,
3248 }
3249}
3250impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSecretStatement<T> {
3251 type Folded = CreateSecretStatement<T2>;
3252 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3253 folder.fold_create_secret_statement(self)
3254 }
3255}
3256#[allow(clippy::needless_pass_by_ref_mut)]
3257pub fn fold_create_secret_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSecretStatement<T>) -> CreateSecretStatement<T2>
3258where
3259 F: Fold<T, T2, > + ?Sized,
3260{
3261 CreateSecretStatement {
3262 name: folder.fold_unresolved_item_name(node.name),
3263 if_not_exists: node.if_not_exists,
3264 value: folder.fold_expr(node.value),
3265 }
3266}
3267impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSinkConnection<T> {
3268 type Folded = CreateSinkConnection<T2>;
3269 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3270 folder.fold_create_sink_connection(self)
3271 }
3272}
3273#[allow(clippy::needless_pass_by_ref_mut)]
3274pub fn fold_create_sink_connection<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSinkConnection<T>) -> CreateSinkConnection<T2>
3275where
3276 F: Fold<T, T2, > + ?Sized,
3277{
3278 match node {
3279 CreateSinkConnection::Kafka {
3280 connection: binding0,
3281 options: binding1,
3282 key: binding2,
3283 headers: binding3,
3284 } => {
3285 CreateSinkConnection::Kafka {
3286 connection: folder.fold_item_name(binding0),
3287 options: binding1.into_iter().map(|v| folder.fold_kafka_sink_config_option(v)).collect(),
3288 key: binding2.map(|v| folder.fold_sink_key(v)),
3289 headers: binding3.map(|v| folder.fold_ident(v)),
3290 }
3291 }
3292 CreateSinkConnection::Iceberg {
3293 catalog_connection: binding0,
3294 aws_connection: binding1,
3295 key: binding2,
3296 options: binding3,
3297 } => {
3298 CreateSinkConnection::Iceberg {
3299 catalog_connection: folder.fold_item_name(binding0),
3300 aws_connection: binding1.map(|v| folder.fold_item_name(v)),
3301 key: binding2.map(|v| folder.fold_sink_key(v)),
3302 options: binding3.into_iter().map(|v| folder.fold_iceberg_sink_config_option(v)).collect(),
3303 }
3304 }
3305 }
3306}
3307impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSinkOption<T> {
3308 type Folded = CreateSinkOption<T2>;
3309 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3310 folder.fold_create_sink_option(self)
3311 }
3312}
3313#[allow(clippy::needless_pass_by_ref_mut)]
3314pub fn fold_create_sink_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSinkOption<T>) -> CreateSinkOption<T2>
3315where
3316 F: Fold<T, T2, > + ?Sized,
3317{
3318 CreateSinkOption {
3319 name: folder.fold_create_sink_option_name(node.name),
3320 value: node.value.map(|v| folder.fold_with_option_value(v)),
3321 }
3322}
3323impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSinkOptionName {
3324 type Folded = CreateSinkOptionName;
3325 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3326 folder.fold_create_sink_option_name(self)
3327 }
3328}
3329#[allow(clippy::needless_pass_by_ref_mut)]
3330pub fn fold_create_sink_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSinkOptionName) -> CreateSinkOptionName
3331where
3332 F: Fold<T, T2, > + ?Sized,
3333{
3334 match node {
3335 CreateSinkOptionName::Snapshot {
3336 } => {
3337 CreateSinkOptionName::Snapshot {
3338 }
3339 }
3340 CreateSinkOptionName::Version {
3341 } => {
3342 CreateSinkOptionName::Version {
3343 }
3344 }
3345 CreateSinkOptionName::PartitionStrategy {
3346 } => {
3347 CreateSinkOptionName::PartitionStrategy {
3348 }
3349 }
3350 CreateSinkOptionName::CommitInterval {
3351 } => {
3352 CreateSinkOptionName::CommitInterval {
3353 }
3354 }
3355 }
3356}
3357impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSinkStatement<T> {
3358 type Folded = CreateSinkStatement<T2>;
3359 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3360 folder.fold_create_sink_statement(self)
3361 }
3362}
3363#[allow(clippy::needless_pass_by_ref_mut)]
3364pub fn fold_create_sink_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSinkStatement<T>) -> CreateSinkStatement<T2>
3365where
3366 F: Fold<T, T2, > + ?Sized,
3367{
3368 CreateSinkStatement {
3369 name: node.name.map(|v| folder.fold_unresolved_item_name(v)),
3370 in_cluster: node.in_cluster.map(|v| folder.fold_cluster_name(v)),
3371 if_not_exists: node.if_not_exists,
3372 from: folder.fold_item_name(node.from),
3373 connection: folder.fold_create_sink_connection(node.connection),
3374 format: node.format.map(|v| folder.fold_format_specifier(v)),
3375 envelope: node.envelope.map(|v| folder.fold_sink_envelope(v)),
3376 mode: node.mode.map(|v| folder.fold_iceberg_sink_mode(v)),
3377 with_options: node.with_options.into_iter().map(|v| folder.fold_create_sink_option(v)).collect(),
3378 }
3379}
3380impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSourceConnection<T> {
3381 type Folded = CreateSourceConnection<T2>;
3382 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3383 folder.fold_create_source_connection(self)
3384 }
3385}
3386#[allow(clippy::needless_pass_by_ref_mut)]
3387pub fn fold_create_source_connection<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSourceConnection<T>) -> CreateSourceConnection<T2>
3388where
3389 F: Fold<T, T2, > + ?Sized,
3390{
3391 match node {
3392 CreateSourceConnection::Kafka {
3393 connection: binding0,
3394 options: binding1,
3395 } => {
3396 CreateSourceConnection::Kafka {
3397 connection: folder.fold_item_name(binding0),
3398 options: binding1.into_iter().map(|v| folder.fold_kafka_source_config_option(v)).collect(),
3399 }
3400 }
3401 CreateSourceConnection::Postgres {
3402 connection: binding0,
3403 options: binding1,
3404 } => {
3405 CreateSourceConnection::Postgres {
3406 connection: folder.fold_item_name(binding0),
3407 options: binding1.into_iter().map(|v| folder.fold_pg_config_option(v)).collect(),
3408 }
3409 }
3410 CreateSourceConnection::SqlServer {
3411 connection: binding0,
3412 options: binding1,
3413 } => {
3414 CreateSourceConnection::SqlServer {
3415 connection: folder.fold_item_name(binding0),
3416 options: binding1.into_iter().map(|v| folder.fold_sql_server_config_option(v)).collect(),
3417 }
3418 }
3419 CreateSourceConnection::MySql {
3420 connection: binding0,
3421 options: binding1,
3422 } => {
3423 CreateSourceConnection::MySql {
3424 connection: folder.fold_item_name(binding0),
3425 options: binding1.into_iter().map(|v| folder.fold_my_sql_config_option(v)).collect(),
3426 }
3427 }
3428 CreateSourceConnection::LoadGenerator {
3429 generator: binding0,
3430 options: binding1,
3431 } => {
3432 CreateSourceConnection::LoadGenerator {
3433 generator: folder.fold_load_generator(binding0),
3434 options: binding1.into_iter().map(|v| folder.fold_load_generator_option(v)).collect(),
3435 }
3436 }
3437 }
3438}
3439impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSourceOption<T> {
3440 type Folded = CreateSourceOption<T2>;
3441 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3442 folder.fold_create_source_option(self)
3443 }
3444}
3445#[allow(clippy::needless_pass_by_ref_mut)]
3446pub fn fold_create_source_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSourceOption<T>) -> CreateSourceOption<T2>
3447where
3448 F: Fold<T, T2, > + ?Sized,
3449{
3450 CreateSourceOption {
3451 name: folder.fold_create_source_option_name(node.name),
3452 value: node.value.map(|v| folder.fold_with_option_value(v)),
3453 }
3454}
3455impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSourceOptionName {
3456 type Folded = CreateSourceOptionName;
3457 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3458 folder.fold_create_source_option_name(self)
3459 }
3460}
3461#[allow(clippy::needless_pass_by_ref_mut)]
3462pub fn fold_create_source_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSourceOptionName) -> CreateSourceOptionName
3463where
3464 F: Fold<T, T2, > + ?Sized,
3465{
3466 match node {
3467 CreateSourceOptionName::TimestampInterval {
3468 } => {
3469 CreateSourceOptionName::TimestampInterval {
3470 }
3471 }
3472 CreateSourceOptionName::RetainHistory {
3473 } => {
3474 CreateSourceOptionName::RetainHistory {
3475 }
3476 }
3477 }
3478}
3479impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSourceStatement<T> {
3480 type Folded = CreateSourceStatement<T2>;
3481 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3482 folder.fold_create_source_statement(self)
3483 }
3484}
3485#[allow(clippy::needless_pass_by_ref_mut)]
3486pub fn fold_create_source_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSourceStatement<T>) -> CreateSourceStatement<T2>
3487where
3488 F: Fold<T, T2, > + ?Sized,
3489{
3490 CreateSourceStatement {
3491 name: folder.fold_unresolved_item_name(node.name),
3492 in_cluster: node.in_cluster.map(|v| folder.fold_cluster_name(v)),
3493 col_names: node.col_names.into_iter().map(|v| folder.fold_ident(v)).collect(),
3494 connection: folder.fold_create_source_connection(node.connection),
3495 include_metadata: node.include_metadata.into_iter().map(|v| folder.fold_source_include_metadata(v)).collect(),
3496 format: node.format.map(|v| folder.fold_format_specifier(v)),
3497 envelope: node.envelope.map(|v| folder.fold_source_envelope(v)),
3498 if_not_exists: node.if_not_exists,
3499 key_constraint: node.key_constraint.map(|v| folder.fold_key_constraint(v)),
3500 with_options: node.with_options.into_iter().map(|v| folder.fold_create_source_option(v)).collect(),
3501 external_references: node.external_references.map(|v| folder.fold_external_references(v)),
3502 progress_subsource: node.progress_subsource.map(|v| folder.fold_deferred_item_name(v)),
3503 }
3504}
3505impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSubsourceOption<T> {
3506 type Folded = CreateSubsourceOption<T2>;
3507 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3508 folder.fold_create_subsource_option(self)
3509 }
3510}
3511#[allow(clippy::needless_pass_by_ref_mut)]
3512pub fn fold_create_subsource_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSubsourceOption<T>) -> CreateSubsourceOption<T2>
3513where
3514 F: Fold<T, T2, > + ?Sized,
3515{
3516 CreateSubsourceOption {
3517 name: folder.fold_create_subsource_option_name(node.name),
3518 value: node.value.map(|v| folder.fold_with_option_value(v)),
3519 }
3520}
3521impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSubsourceOptionName {
3522 type Folded = CreateSubsourceOptionName;
3523 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3524 folder.fold_create_subsource_option_name(self)
3525 }
3526}
3527#[allow(clippy::needless_pass_by_ref_mut)]
3528pub fn fold_create_subsource_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSubsourceOptionName) -> CreateSubsourceOptionName
3529where
3530 F: Fold<T, T2, > + ?Sized,
3531{
3532 match node {
3533 CreateSubsourceOptionName::Progress {
3534 } => {
3535 CreateSubsourceOptionName::Progress {
3536 }
3537 }
3538 CreateSubsourceOptionName::ExternalReference {
3539 } => {
3540 CreateSubsourceOptionName::ExternalReference {
3541 }
3542 }
3543 CreateSubsourceOptionName::RetainHistory {
3544 } => {
3545 CreateSubsourceOptionName::RetainHistory {
3546 }
3547 }
3548 CreateSubsourceOptionName::TextColumns {
3549 } => {
3550 CreateSubsourceOptionName::TextColumns {
3551 }
3552 }
3553 CreateSubsourceOptionName::ExcludeColumns {
3554 } => {
3555 CreateSubsourceOptionName::ExcludeColumns {
3556 }
3557 }
3558 CreateSubsourceOptionName::Details {
3559 } => {
3560 CreateSubsourceOptionName::Details {
3561 }
3562 }
3563 }
3564}
3565impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateSubsourceStatement<T> {
3566 type Folded = CreateSubsourceStatement<T2>;
3567 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3568 folder.fold_create_subsource_statement(self)
3569 }
3570}
3571#[allow(clippy::needless_pass_by_ref_mut)]
3572pub fn fold_create_subsource_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateSubsourceStatement<T>) -> CreateSubsourceStatement<T2>
3573where
3574 F: Fold<T, T2, > + ?Sized,
3575{
3576 CreateSubsourceStatement {
3577 name: folder.fold_unresolved_item_name(node.name),
3578 columns: node.columns.into_iter().map(|v| folder.fold_column_def(v)).collect(),
3579 of_source: node.of_source.map(|v| folder.fold_item_name(v)),
3580 constraints: node.constraints.into_iter().map(|v| folder.fold_table_constraint(v)).collect(),
3581 if_not_exists: node.if_not_exists,
3582 with_options: node.with_options.into_iter().map(|v| folder.fold_create_subsource_option(v)).collect(),
3583 }
3584}
3585impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTableFromSourceStatement<T> {
3586 type Folded = CreateTableFromSourceStatement<T2>;
3587 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3588 folder.fold_create_table_from_source_statement(self)
3589 }
3590}
3591#[allow(clippy::needless_pass_by_ref_mut)]
3592pub fn fold_create_table_from_source_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTableFromSourceStatement<T>) -> CreateTableFromSourceStatement<T2>
3593where
3594 F: Fold<T, T2, > + ?Sized,
3595{
3596 CreateTableFromSourceStatement {
3597 name: folder.fold_unresolved_item_name(node.name),
3598 columns: folder.fold_table_from_source_columns(node.columns),
3599 constraints: node.constraints.into_iter().map(|v| folder.fold_table_constraint(v)).collect(),
3600 if_not_exists: node.if_not_exists,
3601 source: folder.fold_item_name(node.source),
3602 external_reference: node.external_reference.map(|v| folder.fold_unresolved_item_name(v)),
3603 with_options: node.with_options.into_iter().map(|v| folder.fold_table_from_source_option(v)).collect(),
3604 include_metadata: node.include_metadata.into_iter().map(|v| folder.fold_source_include_metadata(v)).collect(),
3605 format: node.format.map(|v| folder.fold_format_specifier(v)),
3606 envelope: node.envelope.map(|v| folder.fold_source_envelope(v)),
3607 }
3608}
3609impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTableStatement<T> {
3610 type Folded = CreateTableStatement<T2>;
3611 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3612 folder.fold_create_table_statement(self)
3613 }
3614}
3615#[allow(clippy::needless_pass_by_ref_mut)]
3616pub fn fold_create_table_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTableStatement<T>) -> CreateTableStatement<T2>
3617where
3618 F: Fold<T, T2, > + ?Sized,
3619{
3620 CreateTableStatement {
3621 name: folder.fold_unresolved_item_name(node.name),
3622 columns: node.columns.into_iter().map(|v| folder.fold_column_def(v)).collect(),
3623 constraints: node.constraints.into_iter().map(|v| folder.fold_table_constraint(v)).collect(),
3624 if_not_exists: node.if_not_exists,
3625 temporary: node.temporary,
3626 with_options: node.with_options.into_iter().map(|v| folder.fold_table_option(v)).collect(),
3627 }
3628}
3629impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTypeAs<T> {
3630 type Folded = CreateTypeAs<T2>;
3631 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3632 folder.fold_create_type_as(self)
3633 }
3634}
3635#[allow(clippy::needless_pass_by_ref_mut)]
3636pub fn fold_create_type_as<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTypeAs<T>) -> CreateTypeAs<T2>
3637where
3638 F: Fold<T, T2, > + ?Sized,
3639{
3640 match node {
3641 CreateTypeAs::List {
3642 options: binding0,
3643 } => {
3644 CreateTypeAs::List {
3645 options: binding0.into_iter().map(|v| folder.fold_create_type_list_option(v)).collect(),
3646 }
3647 }
3648 CreateTypeAs::Map {
3649 options: binding0,
3650 } => {
3651 CreateTypeAs::Map {
3652 options: binding0.into_iter().map(|v| folder.fold_create_type_map_option(v)).collect(),
3653 }
3654 }
3655 CreateTypeAs::Record {
3656 column_defs: binding0,
3657 } => {
3658 CreateTypeAs::Record {
3659 column_defs: binding0.into_iter().map(|v| folder.fold_column_def(v)).collect(),
3660 }
3661 }
3662 }
3663}
3664impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTypeListOption<T> {
3665 type Folded = CreateTypeListOption<T2>;
3666 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3667 folder.fold_create_type_list_option(self)
3668 }
3669}
3670#[allow(clippy::needless_pass_by_ref_mut)]
3671pub fn fold_create_type_list_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTypeListOption<T>) -> CreateTypeListOption<T2>
3672where
3673 F: Fold<T, T2, > + ?Sized,
3674{
3675 CreateTypeListOption {
3676 name: folder.fold_create_type_list_option_name(node.name),
3677 value: node.value.map(|v| folder.fold_with_option_value(v)),
3678 }
3679}
3680impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTypeListOptionName {
3681 type Folded = CreateTypeListOptionName;
3682 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3683 folder.fold_create_type_list_option_name(self)
3684 }
3685}
3686#[allow(clippy::needless_pass_by_ref_mut)]
3687pub fn fold_create_type_list_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTypeListOptionName) -> CreateTypeListOptionName
3688where
3689 F: Fold<T, T2, > + ?Sized,
3690{
3691 match node {
3692 CreateTypeListOptionName::ElementType {
3693 } => {
3694 CreateTypeListOptionName::ElementType {
3695 }
3696 }
3697 }
3698}
3699impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTypeMapOption<T> {
3700 type Folded = CreateTypeMapOption<T2>;
3701 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3702 folder.fold_create_type_map_option(self)
3703 }
3704}
3705#[allow(clippy::needless_pass_by_ref_mut)]
3706pub fn fold_create_type_map_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTypeMapOption<T>) -> CreateTypeMapOption<T2>
3707where
3708 F: Fold<T, T2, > + ?Sized,
3709{
3710 CreateTypeMapOption {
3711 name: folder.fold_create_type_map_option_name(node.name),
3712 value: node.value.map(|v| folder.fold_with_option_value(v)),
3713 }
3714}
3715impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTypeMapOptionName {
3716 type Folded = CreateTypeMapOptionName;
3717 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3718 folder.fold_create_type_map_option_name(self)
3719 }
3720}
3721#[allow(clippy::needless_pass_by_ref_mut)]
3722pub fn fold_create_type_map_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTypeMapOptionName) -> CreateTypeMapOptionName
3723where
3724 F: Fold<T, T2, > + ?Sized,
3725{
3726 match node {
3727 CreateTypeMapOptionName::KeyType {
3728 } => {
3729 CreateTypeMapOptionName::KeyType {
3730 }
3731 }
3732 CreateTypeMapOptionName::ValueType {
3733 } => {
3734 CreateTypeMapOptionName::ValueType {
3735 }
3736 }
3737 }
3738}
3739impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateTypeStatement<T> {
3740 type Folded = CreateTypeStatement<T2>;
3741 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3742 folder.fold_create_type_statement(self)
3743 }
3744}
3745#[allow(clippy::needless_pass_by_ref_mut)]
3746pub fn fold_create_type_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateTypeStatement<T>) -> CreateTypeStatement<T2>
3747where
3748 F: Fold<T, T2, > + ?Sized,
3749{
3750 CreateTypeStatement {
3751 name: folder.fold_unresolved_item_name(node.name),
3752 as_type: folder.fold_create_type_as(node.as_type),
3753 }
3754}
3755impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateViewStatement<T> {
3756 type Folded = CreateViewStatement<T2>;
3757 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3758 folder.fold_create_view_statement(self)
3759 }
3760}
3761#[allow(clippy::needless_pass_by_ref_mut)]
3762pub fn fold_create_view_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateViewStatement<T>) -> CreateViewStatement<T2>
3763where
3764 F: Fold<T, T2, > + ?Sized,
3765{
3766 CreateViewStatement {
3767 if_exists: folder.fold_if_exists_behavior(node.if_exists),
3768 temporary: node.temporary,
3769 definition: folder.fold_view_definition(node.definition),
3770 }
3771}
3772impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceBody {
3773 type Folded = CreateWebhookSourceBody;
3774 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3775 folder.fold_create_webhook_source_body(self)
3776 }
3777}
3778#[allow(clippy::needless_pass_by_ref_mut)]
3779pub fn fold_create_webhook_source_body<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceBody) -> CreateWebhookSourceBody
3780where
3781 F: Fold<T, T2, > + ?Sized,
3782{
3783 CreateWebhookSourceBody {
3784 alias: node.alias.map(|v| folder.fold_ident(v)),
3785 use_bytes: node.use_bytes,
3786 }
3787}
3788impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceCheck<T> {
3789 type Folded = CreateWebhookSourceCheck<T2>;
3790 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3791 folder.fold_create_webhook_source_check(self)
3792 }
3793}
3794#[allow(clippy::needless_pass_by_ref_mut)]
3795pub fn fold_create_webhook_source_check<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceCheck<T>) -> CreateWebhookSourceCheck<T2>
3796where
3797 F: Fold<T, T2, > + ?Sized,
3798{
3799 CreateWebhookSourceCheck {
3800 options: node.options.map(|v| folder.fold_create_webhook_source_check_options(v)),
3801 using: folder.fold_expr(node.using),
3802 }
3803}
3804impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceCheckOptions<T> {
3805 type Folded = CreateWebhookSourceCheckOptions<T2>;
3806 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3807 folder.fold_create_webhook_source_check_options(self)
3808 }
3809}
3810#[allow(clippy::needless_pass_by_ref_mut)]
3811pub fn fold_create_webhook_source_check_options<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceCheckOptions<T>) -> CreateWebhookSourceCheckOptions<T2>
3812where
3813 F: Fold<T, T2, > + ?Sized,
3814{
3815 CreateWebhookSourceCheckOptions {
3816 secrets: node.secrets.into_iter().map(|v| folder.fold_create_webhook_source_secret(v)).collect(),
3817 headers: node.headers.into_iter().map(|v| folder.fold_create_webhook_source_header(v)).collect(),
3818 bodies: node.bodies.into_iter().map(|v| folder.fold_create_webhook_source_body(v)).collect(),
3819 }
3820}
3821impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceFilterHeader {
3822 type Folded = CreateWebhookSourceFilterHeader;
3823 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3824 folder.fold_create_webhook_source_filter_header(self)
3825 }
3826}
3827#[allow(clippy::needless_pass_by_ref_mut)]
3828pub fn fold_create_webhook_source_filter_header<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceFilterHeader) -> CreateWebhookSourceFilterHeader
3829where
3830 F: Fold<T, T2, > + ?Sized,
3831{
3832 CreateWebhookSourceFilterHeader {
3833 block: node.block,
3834 header_name: node.header_name,
3835 }
3836}
3837impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceHeader {
3838 type Folded = CreateWebhookSourceHeader;
3839 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3840 folder.fold_create_webhook_source_header(self)
3841 }
3842}
3843#[allow(clippy::needless_pass_by_ref_mut)]
3844pub fn fold_create_webhook_source_header<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceHeader) -> CreateWebhookSourceHeader
3845where
3846 F: Fold<T, T2, > + ?Sized,
3847{
3848 CreateWebhookSourceHeader {
3849 alias: node.alias.map(|v| folder.fold_ident(v)),
3850 use_bytes: node.use_bytes,
3851 }
3852}
3853impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceIncludeHeaders {
3854 type Folded = CreateWebhookSourceIncludeHeaders;
3855 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3856 folder.fold_create_webhook_source_include_headers(self)
3857 }
3858}
3859#[allow(clippy::needless_pass_by_ref_mut)]
3860pub fn fold_create_webhook_source_include_headers<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceIncludeHeaders) -> CreateWebhookSourceIncludeHeaders
3861where
3862 F: Fold<T, T2, > + ?Sized,
3863{
3864 CreateWebhookSourceIncludeHeaders {
3865 mappings: node.mappings.into_iter().map(|v| folder.fold_create_webhook_source_map_header(v)).collect(),
3866 column: node.column.map(|v| v.into_iter().map(|v| folder.fold_create_webhook_source_filter_header(v)).collect()),
3867 }
3868}
3869impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceMapHeader {
3870 type Folded = CreateWebhookSourceMapHeader;
3871 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3872 folder.fold_create_webhook_source_map_header(self)
3873 }
3874}
3875#[allow(clippy::needless_pass_by_ref_mut)]
3876pub fn fold_create_webhook_source_map_header<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceMapHeader) -> CreateWebhookSourceMapHeader
3877where
3878 F: Fold<T, T2, > + ?Sized,
3879{
3880 CreateWebhookSourceMapHeader {
3881 header_name: node.header_name,
3882 column_name: folder.fold_ident(node.column_name),
3883 use_bytes: node.use_bytes,
3884 }
3885}
3886impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceSecret<T> {
3887 type Folded = CreateWebhookSourceSecret<T2>;
3888 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3889 folder.fold_create_webhook_source_secret(self)
3890 }
3891}
3892#[allow(clippy::needless_pass_by_ref_mut)]
3893pub fn fold_create_webhook_source_secret<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceSecret<T>) -> CreateWebhookSourceSecret<T2>
3894where
3895 F: Fold<T, T2, > + ?Sized,
3896{
3897 CreateWebhookSourceSecret {
3898 secret: folder.fold_item_name(node.secret),
3899 alias: node.alias.map(|v| folder.fold_ident(v)),
3900 use_bytes: node.use_bytes,
3901 }
3902}
3903impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CreateWebhookSourceStatement<T> {
3904 type Folded = CreateWebhookSourceStatement<T2>;
3905 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3906 folder.fold_create_webhook_source_statement(self)
3907 }
3908}
3909#[allow(clippy::needless_pass_by_ref_mut)]
3910pub fn fold_create_webhook_source_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CreateWebhookSourceStatement<T>) -> CreateWebhookSourceStatement<T2>
3911where
3912 F: Fold<T, T2, > + ?Sized,
3913{
3914 CreateWebhookSourceStatement {
3915 name: folder.fold_unresolved_item_name(node.name),
3916 is_table: node.is_table,
3917 if_not_exists: node.if_not_exists,
3918 body_format: folder.fold_format(node.body_format),
3919 include_headers: folder.fold_create_webhook_source_include_headers(node.include_headers),
3920 validate_using: node.validate_using.map(|v| folder.fold_create_webhook_source_check(v)),
3921 in_cluster: node.in_cluster.map(|v| folder.fold_cluster_name(v)),
3922 }
3923}
3924impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrConfigOption<T> {
3925 type Folded = CsrConfigOption<T2>;
3926 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3927 folder.fold_csr_config_option(self)
3928 }
3929}
3930#[allow(clippy::needless_pass_by_ref_mut)]
3931pub fn fold_csr_config_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrConfigOption<T>) -> CsrConfigOption<T2>
3932where
3933 F: Fold<T, T2, > + ?Sized,
3934{
3935 CsrConfigOption {
3936 name: folder.fold_csr_config_option_name(node.name),
3937 value: node.value.map(|v| folder.fold_with_option_value(v)),
3938 }
3939}
3940impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrConfigOptionName<T> {
3941 type Folded = CsrConfigOptionName<T2>;
3942 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3943 folder.fold_csr_config_option_name(self)
3944 }
3945}
3946#[allow(clippy::needless_pass_by_ref_mut)]
3947pub fn fold_csr_config_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrConfigOptionName<T>) -> CsrConfigOptionName<T2>
3948where
3949 F: Fold<T, T2, > + ?Sized,
3950{
3951 match node {
3952 CsrConfigOptionName::AvroKeyFullname {
3953 } => {
3954 CsrConfigOptionName::AvroKeyFullname {
3955 }
3956 }
3957 CsrConfigOptionName::AvroValueFullname {
3958 } => {
3959 CsrConfigOptionName::AvroValueFullname {
3960 }
3961 }
3962 CsrConfigOptionName::NullDefaults {
3963 } => {
3964 CsrConfigOptionName::NullDefaults {
3965 }
3966 }
3967 CsrConfigOptionName::AvroDocOn {
3968 0: binding0,
3969 } => {
3970 CsrConfigOptionName::AvroDocOn {
3971 0: folder.fold_avro_doc_on(binding0),
3972 }
3973 }
3974 CsrConfigOptionName::KeyCompatibilityLevel {
3975 } => {
3976 CsrConfigOptionName::KeyCompatibilityLevel {
3977 }
3978 }
3979 CsrConfigOptionName::ValueCompatibilityLevel {
3980 } => {
3981 CsrConfigOptionName::ValueCompatibilityLevel {
3982 }
3983 }
3984 }
3985}
3986impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrConnection<T> {
3987 type Folded = CsrConnection<T2>;
3988 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
3989 folder.fold_csr_connection(self)
3990 }
3991}
3992#[allow(clippy::needless_pass_by_ref_mut)]
3993pub fn fold_csr_connection<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrConnection<T>) -> CsrConnection<T2>
3994where
3995 F: Fold<T, T2, > + ?Sized,
3996{
3997 CsrConnection {
3998 connection: folder.fold_item_name(node.connection),
3999 options: node.options.into_iter().map(|v| folder.fold_csr_config_option(v)).collect(),
4000 }
4001}
4002impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrConnectionAvro<T> {
4003 type Folded = CsrConnectionAvro<T2>;
4004 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4005 folder.fold_csr_connection_avro(self)
4006 }
4007}
4008#[allow(clippy::needless_pass_by_ref_mut)]
4009pub fn fold_csr_connection_avro<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrConnectionAvro<T>) -> CsrConnectionAvro<T2>
4010where
4011 F: Fold<T, T2, > + ?Sized,
4012{
4013 CsrConnectionAvro {
4014 connection: folder.fold_csr_connection(node.connection),
4015 key_strategy: node.key_strategy.map(|v| folder.fold_reader_schema_selection_strategy(v)),
4016 value_strategy: node.value_strategy.map(|v| folder.fold_reader_schema_selection_strategy(v)),
4017 seed: node.seed.map(|v| folder.fold_csr_seed_avro(v)),
4018 }
4019}
4020impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrConnectionProtobuf<T> {
4021 type Folded = CsrConnectionProtobuf<T2>;
4022 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4023 folder.fold_csr_connection_protobuf(self)
4024 }
4025}
4026#[allow(clippy::needless_pass_by_ref_mut)]
4027pub fn fold_csr_connection_protobuf<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrConnectionProtobuf<T>) -> CsrConnectionProtobuf<T2>
4028where
4029 F: Fold<T, T2, > + ?Sized,
4030{
4031 CsrConnectionProtobuf {
4032 connection: folder.fold_csr_connection(node.connection),
4033 seed: node.seed.map(|v| folder.fold_csr_seed_protobuf(v)),
4034 }
4035}
4036impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrSeedAvro {
4037 type Folded = CsrSeedAvro;
4038 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4039 folder.fold_csr_seed_avro(self)
4040 }
4041}
4042#[allow(clippy::needless_pass_by_ref_mut)]
4043pub fn fold_csr_seed_avro<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrSeedAvro) -> CsrSeedAvro
4044where
4045 F: Fold<T, T2, > + ?Sized,
4046{
4047 CsrSeedAvro {
4048 key_schema: node.key_schema.map(|v| v),
4049 value_schema: node.value_schema,
4050 key_reference_schemas: node.key_reference_schemas.into_iter().map(|v| v).collect(),
4051 value_reference_schemas: node.value_reference_schemas.into_iter().map(|v| v).collect(),
4052 }
4053}
4054impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrSeedProtobuf {
4055 type Folded = CsrSeedProtobuf;
4056 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4057 folder.fold_csr_seed_protobuf(self)
4058 }
4059}
4060#[allow(clippy::needless_pass_by_ref_mut)]
4061pub fn fold_csr_seed_protobuf<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrSeedProtobuf) -> CsrSeedProtobuf
4062where
4063 F: Fold<T, T2, > + ?Sized,
4064{
4065 CsrSeedProtobuf {
4066 key: node.key.map(|v| folder.fold_csr_seed_protobuf_schema(v)),
4067 value: folder.fold_csr_seed_protobuf_schema(node.value),
4068 }
4069}
4070impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsrSeedProtobufSchema {
4071 type Folded = CsrSeedProtobufSchema;
4072 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4073 folder.fold_csr_seed_protobuf_schema(self)
4074 }
4075}
4076#[allow(clippy::needless_pass_by_ref_mut)]
4077pub fn fold_csr_seed_protobuf_schema<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsrSeedProtobufSchema) -> CsrSeedProtobufSchema
4078where
4079 F: Fold<T, T2, > + ?Sized,
4080{
4081 CsrSeedProtobufSchema {
4082 schema: node.schema,
4083 message_name: node.message_name,
4084 }
4085}
4086impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CsvColumns {
4087 type Folded = CsvColumns;
4088 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4089 folder.fold_csv_columns(self)
4090 }
4091}
4092#[allow(clippy::needless_pass_by_ref_mut)]
4093pub fn fold_csv_columns<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CsvColumns) -> CsvColumns
4094where
4095 F: Fold<T, T2, > + ?Sized,
4096{
4097 match node {
4098 CsvColumns::Count {
4099 0: binding0,
4100 } => {
4101 CsvColumns::Count {
4102 0: binding0,
4103 }
4104 }
4105 CsvColumns::Header {
4106 names: binding0,
4107 } => {
4108 CsvColumns::Header {
4109 names: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
4110 }
4111 }
4112 }
4113}
4114impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Cte<T> {
4115 type Folded = Cte<T2>;
4116 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4117 folder.fold_cte(self)
4118 }
4119}
4120#[allow(clippy::needless_pass_by_ref_mut)]
4121pub fn fold_cte<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Cte<T>) -> Cte<T2>
4122where
4123 F: Fold<T, T2, > + ?Sized,
4124{
4125 Cte {
4126 alias: folder.fold_table_alias(node.alias),
4127 id: folder.fold_cte_id(node.id),
4128 query: folder.fold_query(node.query),
4129 }
4130}
4131impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CteBlock<T> {
4132 type Folded = CteBlock<T2>;
4133 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4134 folder.fold_cte_block(self)
4135 }
4136}
4137#[allow(clippy::needless_pass_by_ref_mut)]
4138pub fn fold_cte_block<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CteBlock<T>) -> CteBlock<T2>
4139where
4140 F: Fold<T, T2, > + ?Sized,
4141{
4142 match node {
4143 CteBlock::Simple {
4144 0: binding0,
4145 } => {
4146 CteBlock::Simple {
4147 0: binding0.into_iter().map(|v| folder.fold_cte(v)).collect(),
4148 }
4149 }
4150 CteBlock::MutuallyRecursive {
4151 0: binding0,
4152 } => {
4153 CteBlock::MutuallyRecursive {
4154 0: folder.fold_mut_rec_block(binding0),
4155 }
4156 }
4157 }
4158}
4159impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CteMutRec<T> {
4160 type Folded = CteMutRec<T2>;
4161 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4162 folder.fold_cte_mut_rec(self)
4163 }
4164}
4165#[allow(clippy::needless_pass_by_ref_mut)]
4166pub fn fold_cte_mut_rec<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CteMutRec<T>) -> CteMutRec<T2>
4167where
4168 F: Fold<T, T2, > + ?Sized,
4169{
4170 CteMutRec {
4171 name: folder.fold_ident(node.name),
4172 columns: node.columns.into_iter().map(|v| folder.fold_cte_mut_rec_column_def(v)).collect(),
4173 id: folder.fold_cte_id(node.id),
4174 query: folder.fold_query(node.query),
4175 }
4176}
4177impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for CteMutRecColumnDef<T> {
4178 type Folded = CteMutRecColumnDef<T2>;
4179 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4180 folder.fold_cte_mut_rec_column_def(self)
4181 }
4182}
4183#[allow(clippy::needless_pass_by_ref_mut)]
4184pub fn fold_cte_mut_rec_column_def<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: CteMutRecColumnDef<T>) -> CteMutRecColumnDef<T2>
4185where
4186 F: Fold<T, T2, > + ?Sized,
4187{
4188 CteMutRecColumnDef {
4189 name: folder.fold_ident(node.name),
4190 data_type: folder.fold_data_type(node.data_type),
4191 }
4192}
4193impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DateTimeField {
4194 type Folded = DateTimeField;
4195 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4196 folder.fold_date_time_field(self)
4197 }
4198}
4199#[allow(clippy::needless_pass_by_ref_mut)]
4200pub fn fold_date_time_field<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DateTimeField) -> DateTimeField
4201where
4202 F: Fold<T, T2, > + ?Sized,
4203{
4204 match node {
4205 DateTimeField::Millennium {
4206 } => {
4207 DateTimeField::Millennium {
4208 }
4209 }
4210 DateTimeField::Century {
4211 } => {
4212 DateTimeField::Century {
4213 }
4214 }
4215 DateTimeField::Decade {
4216 } => {
4217 DateTimeField::Decade {
4218 }
4219 }
4220 DateTimeField::Year {
4221 } => {
4222 DateTimeField::Year {
4223 }
4224 }
4225 DateTimeField::Month {
4226 } => {
4227 DateTimeField::Month {
4228 }
4229 }
4230 DateTimeField::Day {
4231 } => {
4232 DateTimeField::Day {
4233 }
4234 }
4235 DateTimeField::Hour {
4236 } => {
4237 DateTimeField::Hour {
4238 }
4239 }
4240 DateTimeField::Minute {
4241 } => {
4242 DateTimeField::Minute {
4243 }
4244 }
4245 DateTimeField::Second {
4246 } => {
4247 DateTimeField::Second {
4248 }
4249 }
4250 DateTimeField::Milliseconds {
4251 } => {
4252 DateTimeField::Milliseconds {
4253 }
4254 }
4255 DateTimeField::Microseconds {
4256 } => {
4257 DateTimeField::Microseconds {
4258 }
4259 }
4260 }
4261}
4262impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DeallocateStatement {
4263 type Folded = DeallocateStatement;
4264 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4265 folder.fold_deallocate_statement(self)
4266 }
4267}
4268#[allow(clippy::needless_pass_by_ref_mut)]
4269pub fn fold_deallocate_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DeallocateStatement) -> DeallocateStatement
4270where
4271 F: Fold<T, T2, > + ?Sized,
4272{
4273 DeallocateStatement {
4274 name: node.name.map(|v| folder.fold_ident(v)),
4275 }
4276}
4277impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DeclareStatement<T> {
4278 type Folded = DeclareStatement<T2>;
4279 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4280 folder.fold_declare_statement(self)
4281 }
4282}
4283#[allow(clippy::needless_pass_by_ref_mut)]
4284pub fn fold_declare_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DeclareStatement<T>) -> DeclareStatement<T2>
4285where
4286 F: Fold<T, T2, > + ?Sized,
4287{
4288 DeclareStatement {
4289 name: folder.fold_ident(node.name),
4290 stmt: Box::new(folder.fold_nested_statement(*node.stmt)),
4291 sql: node.sql,
4292 }
4293}
4294impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DeferredItemName<T> {
4295 type Folded = DeferredItemName<T2>;
4296 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4297 folder.fold_deferred_item_name(self)
4298 }
4299}
4300#[allow(clippy::needless_pass_by_ref_mut)]
4301pub fn fold_deferred_item_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DeferredItemName<T>) -> DeferredItemName<T2>
4302where
4303 F: Fold<T, T2, > + ?Sized,
4304{
4305 match node {
4306 DeferredItemName::Named {
4307 0: binding0,
4308 } => {
4309 DeferredItemName::Named {
4310 0: folder.fold_item_name(binding0),
4311 }
4312 }
4313 DeferredItemName::Deferred {
4314 0: binding0,
4315 } => {
4316 DeferredItemName::Deferred {
4317 0: folder.fold_unresolved_item_name(binding0),
4318 }
4319 }
4320 }
4321}
4322impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DeleteStatement<T> {
4323 type Folded = DeleteStatement<T2>;
4324 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4325 folder.fold_delete_statement(self)
4326 }
4327}
4328#[allow(clippy::needless_pass_by_ref_mut)]
4329pub fn fold_delete_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DeleteStatement<T>) -> DeleteStatement<T2>
4330where
4331 F: Fold<T, T2, > + ?Sized,
4332{
4333 DeleteStatement {
4334 table_name: folder.fold_item_name(node.table_name),
4335 alias: node.alias.map(|v| folder.fold_table_alias(v)),
4336 using: node.using.into_iter().map(|v| folder.fold_table_with_joins(v)).collect(),
4337 selection: node.selection.map(|v| folder.fold_expr(v)),
4338 }
4339}
4340impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DiscardStatement {
4341 type Folded = DiscardStatement;
4342 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4343 folder.fold_discard_statement(self)
4344 }
4345}
4346#[allow(clippy::needless_pass_by_ref_mut)]
4347pub fn fold_discard_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DiscardStatement) -> DiscardStatement
4348where
4349 F: Fold<T, T2, > + ?Sized,
4350{
4351 DiscardStatement {
4352 target: folder.fold_discard_target(node.target),
4353 }
4354}
4355impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DiscardTarget {
4356 type Folded = DiscardTarget;
4357 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4358 folder.fold_discard_target(self)
4359 }
4360}
4361#[allow(clippy::needless_pass_by_ref_mut)]
4362pub fn fold_discard_target<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DiscardTarget) -> DiscardTarget
4363where
4364 F: Fold<T, T2, > + ?Sized,
4365{
4366 match node {
4367 DiscardTarget::Plans {
4368 } => {
4369 DiscardTarget::Plans {
4370 }
4371 }
4372 DiscardTarget::Sequences {
4373 } => {
4374 DiscardTarget::Sequences {
4375 }
4376 }
4377 DiscardTarget::Temp {
4378 } => {
4379 DiscardTarget::Temp {
4380 }
4381 }
4382 DiscardTarget::All {
4383 } => {
4384 DiscardTarget::All {
4385 }
4386 }
4387 }
4388}
4389impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Distinct<T> {
4390 type Folded = Distinct<T2>;
4391 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4392 folder.fold_distinct(self)
4393 }
4394}
4395#[allow(clippy::needless_pass_by_ref_mut)]
4396pub fn fold_distinct<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Distinct<T>) -> Distinct<T2>
4397where
4398 F: Fold<T, T2, > + ?Sized,
4399{
4400 match node {
4401 Distinct::EntireRow {
4402 } => {
4403 Distinct::EntireRow {
4404 }
4405 }
4406 Distinct::On {
4407 0: binding0,
4408 } => {
4409 Distinct::On {
4410 0: binding0.into_iter().map(|v| folder.fold_expr(v)).collect(),
4411 }
4412 }
4413 }
4414}
4415impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DocOnIdentifier<T> {
4416 type Folded = DocOnIdentifier<T2>;
4417 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4418 folder.fold_doc_on_identifier(self)
4419 }
4420}
4421#[allow(clippy::needless_pass_by_ref_mut)]
4422pub fn fold_doc_on_identifier<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DocOnIdentifier<T>) -> DocOnIdentifier<T2>
4423where
4424 F: Fold<T, T2, > + ?Sized,
4425{
4426 match node {
4427 DocOnIdentifier::Column {
4428 0: binding0,
4429 } => {
4430 DocOnIdentifier::Column {
4431 0: folder.fold_column_name(binding0),
4432 }
4433 }
4434 DocOnIdentifier::Type {
4435 0: binding0,
4436 } => {
4437 DocOnIdentifier::Type {
4438 0: folder.fold_item_name(binding0),
4439 }
4440 }
4441 }
4442}
4443impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DocOnSchema {
4444 type Folded = DocOnSchema;
4445 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4446 folder.fold_doc_on_schema(self)
4447 }
4448}
4449#[allow(clippy::needless_pass_by_ref_mut)]
4450pub fn fold_doc_on_schema<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DocOnSchema) -> DocOnSchema
4451where
4452 F: Fold<T, T2, > + ?Sized,
4453{
4454 match node {
4455 DocOnSchema::KeyOnly {
4456 } => {
4457 DocOnSchema::KeyOnly {
4458 }
4459 }
4460 DocOnSchema::ValueOnly {
4461 } => {
4462 DocOnSchema::ValueOnly {
4463 }
4464 }
4465 DocOnSchema::All {
4466 } => {
4467 DocOnSchema::All {
4468 }
4469 }
4470 }
4471}
4472impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DropObjectsStatement {
4473 type Folded = DropObjectsStatement;
4474 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4475 folder.fold_drop_objects_statement(self)
4476 }
4477}
4478#[allow(clippy::needless_pass_by_ref_mut)]
4479pub fn fold_drop_objects_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DropObjectsStatement) -> DropObjectsStatement
4480where
4481 F: Fold<T, T2, > + ?Sized,
4482{
4483 DropObjectsStatement {
4484 object_type: folder.fold_object_type(node.object_type),
4485 if_exists: node.if_exists,
4486 names: node.names.into_iter().map(|v| folder.fold_unresolved_object_name(v)).collect(),
4487 cascade: node.cascade,
4488 }
4489}
4490impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for DropOwnedStatement<T> {
4491 type Folded = DropOwnedStatement<T2>;
4492 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4493 folder.fold_drop_owned_statement(self)
4494 }
4495}
4496#[allow(clippy::needless_pass_by_ref_mut)]
4497pub fn fold_drop_owned_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: DropOwnedStatement<T>) -> DropOwnedStatement<T2>
4498where
4499 F: Fold<T, T2, > + ?Sized,
4500{
4501 DropOwnedStatement {
4502 role_names: node.role_names.into_iter().map(|v| folder.fold_role_name(v)).collect(),
4503 cascade: node.cascade.map(|v| v),
4504 }
4505}
4506impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExecuteStatement<T> {
4507 type Folded = ExecuteStatement<T2>;
4508 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4509 folder.fold_execute_statement(self)
4510 }
4511}
4512#[allow(clippy::needless_pass_by_ref_mut)]
4513pub fn fold_execute_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExecuteStatement<T>) -> ExecuteStatement<T2>
4514where
4515 F: Fold<T, T2, > + ?Sized,
4516{
4517 ExecuteStatement {
4518 name: folder.fold_ident(node.name),
4519 params: node.params.into_iter().map(|v| folder.fold_expr(v)).collect(),
4520 }
4521}
4522impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExecuteUnitTestStatement<T> {
4523 type Folded = ExecuteUnitTestStatement<T2>;
4524 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4525 folder.fold_execute_unit_test_statement(self)
4526 }
4527}
4528#[allow(clippy::needless_pass_by_ref_mut)]
4529pub fn fold_execute_unit_test_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExecuteUnitTestStatement<T>) -> ExecuteUnitTestStatement<T2>
4530where
4531 F: Fold<T, T2, > + ?Sized,
4532{
4533 ExecuteUnitTestStatement {
4534 name: folder.fold_ident(node.name),
4535 target: folder.fold_item_name(node.target),
4536 at_time: node.at_time.map(|v| folder.fold_expr(v)),
4537 mocks: node.mocks.into_iter().map(|v| folder.fold_mock_view_def(v)).collect(),
4538 expected: folder.fold_expected_result_def(node.expected),
4539 }
4540}
4541impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExpectedResultDef<T> {
4542 type Folded = ExpectedResultDef<T2>;
4543 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4544 folder.fold_expected_result_def(self)
4545 }
4546}
4547#[allow(clippy::needless_pass_by_ref_mut)]
4548pub fn fold_expected_result_def<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExpectedResultDef<T>) -> ExpectedResultDef<T2>
4549where
4550 F: Fold<T, T2, > + ?Sized,
4551{
4552 ExpectedResultDef {
4553 columns: node.columns.into_iter().map(|v| folder.fold_column_def(v)).collect(),
4554 query: folder.fold_query(node.query),
4555 }
4556}
4557impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainAnalyzeClusterStatement {
4558 type Folded = ExplainAnalyzeClusterStatement;
4559 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4560 folder.fold_explain_analyze_cluster_statement(self)
4561 }
4562}
4563#[allow(clippy::needless_pass_by_ref_mut)]
4564pub fn fold_explain_analyze_cluster_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainAnalyzeClusterStatement) -> ExplainAnalyzeClusterStatement
4565where
4566 F: Fold<T, T2, > + ?Sized,
4567{
4568 ExplainAnalyzeClusterStatement {
4569 properties: folder.fold_explain_analyze_computation_properties(node.properties),
4570 as_sql: node.as_sql,
4571 }
4572}
4573impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainAnalyzeComputationProperties {
4574 type Folded = ExplainAnalyzeComputationProperties;
4575 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4576 folder.fold_explain_analyze_computation_properties(self)
4577 }
4578}
4579#[allow(clippy::needless_pass_by_ref_mut)]
4580pub fn fold_explain_analyze_computation_properties<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainAnalyzeComputationProperties) -> ExplainAnalyzeComputationProperties
4581where
4582 F: Fold<T, T2, > + ?Sized,
4583{
4584 ExplainAnalyzeComputationProperties {
4585 properties: node.properties.into_iter().map(|v| folder.fold_explain_analyze_computation_property(v)).collect(),
4586 skew: node.skew,
4587 }
4588}
4589impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainAnalyzeComputationProperty {
4590 type Folded = ExplainAnalyzeComputationProperty;
4591 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4592 folder.fold_explain_analyze_computation_property(self)
4593 }
4594}
4595#[allow(clippy::needless_pass_by_ref_mut)]
4596pub fn fold_explain_analyze_computation_property<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainAnalyzeComputationProperty) -> ExplainAnalyzeComputationProperty
4597where
4598 F: Fold<T, T2, > + ?Sized,
4599{
4600 match node {
4601 ExplainAnalyzeComputationProperty::Cpu {
4602 } => {
4603 ExplainAnalyzeComputationProperty::Cpu {
4604 }
4605 }
4606 ExplainAnalyzeComputationProperty::Memory {
4607 } => {
4608 ExplainAnalyzeComputationProperty::Memory {
4609 }
4610 }
4611 }
4612}
4613impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainAnalyzeObjectStatement<T> {
4614 type Folded = ExplainAnalyzeObjectStatement<T2>;
4615 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4616 folder.fold_explain_analyze_object_statement(self)
4617 }
4618}
4619#[allow(clippy::needless_pass_by_ref_mut)]
4620pub fn fold_explain_analyze_object_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainAnalyzeObjectStatement<T>) -> ExplainAnalyzeObjectStatement<T2>
4621where
4622 F: Fold<T, T2, > + ?Sized,
4623{
4624 ExplainAnalyzeObjectStatement {
4625 properties: folder.fold_explain_analyze_property(node.properties),
4626 explainee: folder.fold_explainee(node.explainee),
4627 as_sql: node.as_sql,
4628 }
4629}
4630impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainAnalyzeProperty {
4631 type Folded = ExplainAnalyzeProperty;
4632 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4633 folder.fold_explain_analyze_property(self)
4634 }
4635}
4636#[allow(clippy::needless_pass_by_ref_mut)]
4637pub fn fold_explain_analyze_property<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainAnalyzeProperty) -> ExplainAnalyzeProperty
4638where
4639 F: Fold<T, T2, > + ?Sized,
4640{
4641 match node {
4642 ExplainAnalyzeProperty::Computation {
4643 0: binding0,
4644 } => {
4645 ExplainAnalyzeProperty::Computation {
4646 0: folder.fold_explain_analyze_computation_properties(binding0),
4647 }
4648 }
4649 ExplainAnalyzeProperty::Hints {
4650 } => {
4651 ExplainAnalyzeProperty::Hints {
4652 }
4653 }
4654 }
4655}
4656impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainFormat {
4657 type Folded = ExplainFormat;
4658 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4659 folder.fold_explain_format(self)
4660 }
4661}
4662#[allow(clippy::needless_pass_by_ref_mut)]
4663pub fn fold_explain_format<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainFormat) -> ExplainFormat
4664where
4665 F: Fold<T, T2, > + ?Sized,
4666{
4667 match node {
4668 ExplainFormat::Text {
4669 } => {
4670 ExplainFormat::Text {
4671 }
4672 }
4673 ExplainFormat::VerboseText {
4674 } => {
4675 ExplainFormat::VerboseText {
4676 }
4677 }
4678 ExplainFormat::Json {
4679 } => {
4680 ExplainFormat::Json {
4681 }
4682 }
4683 ExplainFormat::Dot {
4684 } => {
4685 ExplainFormat::Dot {
4686 }
4687 }
4688 }
4689}
4690impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainPlanOption<T> {
4691 type Folded = ExplainPlanOption<T2>;
4692 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4693 folder.fold_explain_plan_option(self)
4694 }
4695}
4696#[allow(clippy::needless_pass_by_ref_mut)]
4697pub fn fold_explain_plan_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainPlanOption<T>) -> ExplainPlanOption<T2>
4698where
4699 F: Fold<T, T2, > + ?Sized,
4700{
4701 ExplainPlanOption {
4702 name: folder.fold_explain_plan_option_name(node.name),
4703 value: node.value.map(|v| folder.fold_with_option_value(v)),
4704 }
4705}
4706impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainPlanOptionName {
4707 type Folded = ExplainPlanOptionName;
4708 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4709 folder.fold_explain_plan_option_name(self)
4710 }
4711}
4712#[allow(clippy::needless_pass_by_ref_mut)]
4713pub fn fold_explain_plan_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainPlanOptionName) -> ExplainPlanOptionName
4714where
4715 F: Fold<T, T2, > + ?Sized,
4716{
4717 match node {
4718 ExplainPlanOptionName::Arity {
4719 } => {
4720 ExplainPlanOptionName::Arity {
4721 }
4722 }
4723 ExplainPlanOptionName::Cardinality {
4724 } => {
4725 ExplainPlanOptionName::Cardinality {
4726 }
4727 }
4728 ExplainPlanOptionName::ColumnNames {
4729 } => {
4730 ExplainPlanOptionName::ColumnNames {
4731 }
4732 }
4733 ExplainPlanOptionName::FilterPushdown {
4734 } => {
4735 ExplainPlanOptionName::FilterPushdown {
4736 }
4737 }
4738 ExplainPlanOptionName::HumanizedExpressions {
4739 } => {
4740 ExplainPlanOptionName::HumanizedExpressions {
4741 }
4742 }
4743 ExplainPlanOptionName::JoinImplementations {
4744 } => {
4745 ExplainPlanOptionName::JoinImplementations {
4746 }
4747 }
4748 ExplainPlanOptionName::Keys {
4749 } => {
4750 ExplainPlanOptionName::Keys {
4751 }
4752 }
4753 ExplainPlanOptionName::LinearChains {
4754 } => {
4755 ExplainPlanOptionName::LinearChains {
4756 }
4757 }
4758 ExplainPlanOptionName::NonNegative {
4759 } => {
4760 ExplainPlanOptionName::NonNegative {
4761 }
4762 }
4763 ExplainPlanOptionName::NoFastPath {
4764 } => {
4765 ExplainPlanOptionName::NoFastPath {
4766 }
4767 }
4768 ExplainPlanOptionName::NoNotices {
4769 } => {
4770 ExplainPlanOptionName::NoNotices {
4771 }
4772 }
4773 ExplainPlanOptionName::NodeIdentifiers {
4774 } => {
4775 ExplainPlanOptionName::NodeIdentifiers {
4776 }
4777 }
4778 ExplainPlanOptionName::RawPlans {
4779 } => {
4780 ExplainPlanOptionName::RawPlans {
4781 }
4782 }
4783 ExplainPlanOptionName::RawSyntax {
4784 } => {
4785 ExplainPlanOptionName::RawSyntax {
4786 }
4787 }
4788 ExplainPlanOptionName::Raw {
4789 } => {
4790 ExplainPlanOptionName::Raw {
4791 }
4792 }
4793 ExplainPlanOptionName::Redacted {
4794 } => {
4795 ExplainPlanOptionName::Redacted {
4796 }
4797 }
4798 ExplainPlanOptionName::SubtreeSize {
4799 } => {
4800 ExplainPlanOptionName::SubtreeSize {
4801 }
4802 }
4803 ExplainPlanOptionName::Timing {
4804 } => {
4805 ExplainPlanOptionName::Timing {
4806 }
4807 }
4808 ExplainPlanOptionName::Types {
4809 } => {
4810 ExplainPlanOptionName::Types {
4811 }
4812 }
4813 ExplainPlanOptionName::Equivalences {
4814 } => {
4815 ExplainPlanOptionName::Equivalences {
4816 }
4817 }
4818 ExplainPlanOptionName::ReoptimizeImportedViews {
4819 } => {
4820 ExplainPlanOptionName::ReoptimizeImportedViews {
4821 }
4822 }
4823 ExplainPlanOptionName::EnableNewOuterJoinLowering {
4824 } => {
4825 ExplainPlanOptionName::EnableNewOuterJoinLowering {
4826 }
4827 }
4828 ExplainPlanOptionName::EnableEagerDeltaJoins {
4829 } => {
4830 ExplainPlanOptionName::EnableEagerDeltaJoins {
4831 }
4832 }
4833 ExplainPlanOptionName::EnableVariadicLeftJoinLowering {
4834 } => {
4835 ExplainPlanOptionName::EnableVariadicLeftJoinLowering {
4836 }
4837 }
4838 ExplainPlanOptionName::EnableLetrecFixpointAnalysis {
4839 } => {
4840 ExplainPlanOptionName::EnableLetrecFixpointAnalysis {
4841 }
4842 }
4843 ExplainPlanOptionName::EnableJoinPrioritizeArranged {
4844 } => {
4845 ExplainPlanOptionName::EnableJoinPrioritizeArranged {
4846 }
4847 }
4848 ExplainPlanOptionName::EnableProjectionPushdownAfterRelationCse {
4849 } => {
4850 ExplainPlanOptionName::EnableProjectionPushdownAfterRelationCse {
4851 }
4852 }
4853 ExplainPlanOptionName::EnableFixedCorrelatedCteLowering {
4854 } => {
4855 ExplainPlanOptionName::EnableFixedCorrelatedCteLowering {
4856 }
4857 }
4858 ExplainPlanOptionName::EnableUnionCancellationAfterRelationCse {
4859 } => {
4860 ExplainPlanOptionName::EnableUnionCancellationAfterRelationCse {
4861 }
4862 }
4863 }
4864}
4865impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainPlanStatement<T> {
4866 type Folded = ExplainPlanStatement<T2>;
4867 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4868 folder.fold_explain_plan_statement(self)
4869 }
4870}
4871#[allow(clippy::needless_pass_by_ref_mut)]
4872pub fn fold_explain_plan_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainPlanStatement<T>) -> ExplainPlanStatement<T2>
4873where
4874 F: Fold<T, T2, > + ?Sized,
4875{
4876 ExplainPlanStatement {
4877 stage: node.stage.map(|v| folder.fold_explain_stage(v)),
4878 with_options: node.with_options.into_iter().map(|v| folder.fold_explain_plan_option(v)).collect(),
4879 format: node.format.map(|v| folder.fold_explain_format(v)),
4880 explainee: folder.fold_explainee(node.explainee),
4881 }
4882}
4883impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainPushdownStatement<T> {
4884 type Folded = ExplainPushdownStatement<T2>;
4885 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4886 folder.fold_explain_pushdown_statement(self)
4887 }
4888}
4889#[allow(clippy::needless_pass_by_ref_mut)]
4890pub fn fold_explain_pushdown_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainPushdownStatement<T>) -> ExplainPushdownStatement<T2>
4891where
4892 F: Fold<T, T2, > + ?Sized,
4893{
4894 ExplainPushdownStatement {
4895 explainee: folder.fold_explainee(node.explainee),
4896 }
4897}
4898impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainSinkSchemaFor {
4899 type Folded = ExplainSinkSchemaFor;
4900 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4901 folder.fold_explain_sink_schema_for(self)
4902 }
4903}
4904#[allow(clippy::needless_pass_by_ref_mut)]
4905pub fn fold_explain_sink_schema_for<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainSinkSchemaFor) -> ExplainSinkSchemaFor
4906where
4907 F: Fold<T, T2, > + ?Sized,
4908{
4909 match node {
4910 ExplainSinkSchemaFor::Key {
4911 } => {
4912 ExplainSinkSchemaFor::Key {
4913 }
4914 }
4915 ExplainSinkSchemaFor::Value {
4916 } => {
4917 ExplainSinkSchemaFor::Value {
4918 }
4919 }
4920 }
4921}
4922impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainSinkSchemaStatement<T> {
4923 type Folded = ExplainSinkSchemaStatement<T2>;
4924 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4925 folder.fold_explain_sink_schema_statement(self)
4926 }
4927}
4928#[allow(clippy::needless_pass_by_ref_mut)]
4929pub fn fold_explain_sink_schema_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainSinkSchemaStatement<T>) -> ExplainSinkSchemaStatement<T2>
4930where
4931 F: Fold<T, T2, > + ?Sized,
4932{
4933 ExplainSinkSchemaStatement {
4934 schema_for: folder.fold_explain_sink_schema_for(node.schema_for),
4935 format: node.format.map(|v| folder.fold_explain_format(v)),
4936 statement: folder.fold_create_sink_statement(node.statement),
4937 }
4938}
4939impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainStage {
4940 type Folded = ExplainStage;
4941 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4942 folder.fold_explain_stage(self)
4943 }
4944}
4945#[allow(clippy::needless_pass_by_ref_mut)]
4946pub fn fold_explain_stage<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainStage) -> ExplainStage
4947where
4948 F: Fold<T, T2, > + ?Sized,
4949{
4950 match node {
4951 ExplainStage::RawPlan {
4952 } => {
4953 ExplainStage::RawPlan {
4954 }
4955 }
4956 ExplainStage::DecorrelatedPlan {
4957 } => {
4958 ExplainStage::DecorrelatedPlan {
4959 }
4960 }
4961 ExplainStage::LocalPlan {
4962 } => {
4963 ExplainStage::LocalPlan {
4964 }
4965 }
4966 ExplainStage::GlobalPlan {
4967 } => {
4968 ExplainStage::GlobalPlan {
4969 }
4970 }
4971 ExplainStage::PhysicalPlan {
4972 } => {
4973 ExplainStage::PhysicalPlan {
4974 }
4975 }
4976 ExplainStage::Trace {
4977 } => {
4978 ExplainStage::Trace {
4979 }
4980 }
4981 ExplainStage::PlanInsights {
4982 } => {
4983 ExplainStage::PlanInsights {
4984 }
4985 }
4986 }
4987}
4988impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExplainTimestampStatement<T> {
4989 type Folded = ExplainTimestampStatement<T2>;
4990 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
4991 folder.fold_explain_timestamp_statement(self)
4992 }
4993}
4994#[allow(clippy::needless_pass_by_ref_mut)]
4995pub fn fold_explain_timestamp_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExplainTimestampStatement<T>) -> ExplainTimestampStatement<T2>
4996where
4997 F: Fold<T, T2, > + ?Sized,
4998{
4999 ExplainTimestampStatement {
5000 format: node.format.map(|v| folder.fold_explain_format(v)),
5001 select: folder.fold_select_statement(node.select),
5002 }
5003}
5004impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Explainee<T> {
5005 type Folded = Explainee<T2>;
5006 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5007 folder.fold_explainee(self)
5008 }
5009}
5010#[allow(clippy::needless_pass_by_ref_mut)]
5011pub fn fold_explainee<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Explainee<T>) -> Explainee<T2>
5012where
5013 F: Fold<T, T2, > + ?Sized,
5014{
5015 match node {
5016 Explainee::View {
5017 0: binding0,
5018 } => {
5019 Explainee::View {
5020 0: folder.fold_item_name(binding0),
5021 }
5022 }
5023 Explainee::MaterializedView {
5024 0: binding0,
5025 } => {
5026 Explainee::MaterializedView {
5027 0: folder.fold_item_name(binding0),
5028 }
5029 }
5030 Explainee::Index {
5031 0: binding0,
5032 } => {
5033 Explainee::Index {
5034 0: folder.fold_item_name(binding0),
5035 }
5036 }
5037 Explainee::ReplanView {
5038 0: binding0,
5039 } => {
5040 Explainee::ReplanView {
5041 0: folder.fold_item_name(binding0),
5042 }
5043 }
5044 Explainee::ReplanMaterializedView {
5045 0: binding0,
5046 } => {
5047 Explainee::ReplanMaterializedView {
5048 0: folder.fold_item_name(binding0),
5049 }
5050 }
5051 Explainee::ReplanIndex {
5052 0: binding0,
5053 } => {
5054 Explainee::ReplanIndex {
5055 0: folder.fold_item_name(binding0),
5056 }
5057 }
5058 Explainee::Select {
5059 0: binding0,
5060 1: binding1,
5061 } => {
5062 Explainee::Select {
5063 0: Box::new(folder.fold_select_statement(*binding0)),
5064 1: binding1,
5065 }
5066 }
5067 Explainee::CreateView {
5068 0: binding0,
5069 1: binding1,
5070 } => {
5071 Explainee::CreateView {
5072 0: Box::new(folder.fold_create_view_statement(*binding0)),
5073 1: binding1,
5074 }
5075 }
5076 Explainee::CreateMaterializedView {
5077 0: binding0,
5078 1: binding1,
5079 } => {
5080 Explainee::CreateMaterializedView {
5081 0: Box::new(folder.fold_create_materialized_view_statement(*binding0)),
5082 1: binding1,
5083 }
5084 }
5085 Explainee::CreateIndex {
5086 0: binding0,
5087 1: binding1,
5088 } => {
5089 Explainee::CreateIndex {
5090 0: Box::new(folder.fold_create_index_statement(*binding0)),
5091 1: binding1,
5092 }
5093 }
5094 Explainee::Subscribe {
5095 0: binding0,
5096 1: binding1,
5097 } => {
5098 Explainee::Subscribe {
5099 0: Box::new(folder.fold_subscribe_statement(*binding0)),
5100 1: binding1,
5101 }
5102 }
5103 }
5104}
5105impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Expr<T> {
5106 type Folded = Expr<T2>;
5107 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5108 folder.fold_expr(self)
5109 }
5110}
5111#[allow(clippy::needless_pass_by_ref_mut)]
5112pub fn fold_expr<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Expr<T>) -> Expr<T2>
5113where
5114 F: Fold<T, T2, > + ?Sized,
5115{
5116 match node {
5117 Expr::Identifier {
5118 0: binding0,
5119 } => {
5120 Expr::Identifier {
5121 0: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
5122 }
5123 }
5124 Expr::QualifiedWildcard {
5125 0: binding0,
5126 } => {
5127 Expr::QualifiedWildcard {
5128 0: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
5129 }
5130 }
5131 Expr::FieldAccess {
5132 expr: binding0,
5133 field: binding1,
5134 } => {
5135 Expr::FieldAccess {
5136 expr: Box::new(folder.fold_expr(*binding0)),
5137 field: folder.fold_ident(binding1),
5138 }
5139 }
5140 Expr::WildcardAccess {
5141 0: binding0,
5142 } => {
5143 Expr::WildcardAccess {
5144 0: Box::new(folder.fold_expr(*binding0)),
5145 }
5146 }
5147 Expr::Parameter {
5148 0: binding0,
5149 } => {
5150 Expr::Parameter {
5151 0: binding0,
5152 }
5153 }
5154 Expr::Not {
5155 expr: binding0,
5156 } => {
5157 Expr::Not {
5158 expr: Box::new(folder.fold_expr(*binding0)),
5159 }
5160 }
5161 Expr::And {
5162 left: binding0,
5163 right: binding1,
5164 } => {
5165 Expr::And {
5166 left: Box::new(folder.fold_expr(*binding0)),
5167 right: Box::new(folder.fold_expr(*binding1)),
5168 }
5169 }
5170 Expr::Or {
5171 left: binding0,
5172 right: binding1,
5173 } => {
5174 Expr::Or {
5175 left: Box::new(folder.fold_expr(*binding0)),
5176 right: Box::new(folder.fold_expr(*binding1)),
5177 }
5178 }
5179 Expr::IsExpr {
5180 expr: binding0,
5181 construct: binding1,
5182 negated: binding2,
5183 } => {
5184 Expr::IsExpr {
5185 expr: Box::new(folder.fold_expr(*binding0)),
5186 construct: folder.fold_is_expr_construct(binding1),
5187 negated: binding2,
5188 }
5189 }
5190 Expr::InList {
5191 expr: binding0,
5192 list: binding1,
5193 negated: binding2,
5194 } => {
5195 Expr::InList {
5196 expr: Box::new(folder.fold_expr(*binding0)),
5197 list: binding1.into_iter().map(|v| folder.fold_expr(v)).collect(),
5198 negated: binding2,
5199 }
5200 }
5201 Expr::InSubquery {
5202 expr: binding0,
5203 subquery: binding1,
5204 negated: binding2,
5205 } => {
5206 Expr::InSubquery {
5207 expr: Box::new(folder.fold_expr(*binding0)),
5208 subquery: Box::new(folder.fold_query(*binding1)),
5209 negated: binding2,
5210 }
5211 }
5212 Expr::Like {
5213 expr: binding0,
5214 pattern: binding1,
5215 escape: binding2,
5216 case_insensitive: binding3,
5217 negated: binding4,
5218 } => {
5219 Expr::Like {
5220 expr: Box::new(folder.fold_expr(*binding0)),
5221 pattern: Box::new(folder.fold_expr(*binding1)),
5222 escape: binding2.map(|v| Box::new(folder.fold_expr(*v))),
5223 case_insensitive: binding3,
5224 negated: binding4,
5225 }
5226 }
5227 Expr::Between {
5228 expr: binding0,
5229 negated: binding1,
5230 low: binding2,
5231 high: binding3,
5232 } => {
5233 Expr::Between {
5234 expr: Box::new(folder.fold_expr(*binding0)),
5235 negated: binding1,
5236 low: Box::new(folder.fold_expr(*binding2)),
5237 high: Box::new(folder.fold_expr(*binding3)),
5238 }
5239 }
5240 Expr::Op {
5241 op: binding0,
5242 expr1: binding1,
5243 expr2: binding2,
5244 } => {
5245 Expr::Op {
5246 op: folder.fold_op(binding0),
5247 expr1: Box::new(folder.fold_expr(*binding1)),
5248 expr2: binding2.map(|v| Box::new(folder.fold_expr(*v))),
5249 }
5250 }
5251 Expr::Cast {
5252 expr: binding0,
5253 data_type: binding1,
5254 failure_mode: binding2,
5255 } => {
5256 Expr::Cast {
5257 expr: Box::new(folder.fold_expr(*binding0)),
5258 data_type: folder.fold_data_type(binding1),
5259 failure_mode: folder.fold_cast_failure_mode(binding2),
5260 }
5261 }
5262 Expr::Collate {
5263 expr: binding0,
5264 collation: binding1,
5265 } => {
5266 Expr::Collate {
5267 expr: Box::new(folder.fold_expr(*binding0)),
5268 collation: folder.fold_unresolved_item_name(binding1),
5269 }
5270 }
5271 Expr::HomogenizingFunction {
5272 function: binding0,
5273 exprs: binding1,
5274 } => {
5275 Expr::HomogenizingFunction {
5276 function: folder.fold_homogenizing_function(binding0),
5277 exprs: binding1.into_iter().map(|v| folder.fold_expr(v)).collect(),
5278 }
5279 }
5280 Expr::NullIf {
5281 l_expr: binding0,
5282 r_expr: binding1,
5283 } => {
5284 Expr::NullIf {
5285 l_expr: Box::new(folder.fold_expr(*binding0)),
5286 r_expr: Box::new(folder.fold_expr(*binding1)),
5287 }
5288 }
5289 Expr::Nested {
5290 0: binding0,
5291 } => {
5292 Expr::Nested {
5293 0: Box::new(folder.fold_expr(*binding0)),
5294 }
5295 }
5296 Expr::Row {
5297 exprs: binding0,
5298 } => {
5299 Expr::Row {
5300 exprs: binding0.into_iter().map(|v| folder.fold_expr(v)).collect(),
5301 }
5302 }
5303 Expr::Value {
5304 0: binding0,
5305 } => {
5306 Expr::Value {
5307 0: folder.fold_value(binding0),
5308 }
5309 }
5310 Expr::Function {
5311 0: binding0,
5312 } => {
5313 Expr::Function {
5314 0: folder.fold_function(binding0),
5315 }
5316 }
5317 Expr::Case {
5318 operand: binding0,
5319 conditions: binding1,
5320 results: binding2,
5321 else_result: binding3,
5322 } => {
5323 Expr::Case {
5324 operand: binding0.map(|v| Box::new(folder.fold_expr(*v))),
5325 conditions: binding1.into_iter().map(|v| folder.fold_expr(v)).collect(),
5326 results: binding2.into_iter().map(|v| folder.fold_expr(v)).collect(),
5327 else_result: binding3.map(|v| Box::new(folder.fold_expr(*v))),
5328 }
5329 }
5330 Expr::Exists {
5331 0: binding0,
5332 } => {
5333 Expr::Exists {
5334 0: Box::new(folder.fold_query(*binding0)),
5335 }
5336 }
5337 Expr::Subquery {
5338 0: binding0,
5339 } => {
5340 Expr::Subquery {
5341 0: Box::new(folder.fold_query(*binding0)),
5342 }
5343 }
5344 Expr::AnySubquery {
5345 left: binding0,
5346 op: binding1,
5347 right: binding2,
5348 } => {
5349 Expr::AnySubquery {
5350 left: Box::new(folder.fold_expr(*binding0)),
5351 op: folder.fold_op(binding1),
5352 right: Box::new(folder.fold_query(*binding2)),
5353 }
5354 }
5355 Expr::AnyExpr {
5356 left: binding0,
5357 op: binding1,
5358 right: binding2,
5359 } => {
5360 Expr::AnyExpr {
5361 left: Box::new(folder.fold_expr(*binding0)),
5362 op: folder.fold_op(binding1),
5363 right: Box::new(folder.fold_expr(*binding2)),
5364 }
5365 }
5366 Expr::AllSubquery {
5367 left: binding0,
5368 op: binding1,
5369 right: binding2,
5370 } => {
5371 Expr::AllSubquery {
5372 left: Box::new(folder.fold_expr(*binding0)),
5373 op: folder.fold_op(binding1),
5374 right: Box::new(folder.fold_query(*binding2)),
5375 }
5376 }
5377 Expr::AllExpr {
5378 left: binding0,
5379 op: binding1,
5380 right: binding2,
5381 } => {
5382 Expr::AllExpr {
5383 left: Box::new(folder.fold_expr(*binding0)),
5384 op: folder.fold_op(binding1),
5385 right: Box::new(folder.fold_expr(*binding2)),
5386 }
5387 }
5388 Expr::Array {
5389 0: binding0,
5390 } => {
5391 Expr::Array {
5392 0: binding0.into_iter().map(|v| folder.fold_expr(v)).collect(),
5393 }
5394 }
5395 Expr::ArraySubquery {
5396 0: binding0,
5397 } => {
5398 Expr::ArraySubquery {
5399 0: Box::new(folder.fold_query(*binding0)),
5400 }
5401 }
5402 Expr::List {
5403 0: binding0,
5404 } => {
5405 Expr::List {
5406 0: binding0.into_iter().map(|v| folder.fold_expr(v)).collect(),
5407 }
5408 }
5409 Expr::ListSubquery {
5410 0: binding0,
5411 } => {
5412 Expr::ListSubquery {
5413 0: Box::new(folder.fold_query(*binding0)),
5414 }
5415 }
5416 Expr::Map {
5417 0: binding0,
5418 } => {
5419 Expr::Map {
5420 0: binding0.into_iter().map(|v| folder.fold_map_entry(v)).collect(),
5421 }
5422 }
5423 Expr::MapSubquery {
5424 0: binding0,
5425 } => {
5426 Expr::MapSubquery {
5427 0: Box::new(folder.fold_query(*binding0)),
5428 }
5429 }
5430 Expr::Subscript {
5431 expr: binding0,
5432 positions: binding1,
5433 } => {
5434 Expr::Subscript {
5435 expr: Box::new(folder.fold_expr(*binding0)),
5436 positions: binding1.into_iter().map(|v| folder.fold_subscript_position(v)).collect(),
5437 }
5438 }
5439 }
5440}
5441impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExternalReferenceExport {
5442 type Folded = ExternalReferenceExport;
5443 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5444 folder.fold_external_reference_export(self)
5445 }
5446}
5447#[allow(clippy::needless_pass_by_ref_mut)]
5448pub fn fold_external_reference_export<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExternalReferenceExport) -> ExternalReferenceExport
5449where
5450 F: Fold<T, T2, > + ?Sized,
5451{
5452 ExternalReferenceExport {
5453 reference: folder.fold_unresolved_item_name(node.reference),
5454 alias: node.alias.map(|v| folder.fold_unresolved_item_name(v)),
5455 }
5456}
5457impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ExternalReferences {
5458 type Folded = ExternalReferences;
5459 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5460 folder.fold_external_references(self)
5461 }
5462}
5463#[allow(clippy::needless_pass_by_ref_mut)]
5464pub fn fold_external_references<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ExternalReferences) -> ExternalReferences
5465where
5466 F: Fold<T, T2, > + ?Sized,
5467{
5468 match node {
5469 ExternalReferences::SubsetTables {
5470 0: binding0,
5471 } => {
5472 ExternalReferences::SubsetTables {
5473 0: binding0.into_iter().map(|v| folder.fold_external_reference_export(v)).collect(),
5474 }
5475 }
5476 ExternalReferences::SubsetSchemas {
5477 0: binding0,
5478 } => {
5479 ExternalReferences::SubsetSchemas {
5480 0: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
5481 }
5482 }
5483 ExternalReferences::All {
5484 } => {
5485 ExternalReferences::All {
5486 }
5487 }
5488 }
5489}
5490impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for FetchDirection {
5491 type Folded = FetchDirection;
5492 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5493 folder.fold_fetch_direction(self)
5494 }
5495}
5496#[allow(clippy::needless_pass_by_ref_mut)]
5497pub fn fold_fetch_direction<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: FetchDirection) -> FetchDirection
5498where
5499 F: Fold<T, T2, > + ?Sized,
5500{
5501 match node {
5502 FetchDirection::ForwardAll {
5503 } => {
5504 FetchDirection::ForwardAll {
5505 }
5506 }
5507 FetchDirection::ForwardCount {
5508 0: binding0,
5509 } => {
5510 FetchDirection::ForwardCount {
5511 0: binding0,
5512 }
5513 }
5514 }
5515}
5516impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for FetchOption<T> {
5517 type Folded = FetchOption<T2>;
5518 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5519 folder.fold_fetch_option(self)
5520 }
5521}
5522#[allow(clippy::needless_pass_by_ref_mut)]
5523pub fn fold_fetch_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: FetchOption<T>) -> FetchOption<T2>
5524where
5525 F: Fold<T, T2, > + ?Sized,
5526{
5527 FetchOption {
5528 name: folder.fold_fetch_option_name(node.name),
5529 value: node.value.map(|v| folder.fold_with_option_value(v)),
5530 }
5531}
5532impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for FetchOptionName {
5533 type Folded = FetchOptionName;
5534 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5535 folder.fold_fetch_option_name(self)
5536 }
5537}
5538#[allow(clippy::needless_pass_by_ref_mut)]
5539pub fn fold_fetch_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: FetchOptionName) -> FetchOptionName
5540where
5541 F: Fold<T, T2, > + ?Sized,
5542{
5543 match node {
5544 FetchOptionName::Timeout {
5545 } => {
5546 FetchOptionName::Timeout {
5547 }
5548 }
5549 }
5550}
5551impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for FetchStatement<T> {
5552 type Folded = FetchStatement<T2>;
5553 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5554 folder.fold_fetch_statement(self)
5555 }
5556}
5557#[allow(clippy::needless_pass_by_ref_mut)]
5558pub fn fold_fetch_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: FetchStatement<T>) -> FetchStatement<T2>
5559where
5560 F: Fold<T, T2, > + ?Sized,
5561{
5562 FetchStatement {
5563 name: folder.fold_ident(node.name),
5564 count: node.count.map(|v| folder.fold_fetch_direction(v)),
5565 options: node.options.into_iter().map(|v| folder.fold_fetch_option(v)).collect(),
5566 }
5567}
5568impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Format<T> {
5569 type Folded = Format<T2>;
5570 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5571 folder.fold_format(self)
5572 }
5573}
5574#[allow(clippy::needless_pass_by_ref_mut)]
5575pub fn fold_format<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Format<T>) -> Format<T2>
5576where
5577 F: Fold<T, T2, > + ?Sized,
5578{
5579 match node {
5580 Format::Bytes {
5581 } => {
5582 Format::Bytes {
5583 }
5584 }
5585 Format::Avro {
5586 0: binding0,
5587 } => {
5588 Format::Avro {
5589 0: folder.fold_avro_schema(binding0),
5590 }
5591 }
5592 Format::Protobuf {
5593 0: binding0,
5594 } => {
5595 Format::Protobuf {
5596 0: folder.fold_protobuf_schema(binding0),
5597 }
5598 }
5599 Format::Regex {
5600 0: binding0,
5601 } => {
5602 Format::Regex {
5603 0: binding0,
5604 }
5605 }
5606 Format::Csv {
5607 columns: binding0,
5608 delimiter: binding1,
5609 } => {
5610 Format::Csv {
5611 columns: folder.fold_csv_columns(binding0),
5612 delimiter: binding1,
5613 }
5614 }
5615 Format::Json {
5616 array: binding0,
5617 } => {
5618 Format::Json {
5619 array: binding0,
5620 }
5621 }
5622 Format::Text {
5623 } => {
5624 Format::Text {
5625 }
5626 }
5627 }
5628}
5629impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for FormatSpecifier<T> {
5630 type Folded = FormatSpecifier<T2>;
5631 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5632 folder.fold_format_specifier(self)
5633 }
5634}
5635#[allow(clippy::needless_pass_by_ref_mut)]
5636pub fn fold_format_specifier<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: FormatSpecifier<T>) -> FormatSpecifier<T2>
5637where
5638 F: Fold<T, T2, > + ?Sized,
5639{
5640 match node {
5641 FormatSpecifier::Bare {
5642 0: binding0,
5643 } => {
5644 FormatSpecifier::Bare {
5645 0: folder.fold_format(binding0),
5646 }
5647 }
5648 FormatSpecifier::KeyValue {
5649 key: binding0,
5650 value: binding1,
5651 } => {
5652 FormatSpecifier::KeyValue {
5653 key: folder.fold_format(binding0),
5654 value: folder.fold_format(binding1),
5655 }
5656 }
5657 }
5658}
5659impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Function<T> {
5660 type Folded = Function<T2>;
5661 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5662 folder.fold_function(self)
5663 }
5664}
5665#[allow(clippy::needless_pass_by_ref_mut)]
5666pub fn fold_function<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Function<T>) -> Function<T2>
5667where
5668 F: Fold<T, T2, > + ?Sized,
5669{
5670 Function {
5671 name: folder.fold_item_name(node.name),
5672 args: folder.fold_function_args(node.args),
5673 filter: node.filter.map(|v| Box::new(folder.fold_expr(*v))),
5674 over: node.over.map(|v| folder.fold_window_spec(v)),
5675 distinct: node.distinct,
5676 }
5677}
5678impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for FunctionArgs<T> {
5679 type Folded = FunctionArgs<T2>;
5680 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5681 folder.fold_function_args(self)
5682 }
5683}
5684#[allow(clippy::needless_pass_by_ref_mut)]
5685pub fn fold_function_args<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: FunctionArgs<T>) -> FunctionArgs<T2>
5686where
5687 F: Fold<T, T2, > + ?Sized,
5688{
5689 match node {
5690 FunctionArgs::Star {
5691 } => {
5692 FunctionArgs::Star {
5693 }
5694 }
5695 FunctionArgs::Args {
5696 args: binding0,
5697 order_by: binding1,
5698 } => {
5699 FunctionArgs::Args {
5700 args: binding0.into_iter().map(|v| folder.fold_expr(v)).collect(),
5701 order_by: binding1.into_iter().map(|v| folder.fold_order_by_expr(v)).collect(),
5702 }
5703 }
5704 }
5705}
5706impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GlueAvroOption<T> {
5707 type Folded = GlueAvroOption<T2>;
5708 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5709 folder.fold_glue_avro_option(self)
5710 }
5711}
5712#[allow(clippy::needless_pass_by_ref_mut)]
5713pub fn fold_glue_avro_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GlueAvroOption<T>) -> GlueAvroOption<T2>
5714where
5715 F: Fold<T, T2, > + ?Sized,
5716{
5717 GlueAvroOption {
5718 name: folder.fold_glue_avro_option_name(node.name),
5719 value: node.value.map(|v| folder.fold_with_option_value(v)),
5720 }
5721}
5722impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GlueAvroOptionName {
5723 type Folded = GlueAvroOptionName;
5724 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5725 folder.fold_glue_avro_option_name(self)
5726 }
5727}
5728#[allow(clippy::needless_pass_by_ref_mut)]
5729pub fn fold_glue_avro_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GlueAvroOptionName) -> GlueAvroOptionName
5730where
5731 F: Fold<T, T2, > + ?Sized,
5732{
5733 match node {
5734 GlueAvroOptionName::SchemaName {
5735 } => {
5736 GlueAvroOptionName::SchemaName {
5737 }
5738 }
5739 GlueAvroOptionName::KeySchemaName {
5740 } => {
5741 GlueAvroOptionName::KeySchemaName {
5742 }
5743 }
5744 GlueAvroOptionName::ValueSchemaName {
5745 } => {
5746 GlueAvroOptionName::ValueSchemaName {
5747 }
5748 }
5749 GlueAvroOptionName::KeyCompatibilityLevel {
5750 } => {
5751 GlueAvroOptionName::KeyCompatibilityLevel {
5752 }
5753 }
5754 GlueAvroOptionName::ValueCompatibilityLevel {
5755 } => {
5756 GlueAvroOptionName::ValueCompatibilityLevel {
5757 }
5758 }
5759 }
5760}
5761impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GlueAvroSeed {
5762 type Folded = GlueAvroSeed;
5763 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5764 folder.fold_glue_avro_seed(self)
5765 }
5766}
5767#[allow(clippy::needless_pass_by_ref_mut)]
5768pub fn fold_glue_avro_seed<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GlueAvroSeed) -> GlueAvroSeed
5769where
5770 F: Fold<T, T2, > + ?Sized,
5771{
5772 GlueAvroSeed {
5773 value_schema: node.value_schema,
5774 }
5775}
5776impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GrantPrivilegesStatement<T> {
5777 type Folded = GrantPrivilegesStatement<T2>;
5778 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5779 folder.fold_grant_privileges_statement(self)
5780 }
5781}
5782#[allow(clippy::needless_pass_by_ref_mut)]
5783pub fn fold_grant_privileges_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GrantPrivilegesStatement<T>) -> GrantPrivilegesStatement<T2>
5784where
5785 F: Fold<T, T2, > + ?Sized,
5786{
5787 GrantPrivilegesStatement {
5788 privileges: folder.fold_privilege_specification(node.privileges),
5789 target: folder.fold_grant_target_specification(node.target),
5790 roles: node.roles.into_iter().map(|v| folder.fold_role_name(v)).collect(),
5791 }
5792}
5793impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GrantRoleStatement<T> {
5794 type Folded = GrantRoleStatement<T2>;
5795 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5796 folder.fold_grant_role_statement(self)
5797 }
5798}
5799#[allow(clippy::needless_pass_by_ref_mut)]
5800pub fn fold_grant_role_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GrantRoleStatement<T>) -> GrantRoleStatement<T2>
5801where
5802 F: Fold<T, T2, > + ?Sized,
5803{
5804 GrantRoleStatement {
5805 role_names: node.role_names.into_iter().map(|v| folder.fold_role_name(v)).collect(),
5806 member_names: node.member_names.into_iter().map(|v| folder.fold_role_name(v)).collect(),
5807 }
5808}
5809impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GrantTargetAllSpecification<T> {
5810 type Folded = GrantTargetAllSpecification<T2>;
5811 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5812 folder.fold_grant_target_all_specification(self)
5813 }
5814}
5815#[allow(clippy::needless_pass_by_ref_mut)]
5816pub fn fold_grant_target_all_specification<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GrantTargetAllSpecification<T>) -> GrantTargetAllSpecification<T2>
5817where
5818 F: Fold<T, T2, > + ?Sized,
5819{
5820 match node {
5821 GrantTargetAllSpecification::All {
5822 } => {
5823 GrantTargetAllSpecification::All {
5824 }
5825 }
5826 GrantTargetAllSpecification::AllDatabases {
5827 databases: binding0,
5828 } => {
5829 GrantTargetAllSpecification::AllDatabases {
5830 databases: binding0.into_iter().map(|v| folder.fold_database_name(v)).collect(),
5831 }
5832 }
5833 GrantTargetAllSpecification::AllSchemas {
5834 schemas: binding0,
5835 } => {
5836 GrantTargetAllSpecification::AllSchemas {
5837 schemas: binding0.into_iter().map(|v| folder.fold_schema_name(v)).collect(),
5838 }
5839 }
5840 }
5841}
5842impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GrantTargetSpecification<T> {
5843 type Folded = GrantTargetSpecification<T2>;
5844 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5845 folder.fold_grant_target_specification(self)
5846 }
5847}
5848#[allow(clippy::needless_pass_by_ref_mut)]
5849pub fn fold_grant_target_specification<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GrantTargetSpecification<T>) -> GrantTargetSpecification<T2>
5850where
5851 F: Fold<T, T2, > + ?Sized,
5852{
5853 match node {
5854 GrantTargetSpecification::Object {
5855 object_type: binding0,
5856 object_spec_inner: binding1,
5857 } => {
5858 GrantTargetSpecification::Object {
5859 object_type: folder.fold_object_type(binding0),
5860 object_spec_inner: folder.fold_grant_target_specification_inner(binding1),
5861 }
5862 }
5863 GrantTargetSpecification::System {
5864 } => {
5865 GrantTargetSpecification::System {
5866 }
5867 }
5868 }
5869}
5870impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for GrantTargetSpecificationInner<T> {
5871 type Folded = GrantTargetSpecificationInner<T2>;
5872 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5873 folder.fold_grant_target_specification_inner(self)
5874 }
5875}
5876#[allow(clippy::needless_pass_by_ref_mut)]
5877pub fn fold_grant_target_specification_inner<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: GrantTargetSpecificationInner<T>) -> GrantTargetSpecificationInner<T2>
5878where
5879 F: Fold<T, T2, > + ?Sized,
5880{
5881 match node {
5882 GrantTargetSpecificationInner::All {
5883 0: binding0,
5884 } => {
5885 GrantTargetSpecificationInner::All {
5886 0: folder.fold_grant_target_all_specification(binding0),
5887 }
5888 }
5889 GrantTargetSpecificationInner::Objects {
5890 names: binding0,
5891 } => {
5892 GrantTargetSpecificationInner::Objects {
5893 names: binding0.into_iter().map(|v| folder.fold_object_name(v)).collect(),
5894 }
5895 }
5896 }
5897}
5898impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for HomogenizingFunction {
5899 type Folded = HomogenizingFunction;
5900 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5901 folder.fold_homogenizing_function(self)
5902 }
5903}
5904#[allow(clippy::needless_pass_by_ref_mut)]
5905pub fn fold_homogenizing_function<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: HomogenizingFunction) -> HomogenizingFunction
5906where
5907 F: Fold<T, T2, > + ?Sized,
5908{
5909 match node {
5910 HomogenizingFunction::Coalesce {
5911 } => {
5912 HomogenizingFunction::Coalesce {
5913 }
5914 }
5915 HomogenizingFunction::Greatest {
5916 } => {
5917 HomogenizingFunction::Greatest {
5918 }
5919 }
5920 HomogenizingFunction::Least {
5921 } => {
5922 HomogenizingFunction::Least {
5923 }
5924 }
5925 }
5926}
5927impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IcebergSinkConfigOption<T> {
5928 type Folded = IcebergSinkConfigOption<T2>;
5929 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5930 folder.fold_iceberg_sink_config_option(self)
5931 }
5932}
5933#[allow(clippy::needless_pass_by_ref_mut)]
5934pub fn fold_iceberg_sink_config_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IcebergSinkConfigOption<T>) -> IcebergSinkConfigOption<T2>
5935where
5936 F: Fold<T, T2, > + ?Sized,
5937{
5938 IcebergSinkConfigOption {
5939 name: folder.fold_iceberg_sink_config_option_name(node.name),
5940 value: node.value.map(|v| folder.fold_with_option_value(v)),
5941 }
5942}
5943impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IcebergSinkConfigOptionName {
5944 type Folded = IcebergSinkConfigOptionName;
5945 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5946 folder.fold_iceberg_sink_config_option_name(self)
5947 }
5948}
5949#[allow(clippy::needless_pass_by_ref_mut)]
5950pub fn fold_iceberg_sink_config_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IcebergSinkConfigOptionName) -> IcebergSinkConfigOptionName
5951where
5952 F: Fold<T, T2, > + ?Sized,
5953{
5954 match node {
5955 IcebergSinkConfigOptionName::Namespace {
5956 } => {
5957 IcebergSinkConfigOptionName::Namespace {
5958 }
5959 }
5960 IcebergSinkConfigOptionName::Table {
5961 } => {
5962 IcebergSinkConfigOptionName::Table {
5963 }
5964 }
5965 }
5966}
5967impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IcebergSinkMode {
5968 type Folded = IcebergSinkMode;
5969 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5970 folder.fold_iceberg_sink_mode(self)
5971 }
5972}
5973#[allow(clippy::needless_pass_by_ref_mut)]
5974pub fn fold_iceberg_sink_mode<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IcebergSinkMode) -> IcebergSinkMode
5975where
5976 F: Fold<T, T2, > + ?Sized,
5977{
5978 match node {
5979 IcebergSinkMode::Upsert {
5980 } => {
5981 IcebergSinkMode::Upsert {
5982 }
5983 }
5984 IcebergSinkMode::Append {
5985 } => {
5986 IcebergSinkMode::Append {
5987 }
5988 }
5989 }
5990}
5991impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Ident {
5992 type Folded = Ident;
5993 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
5994 folder.fold_ident(self)
5995 }
5996}
5997#[allow(clippy::needless_pass_by_ref_mut)]
5998pub fn fold_ident<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Ident) -> Ident
5999where
6000 F: Fold<T, T2, > + ?Sized,
6001{
6002 Ident {
6003 0: node.0,
6004 }
6005}
6006impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IdentError {
6007 type Folded = IdentError;
6008 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6009 folder.fold_ident_error(self)
6010 }
6011}
6012#[allow(clippy::needless_pass_by_ref_mut)]
6013pub fn fold_ident_error<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IdentError) -> IdentError
6014where
6015 F: Fold<T, T2, > + ?Sized,
6016{
6017 match node {
6018 IdentError::TooLong {
6019 0: binding0,
6020 } => {
6021 IdentError::TooLong {
6022 0: binding0,
6023 }
6024 }
6025 IdentError::FailedToGenerate {
6026 prefix: binding0,
6027 suffix: binding1,
6028 attempts: binding2,
6029 } => {
6030 IdentError::FailedToGenerate {
6031 prefix: binding0,
6032 suffix: binding1,
6033 attempts: binding2,
6034 }
6035 }
6036 IdentError::Invalid {
6037 0: binding0,
6038 } => {
6039 IdentError::Invalid {
6040 0: binding0,
6041 }
6042 }
6043 }
6044}
6045impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IfExistsBehavior {
6046 type Folded = IfExistsBehavior;
6047 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6048 folder.fold_if_exists_behavior(self)
6049 }
6050}
6051#[allow(clippy::needless_pass_by_ref_mut)]
6052pub fn fold_if_exists_behavior<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IfExistsBehavior) -> IfExistsBehavior
6053where
6054 F: Fold<T, T2, > + ?Sized,
6055{
6056 match node {
6057 IfExistsBehavior::Error {
6058 } => {
6059 IfExistsBehavior::Error {
6060 }
6061 }
6062 IfExistsBehavior::Skip {
6063 } => {
6064 IfExistsBehavior::Skip {
6065 }
6066 }
6067 IfExistsBehavior::Replace {
6068 } => {
6069 IfExistsBehavior::Replace {
6070 }
6071 }
6072 }
6073}
6074impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IndexOption<T> {
6075 type Folded = IndexOption<T2>;
6076 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6077 folder.fold_index_option(self)
6078 }
6079}
6080#[allow(clippy::needless_pass_by_ref_mut)]
6081pub fn fold_index_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IndexOption<T>) -> IndexOption<T2>
6082where
6083 F: Fold<T, T2, > + ?Sized,
6084{
6085 IndexOption {
6086 name: folder.fold_index_option_name(node.name),
6087 value: node.value.map(|v| folder.fold_with_option_value(v)),
6088 }
6089}
6090impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IndexOptionName {
6091 type Folded = IndexOptionName;
6092 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6093 folder.fold_index_option_name(self)
6094 }
6095}
6096#[allow(clippy::needless_pass_by_ref_mut)]
6097pub fn fold_index_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IndexOptionName) -> IndexOptionName
6098where
6099 F: Fold<T, T2, > + ?Sized,
6100{
6101 match node {
6102 IndexOptionName::RetainHistory {
6103 } => {
6104 IndexOptionName::RetainHistory {
6105 }
6106 }
6107 }
6108}
6109impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for InsertSource<T> {
6110 type Folded = InsertSource<T2>;
6111 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6112 folder.fold_insert_source(self)
6113 }
6114}
6115#[allow(clippy::needless_pass_by_ref_mut)]
6116pub fn fold_insert_source<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: InsertSource<T>) -> InsertSource<T2>
6117where
6118 F: Fold<T, T2, > + ?Sized,
6119{
6120 match node {
6121 InsertSource::Query {
6122 0: binding0,
6123 } => {
6124 InsertSource::Query {
6125 0: folder.fold_query(binding0),
6126 }
6127 }
6128 InsertSource::DefaultValues {
6129 } => {
6130 InsertSource::DefaultValues {
6131 }
6132 }
6133 }
6134}
6135impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for InsertStatement<T> {
6136 type Folded = InsertStatement<T2>;
6137 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6138 folder.fold_insert_statement(self)
6139 }
6140}
6141#[allow(clippy::needless_pass_by_ref_mut)]
6142pub fn fold_insert_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: InsertStatement<T>) -> InsertStatement<T2>
6143where
6144 F: Fold<T, T2, > + ?Sized,
6145{
6146 InsertStatement {
6147 table_name: folder.fold_item_name(node.table_name),
6148 columns: node.columns.into_iter().map(|v| folder.fold_ident(v)).collect(),
6149 source: folder.fold_insert_source(node.source),
6150 returning: node.returning.into_iter().map(|v| folder.fold_select_item(v)).collect(),
6151 }
6152}
6153impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for InspectShardStatement {
6154 type Folded = InspectShardStatement;
6155 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6156 folder.fold_inspect_shard_statement(self)
6157 }
6158}
6159#[allow(clippy::needless_pass_by_ref_mut)]
6160pub fn fold_inspect_shard_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: InspectShardStatement) -> InspectShardStatement
6161where
6162 F: Fold<T, T2, > + ?Sized,
6163{
6164 InspectShardStatement {
6165 id: node.id,
6166 }
6167}
6168impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IntervalValue {
6169 type Folded = IntervalValue;
6170 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6171 folder.fold_interval_value(self)
6172 }
6173}
6174#[allow(clippy::needless_pass_by_ref_mut)]
6175pub fn fold_interval_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IntervalValue) -> IntervalValue
6176where
6177 F: Fold<T, T2, > + ?Sized,
6178{
6179 IntervalValue {
6180 value: node.value,
6181 precision_high: folder.fold_date_time_field(node.precision_high),
6182 precision_low: folder.fold_date_time_field(node.precision_low),
6183 fsec_max_precision: node.fsec_max_precision.map(|v| v),
6184 }
6185}
6186impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for IsExprConstruct<T> {
6187 type Folded = IsExprConstruct<T2>;
6188 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6189 folder.fold_is_expr_construct(self)
6190 }
6191}
6192#[allow(clippy::needless_pass_by_ref_mut)]
6193pub fn fold_is_expr_construct<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: IsExprConstruct<T>) -> IsExprConstruct<T2>
6194where
6195 F: Fold<T, T2, > + ?Sized,
6196{
6197 match node {
6198 IsExprConstruct::Null {
6199 } => {
6200 IsExprConstruct::Null {
6201 }
6202 }
6203 IsExprConstruct::True {
6204 } => {
6205 IsExprConstruct::True {
6206 }
6207 }
6208 IsExprConstruct::False {
6209 } => {
6210 IsExprConstruct::False {
6211 }
6212 }
6213 IsExprConstruct::Unknown {
6214 } => {
6215 IsExprConstruct::Unknown {
6216 }
6217 }
6218 IsExprConstruct::DistinctFrom {
6219 0: binding0,
6220 } => {
6221 IsExprConstruct::DistinctFrom {
6222 0: Box::new(folder.fold_expr(*binding0)),
6223 }
6224 }
6225 }
6226}
6227impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Join<T> {
6228 type Folded = Join<T2>;
6229 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6230 folder.fold_join(self)
6231 }
6232}
6233#[allow(clippy::needless_pass_by_ref_mut)]
6234pub fn fold_join<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Join<T>) -> Join<T2>
6235where
6236 F: Fold<T, T2, > + ?Sized,
6237{
6238 Join {
6239 relation: folder.fold_table_factor(node.relation),
6240 join_operator: folder.fold_join_operator(node.join_operator),
6241 }
6242}
6243impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for JoinConstraint<T> {
6244 type Folded = JoinConstraint<T2>;
6245 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6246 folder.fold_join_constraint(self)
6247 }
6248}
6249#[allow(clippy::needless_pass_by_ref_mut)]
6250pub fn fold_join_constraint<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: JoinConstraint<T>) -> JoinConstraint<T2>
6251where
6252 F: Fold<T, T2, > + ?Sized,
6253{
6254 match node {
6255 JoinConstraint::On {
6256 0: binding0,
6257 } => {
6258 JoinConstraint::On {
6259 0: folder.fold_expr(binding0),
6260 }
6261 }
6262 JoinConstraint::Using {
6263 columns: binding0,
6264 alias: binding1,
6265 } => {
6266 JoinConstraint::Using {
6267 columns: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
6268 alias: binding1.map(|v| folder.fold_ident(v)),
6269 }
6270 }
6271 JoinConstraint::Natural {
6272 } => {
6273 JoinConstraint::Natural {
6274 }
6275 }
6276 }
6277}
6278impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for JoinOperator<T> {
6279 type Folded = JoinOperator<T2>;
6280 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6281 folder.fold_join_operator(self)
6282 }
6283}
6284#[allow(clippy::needless_pass_by_ref_mut)]
6285pub fn fold_join_operator<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: JoinOperator<T>) -> JoinOperator<T2>
6286where
6287 F: Fold<T, T2, > + ?Sized,
6288{
6289 match node {
6290 JoinOperator::Inner {
6291 0: binding0,
6292 } => {
6293 JoinOperator::Inner {
6294 0: folder.fold_join_constraint(binding0),
6295 }
6296 }
6297 JoinOperator::LeftOuter {
6298 0: binding0,
6299 } => {
6300 JoinOperator::LeftOuter {
6301 0: folder.fold_join_constraint(binding0),
6302 }
6303 }
6304 JoinOperator::RightOuter {
6305 0: binding0,
6306 } => {
6307 JoinOperator::RightOuter {
6308 0: folder.fold_join_constraint(binding0),
6309 }
6310 }
6311 JoinOperator::FullOuter {
6312 0: binding0,
6313 } => {
6314 JoinOperator::FullOuter {
6315 0: folder.fold_join_constraint(binding0),
6316 }
6317 }
6318 JoinOperator::CrossJoin {
6319 } => {
6320 JoinOperator::CrossJoin {
6321 }
6322 }
6323 }
6324}
6325impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaBroker<T> {
6326 type Folded = KafkaBroker<T2>;
6327 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6328 folder.fold_kafka_broker(self)
6329 }
6330}
6331#[allow(clippy::needless_pass_by_ref_mut)]
6332pub fn fold_kafka_broker<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaBroker<T>) -> KafkaBroker<T2>
6333where
6334 F: Fold<T, T2, > + ?Sized,
6335{
6336 KafkaBroker {
6337 address: node.address,
6338 tunnel: folder.fold_kafka_broker_tunnel(node.tunnel),
6339 }
6340}
6341impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaBrokerAwsPrivatelink<T> {
6342 type Folded = KafkaBrokerAwsPrivatelink<T2>;
6343 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6344 folder.fold_kafka_broker_aws_privatelink(self)
6345 }
6346}
6347#[allow(clippy::needless_pass_by_ref_mut)]
6348pub fn fold_kafka_broker_aws_privatelink<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaBrokerAwsPrivatelink<T>) -> KafkaBrokerAwsPrivatelink<T2>
6349where
6350 F: Fold<T, T2, > + ?Sized,
6351{
6352 KafkaBrokerAwsPrivatelink {
6353 connection: folder.fold_item_name(node.connection),
6354 options: node.options.into_iter().map(|v| folder.fold_kafka_broker_aws_privatelink_option(v)).collect(),
6355 }
6356}
6357impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaBrokerAwsPrivatelinkOption<T> {
6358 type Folded = KafkaBrokerAwsPrivatelinkOption<T2>;
6359 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6360 folder.fold_kafka_broker_aws_privatelink_option(self)
6361 }
6362}
6363#[allow(clippy::needless_pass_by_ref_mut)]
6364pub fn fold_kafka_broker_aws_privatelink_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaBrokerAwsPrivatelinkOption<T>) -> KafkaBrokerAwsPrivatelinkOption<T2>
6365where
6366 F: Fold<T, T2, > + ?Sized,
6367{
6368 KafkaBrokerAwsPrivatelinkOption {
6369 name: folder.fold_kafka_broker_aws_privatelink_option_name(node.name),
6370 value: node.value.map(|v| folder.fold_with_option_value(v)),
6371 }
6372}
6373impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaBrokerAwsPrivatelinkOptionName {
6374 type Folded = KafkaBrokerAwsPrivatelinkOptionName;
6375 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6376 folder.fold_kafka_broker_aws_privatelink_option_name(self)
6377 }
6378}
6379#[allow(clippy::needless_pass_by_ref_mut)]
6380pub fn fold_kafka_broker_aws_privatelink_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaBrokerAwsPrivatelinkOptionName) -> KafkaBrokerAwsPrivatelinkOptionName
6381where
6382 F: Fold<T, T2, > + ?Sized,
6383{
6384 match node {
6385 KafkaBrokerAwsPrivatelinkOptionName::AvailabilityZone {
6386 } => {
6387 KafkaBrokerAwsPrivatelinkOptionName::AvailabilityZone {
6388 }
6389 }
6390 KafkaBrokerAwsPrivatelinkOptionName::Port {
6391 } => {
6392 KafkaBrokerAwsPrivatelinkOptionName::Port {
6393 }
6394 }
6395 }
6396}
6397impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaBrokerTunnel<T> {
6398 type Folded = KafkaBrokerTunnel<T2>;
6399 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6400 folder.fold_kafka_broker_tunnel(self)
6401 }
6402}
6403#[allow(clippy::needless_pass_by_ref_mut)]
6404pub fn fold_kafka_broker_tunnel<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaBrokerTunnel<T>) -> KafkaBrokerTunnel<T2>
6405where
6406 F: Fold<T, T2, > + ?Sized,
6407{
6408 match node {
6409 KafkaBrokerTunnel::Direct {
6410 } => {
6411 KafkaBrokerTunnel::Direct {
6412 }
6413 }
6414 KafkaBrokerTunnel::AwsPrivatelink {
6415 0: binding0,
6416 } => {
6417 KafkaBrokerTunnel::AwsPrivatelink {
6418 0: folder.fold_kafka_broker_aws_privatelink(binding0),
6419 }
6420 }
6421 KafkaBrokerTunnel::SshTunnel {
6422 0: binding0,
6423 } => {
6424 KafkaBrokerTunnel::SshTunnel {
6425 0: folder.fold_item_name(binding0),
6426 }
6427 }
6428 }
6429}
6430impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaMatchingBrokerRule<T> {
6431 type Folded = KafkaMatchingBrokerRule<T2>;
6432 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6433 folder.fold_kafka_matching_broker_rule(self)
6434 }
6435}
6436#[allow(clippy::needless_pass_by_ref_mut)]
6437pub fn fold_kafka_matching_broker_rule<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaMatchingBrokerRule<T>) -> KafkaMatchingBrokerRule<T2>
6438where
6439 F: Fold<T, T2, > + ?Sized,
6440{
6441 KafkaMatchingBrokerRule {
6442 pattern: folder.fold_connection_rule_pattern(node.pattern),
6443 tunnel: folder.fold_kafka_broker_aws_privatelink(node.tunnel),
6444 }
6445}
6446impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaSinkConfigOption<T> {
6447 type Folded = KafkaSinkConfigOption<T2>;
6448 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6449 folder.fold_kafka_sink_config_option(self)
6450 }
6451}
6452#[allow(clippy::needless_pass_by_ref_mut)]
6453pub fn fold_kafka_sink_config_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaSinkConfigOption<T>) -> KafkaSinkConfigOption<T2>
6454where
6455 F: Fold<T, T2, > + ?Sized,
6456{
6457 KafkaSinkConfigOption {
6458 name: folder.fold_kafka_sink_config_option_name(node.name),
6459 value: node.value.map(|v| folder.fold_with_option_value(v)),
6460 }
6461}
6462impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaSinkConfigOptionName {
6463 type Folded = KafkaSinkConfigOptionName;
6464 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6465 folder.fold_kafka_sink_config_option_name(self)
6466 }
6467}
6468#[allow(clippy::needless_pass_by_ref_mut)]
6469pub fn fold_kafka_sink_config_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaSinkConfigOptionName) -> KafkaSinkConfigOptionName
6470where
6471 F: Fold<T, T2, > + ?Sized,
6472{
6473 match node {
6474 KafkaSinkConfigOptionName::CompressionType {
6475 } => {
6476 KafkaSinkConfigOptionName::CompressionType {
6477 }
6478 }
6479 KafkaSinkConfigOptionName::PartitionBy {
6480 } => {
6481 KafkaSinkConfigOptionName::PartitionBy {
6482 }
6483 }
6484 KafkaSinkConfigOptionName::ProgressGroupIdPrefix {
6485 } => {
6486 KafkaSinkConfigOptionName::ProgressGroupIdPrefix {
6487 }
6488 }
6489 KafkaSinkConfigOptionName::Topic {
6490 } => {
6491 KafkaSinkConfigOptionName::Topic {
6492 }
6493 }
6494 KafkaSinkConfigOptionName::TransactionalIdPrefix {
6495 } => {
6496 KafkaSinkConfigOptionName::TransactionalIdPrefix {
6497 }
6498 }
6499 KafkaSinkConfigOptionName::LegacyIds {
6500 } => {
6501 KafkaSinkConfigOptionName::LegacyIds {
6502 }
6503 }
6504 KafkaSinkConfigOptionName::TopicConfig {
6505 } => {
6506 KafkaSinkConfigOptionName::TopicConfig {
6507 }
6508 }
6509 KafkaSinkConfigOptionName::TopicMetadataRefreshInterval {
6510 } => {
6511 KafkaSinkConfigOptionName::TopicMetadataRefreshInterval {
6512 }
6513 }
6514 KafkaSinkConfigOptionName::TopicPartitionCount {
6515 } => {
6516 KafkaSinkConfigOptionName::TopicPartitionCount {
6517 }
6518 }
6519 KafkaSinkConfigOptionName::TopicReplicationFactor {
6520 } => {
6521 KafkaSinkConfigOptionName::TopicReplicationFactor {
6522 }
6523 }
6524 }
6525}
6526impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaSourceConfigOption<T> {
6527 type Folded = KafkaSourceConfigOption<T2>;
6528 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6529 folder.fold_kafka_source_config_option(self)
6530 }
6531}
6532#[allow(clippy::needless_pass_by_ref_mut)]
6533pub fn fold_kafka_source_config_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaSourceConfigOption<T>) -> KafkaSourceConfigOption<T2>
6534where
6535 F: Fold<T, T2, > + ?Sized,
6536{
6537 KafkaSourceConfigOption {
6538 name: folder.fold_kafka_source_config_option_name(node.name),
6539 value: node.value.map(|v| folder.fold_with_option_value(v)),
6540 }
6541}
6542impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KafkaSourceConfigOptionName {
6543 type Folded = KafkaSourceConfigOptionName;
6544 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6545 folder.fold_kafka_source_config_option_name(self)
6546 }
6547}
6548#[allow(clippy::needless_pass_by_ref_mut)]
6549pub fn fold_kafka_source_config_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KafkaSourceConfigOptionName) -> KafkaSourceConfigOptionName
6550where
6551 F: Fold<T, T2, > + ?Sized,
6552{
6553 match node {
6554 KafkaSourceConfigOptionName::GroupIdPrefix {
6555 } => {
6556 KafkaSourceConfigOptionName::GroupIdPrefix {
6557 }
6558 }
6559 KafkaSourceConfigOptionName::Topic {
6560 } => {
6561 KafkaSourceConfigOptionName::Topic {
6562 }
6563 }
6564 KafkaSourceConfigOptionName::TopicMetadataRefreshInterval {
6565 } => {
6566 KafkaSourceConfigOptionName::TopicMetadataRefreshInterval {
6567 }
6568 }
6569 KafkaSourceConfigOptionName::StartTimestamp {
6570 } => {
6571 KafkaSourceConfigOptionName::StartTimestamp {
6572 }
6573 }
6574 KafkaSourceConfigOptionName::StartOffset {
6575 } => {
6576 KafkaSourceConfigOptionName::StartOffset {
6577 }
6578 }
6579 }
6580}
6581impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for KeyConstraint {
6582 type Folded = KeyConstraint;
6583 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6584 folder.fold_key_constraint(self)
6585 }
6586}
6587#[allow(clippy::needless_pass_by_ref_mut)]
6588pub fn fold_key_constraint<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: KeyConstraint) -> KeyConstraint
6589where
6590 F: Fold<T, T2, > + ?Sized,
6591{
6592 match node {
6593 KeyConstraint::PrimaryKeyNotEnforced {
6594 columns: binding0,
6595 } => {
6596 KeyConstraint::PrimaryKeyNotEnforced {
6597 columns: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
6598 }
6599 }
6600 }
6601}
6602impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Limit<T> {
6603 type Folded = Limit<T2>;
6604 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6605 folder.fold_limit(self)
6606 }
6607}
6608#[allow(clippy::needless_pass_by_ref_mut)]
6609pub fn fold_limit<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Limit<T>) -> Limit<T2>
6610where
6611 F: Fold<T, T2, > + ?Sized,
6612{
6613 Limit {
6614 with_ties: node.with_ties,
6615 quantity: folder.fold_expr(node.quantity),
6616 }
6617}
6618impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for LoadGenerator {
6619 type Folded = LoadGenerator;
6620 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6621 folder.fold_load_generator(self)
6622 }
6623}
6624#[allow(clippy::needless_pass_by_ref_mut)]
6625pub fn fold_load_generator<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: LoadGenerator) -> LoadGenerator
6626where
6627 F: Fold<T, T2, > + ?Sized,
6628{
6629 match node {
6630 LoadGenerator::Clock {
6631 } => {
6632 LoadGenerator::Clock {
6633 }
6634 }
6635 LoadGenerator::Counter {
6636 } => {
6637 LoadGenerator::Counter {
6638 }
6639 }
6640 LoadGenerator::Marketing {
6641 } => {
6642 LoadGenerator::Marketing {
6643 }
6644 }
6645 LoadGenerator::Auction {
6646 } => {
6647 LoadGenerator::Auction {
6648 }
6649 }
6650 LoadGenerator::Datums {
6651 } => {
6652 LoadGenerator::Datums {
6653 }
6654 }
6655 LoadGenerator::Tpch {
6656 } => {
6657 LoadGenerator::Tpch {
6658 }
6659 }
6660 LoadGenerator::KeyValue {
6661 } => {
6662 LoadGenerator::KeyValue {
6663 }
6664 }
6665 }
6666}
6667impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for LoadGeneratorOption<T> {
6668 type Folded = LoadGeneratorOption<T2>;
6669 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6670 folder.fold_load_generator_option(self)
6671 }
6672}
6673#[allow(clippy::needless_pass_by_ref_mut)]
6674pub fn fold_load_generator_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: LoadGeneratorOption<T>) -> LoadGeneratorOption<T2>
6675where
6676 F: Fold<T, T2, > + ?Sized,
6677{
6678 LoadGeneratorOption {
6679 name: folder.fold_load_generator_option_name(node.name),
6680 value: node.value.map(|v| folder.fold_with_option_value(v)),
6681 }
6682}
6683impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for LoadGeneratorOptionName {
6684 type Folded = LoadGeneratorOptionName;
6685 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6686 folder.fold_load_generator_option_name(self)
6687 }
6688}
6689#[allow(clippy::needless_pass_by_ref_mut)]
6690pub fn fold_load_generator_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: LoadGeneratorOptionName) -> LoadGeneratorOptionName
6691where
6692 F: Fold<T, T2, > + ?Sized,
6693{
6694 match node {
6695 LoadGeneratorOptionName::ScaleFactor {
6696 } => {
6697 LoadGeneratorOptionName::ScaleFactor {
6698 }
6699 }
6700 LoadGeneratorOptionName::TickInterval {
6701 } => {
6702 LoadGeneratorOptionName::TickInterval {
6703 }
6704 }
6705 LoadGeneratorOptionName::AsOf {
6706 } => {
6707 LoadGeneratorOptionName::AsOf {
6708 }
6709 }
6710 LoadGeneratorOptionName::UpTo {
6711 } => {
6712 LoadGeneratorOptionName::UpTo {
6713 }
6714 }
6715 LoadGeneratorOptionName::MaxCardinality {
6716 } => {
6717 LoadGeneratorOptionName::MaxCardinality {
6718 }
6719 }
6720 LoadGeneratorOptionName::Keys {
6721 } => {
6722 LoadGeneratorOptionName::Keys {
6723 }
6724 }
6725 LoadGeneratorOptionName::SnapshotRounds {
6726 } => {
6727 LoadGeneratorOptionName::SnapshotRounds {
6728 }
6729 }
6730 LoadGeneratorOptionName::TransactionalSnapshot {
6731 } => {
6732 LoadGeneratorOptionName::TransactionalSnapshot {
6733 }
6734 }
6735 LoadGeneratorOptionName::ValueSize {
6736 } => {
6737 LoadGeneratorOptionName::ValueSize {
6738 }
6739 }
6740 LoadGeneratorOptionName::Seed {
6741 } => {
6742 LoadGeneratorOptionName::Seed {
6743 }
6744 }
6745 LoadGeneratorOptionName::Partitions {
6746 } => {
6747 LoadGeneratorOptionName::Partitions {
6748 }
6749 }
6750 LoadGeneratorOptionName::BatchSize {
6751 } => {
6752 LoadGeneratorOptionName::BatchSize {
6753 }
6754 }
6755 }
6756}
6757impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MapEntry<T> {
6758 type Folded = MapEntry<T2>;
6759 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6760 folder.fold_map_entry(self)
6761 }
6762}
6763#[allow(clippy::needless_pass_by_ref_mut)]
6764pub fn fold_map_entry<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MapEntry<T>) -> MapEntry<T2>
6765where
6766 F: Fold<T, T2, > + ?Sized,
6767{
6768 MapEntry {
6769 key: folder.fold_expr(node.key),
6770 value: folder.fold_expr(node.value),
6771 }
6772}
6773impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MaterializedViewOption<T> {
6774 type Folded = MaterializedViewOption<T2>;
6775 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6776 folder.fold_materialized_view_option(self)
6777 }
6778}
6779#[allow(clippy::needless_pass_by_ref_mut)]
6780pub fn fold_materialized_view_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MaterializedViewOption<T>) -> MaterializedViewOption<T2>
6781where
6782 F: Fold<T, T2, > + ?Sized,
6783{
6784 MaterializedViewOption {
6785 name: folder.fold_materialized_view_option_name(node.name),
6786 value: node.value.map(|v| folder.fold_with_option_value(v)),
6787 }
6788}
6789impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MaterializedViewOptionName {
6790 type Folded = MaterializedViewOptionName;
6791 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6792 folder.fold_materialized_view_option_name(self)
6793 }
6794}
6795#[allow(clippy::needless_pass_by_ref_mut)]
6796pub fn fold_materialized_view_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MaterializedViewOptionName) -> MaterializedViewOptionName
6797where
6798 F: Fold<T, T2, > + ?Sized,
6799{
6800 match node {
6801 MaterializedViewOptionName::AssertNotNull {
6802 } => {
6803 MaterializedViewOptionName::AssertNotNull {
6804 }
6805 }
6806 MaterializedViewOptionName::PartitionBy {
6807 } => {
6808 MaterializedViewOptionName::PartitionBy {
6809 }
6810 }
6811 MaterializedViewOptionName::RetainHistory {
6812 } => {
6813 MaterializedViewOptionName::RetainHistory {
6814 }
6815 }
6816 MaterializedViewOptionName::Refresh {
6817 } => {
6818 MaterializedViewOptionName::Refresh {
6819 }
6820 }
6821 }
6822}
6823impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MockViewDef<T> {
6824 type Folded = MockViewDef<T2>;
6825 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6826 folder.fold_mock_view_def(self)
6827 }
6828}
6829#[allow(clippy::needless_pass_by_ref_mut)]
6830pub fn fold_mock_view_def<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MockViewDef<T>) -> MockViewDef<T2>
6831where
6832 F: Fold<T, T2, > + ?Sized,
6833{
6834 MockViewDef {
6835 name: folder.fold_item_name(node.name),
6836 columns: node.columns.into_iter().map(|v| folder.fold_column_def(v)).collect(),
6837 query: folder.fold_query(node.query),
6838 }
6839}
6840impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MutRecBlock<T> {
6841 type Folded = MutRecBlock<T2>;
6842 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6843 folder.fold_mut_rec_block(self)
6844 }
6845}
6846#[allow(clippy::needless_pass_by_ref_mut)]
6847pub fn fold_mut_rec_block<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MutRecBlock<T>) -> MutRecBlock<T2>
6848where
6849 F: Fold<T, T2, > + ?Sized,
6850{
6851 MutRecBlock {
6852 options: node.options.into_iter().map(|v| folder.fold_mut_rec_block_option(v)).collect(),
6853 ctes: node.ctes.into_iter().map(|v| folder.fold_cte_mut_rec(v)).collect(),
6854 }
6855}
6856impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MutRecBlockOption<T> {
6857 type Folded = MutRecBlockOption<T2>;
6858 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6859 folder.fold_mut_rec_block_option(self)
6860 }
6861}
6862#[allow(clippy::needless_pass_by_ref_mut)]
6863pub fn fold_mut_rec_block_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MutRecBlockOption<T>) -> MutRecBlockOption<T2>
6864where
6865 F: Fold<T, T2, > + ?Sized,
6866{
6867 MutRecBlockOption {
6868 name: folder.fold_mut_rec_block_option_name(node.name),
6869 value: node.value.map(|v| folder.fold_with_option_value(v)),
6870 }
6871}
6872impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MutRecBlockOptionName {
6873 type Folded = MutRecBlockOptionName;
6874 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6875 folder.fold_mut_rec_block_option_name(self)
6876 }
6877}
6878#[allow(clippy::needless_pass_by_ref_mut)]
6879pub fn fold_mut_rec_block_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MutRecBlockOptionName) -> MutRecBlockOptionName
6880where
6881 F: Fold<T, T2, > + ?Sized,
6882{
6883 match node {
6884 MutRecBlockOptionName::RecursionLimit {
6885 } => {
6886 MutRecBlockOptionName::RecursionLimit {
6887 }
6888 }
6889 MutRecBlockOptionName::ErrorAtRecursionLimit {
6890 } => {
6891 MutRecBlockOptionName::ErrorAtRecursionLimit {
6892 }
6893 }
6894 MutRecBlockOptionName::ReturnAtRecursionLimit {
6895 } => {
6896 MutRecBlockOptionName::ReturnAtRecursionLimit {
6897 }
6898 }
6899 }
6900}
6901impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MySqlConfigOption<T> {
6902 type Folded = MySqlConfigOption<T2>;
6903 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6904 folder.fold_my_sql_config_option(self)
6905 }
6906}
6907#[allow(clippy::needless_pass_by_ref_mut)]
6908pub fn fold_my_sql_config_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MySqlConfigOption<T>) -> MySqlConfigOption<T2>
6909where
6910 F: Fold<T, T2, > + ?Sized,
6911{
6912 MySqlConfigOption {
6913 name: folder.fold_my_sql_config_option_name(node.name),
6914 value: node.value.map(|v| folder.fold_with_option_value(v)),
6915 }
6916}
6917impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for MySqlConfigOptionName {
6918 type Folded = MySqlConfigOptionName;
6919 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6920 folder.fold_my_sql_config_option_name(self)
6921 }
6922}
6923#[allow(clippy::needless_pass_by_ref_mut)]
6924pub fn fold_my_sql_config_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: MySqlConfigOptionName) -> MySqlConfigOptionName
6925where
6926 F: Fold<T, T2, > + ?Sized,
6927{
6928 match node {
6929 MySqlConfigOptionName::Details {
6930 } => {
6931 MySqlConfigOptionName::Details {
6932 }
6933 }
6934 MySqlConfigOptionName::TextColumns {
6935 } => {
6936 MySqlConfigOptionName::TextColumns {
6937 }
6938 }
6939 MySqlConfigOptionName::ExcludeColumns {
6940 } => {
6941 MySqlConfigOptionName::ExcludeColumns {
6942 }
6943 }
6944 }
6945}
6946impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for NamedPlan {
6947 type Folded = NamedPlan;
6948 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6949 folder.fold_named_plan(self)
6950 }
6951}
6952#[allow(clippy::needless_pass_by_ref_mut)]
6953pub fn fold_named_plan<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: NamedPlan) -> NamedPlan
6954where
6955 F: Fold<T, T2, > + ?Sized,
6956{
6957 match node {
6958 NamedPlan::Raw {
6959 } => {
6960 NamedPlan::Raw {
6961 }
6962 }
6963 NamedPlan::Decorrelated {
6964 } => {
6965 NamedPlan::Decorrelated {
6966 }
6967 }
6968 NamedPlan::Local {
6969 } => {
6970 NamedPlan::Local {
6971 }
6972 }
6973 NamedPlan::Global {
6974 } => {
6975 NamedPlan::Global {
6976 }
6977 }
6978 NamedPlan::Physical {
6979 } => {
6980 NamedPlan::Physical {
6981 }
6982 }
6983 NamedPlan::FastPath {
6984 } => {
6985 NamedPlan::FastPath {
6986 }
6987 }
6988 }
6989}
6990impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for NetworkPolicyOption<T> {
6991 type Folded = NetworkPolicyOption<T2>;
6992 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
6993 folder.fold_network_policy_option(self)
6994 }
6995}
6996#[allow(clippy::needless_pass_by_ref_mut)]
6997pub fn fold_network_policy_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: NetworkPolicyOption<T>) -> NetworkPolicyOption<T2>
6998where
6999 F: Fold<T, T2, > + ?Sized,
7000{
7001 NetworkPolicyOption {
7002 name: folder.fold_network_policy_option_name(node.name),
7003 value: node.value.map(|v| folder.fold_with_option_value(v)),
7004 }
7005}
7006impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for NetworkPolicyOptionName {
7007 type Folded = NetworkPolicyOptionName;
7008 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7009 folder.fold_network_policy_option_name(self)
7010 }
7011}
7012#[allow(clippy::needless_pass_by_ref_mut)]
7013pub fn fold_network_policy_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: NetworkPolicyOptionName) -> NetworkPolicyOptionName
7014where
7015 F: Fold<T, T2, > + ?Sized,
7016{
7017 match node {
7018 NetworkPolicyOptionName::Rules {
7019 } => {
7020 NetworkPolicyOptionName::Rules {
7021 }
7022 }
7023 }
7024}
7025impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for NetworkPolicyRuleDefinition<T> {
7026 type Folded = NetworkPolicyRuleDefinition<T2>;
7027 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7028 folder.fold_network_policy_rule_definition(self)
7029 }
7030}
7031#[allow(clippy::needless_pass_by_ref_mut)]
7032pub fn fold_network_policy_rule_definition<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: NetworkPolicyRuleDefinition<T>) -> NetworkPolicyRuleDefinition<T2>
7033where
7034 F: Fold<T, T2, > + ?Sized,
7035{
7036 NetworkPolicyRuleDefinition {
7037 name: folder.fold_ident(node.name),
7038 options: node.options.into_iter().map(|v| folder.fold_network_policy_rule_option(v)).collect(),
7039 }
7040}
7041impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for NetworkPolicyRuleOption<T> {
7042 type Folded = NetworkPolicyRuleOption<T2>;
7043 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7044 folder.fold_network_policy_rule_option(self)
7045 }
7046}
7047#[allow(clippy::needless_pass_by_ref_mut)]
7048pub fn fold_network_policy_rule_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: NetworkPolicyRuleOption<T>) -> NetworkPolicyRuleOption<T2>
7049where
7050 F: Fold<T, T2, > + ?Sized,
7051{
7052 NetworkPolicyRuleOption {
7053 name: folder.fold_network_policy_rule_option_name(node.name),
7054 value: node.value.map(|v| folder.fold_with_option_value(v)),
7055 }
7056}
7057impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for NetworkPolicyRuleOptionName {
7058 type Folded = NetworkPolicyRuleOptionName;
7059 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7060 folder.fold_network_policy_rule_option_name(self)
7061 }
7062}
7063#[allow(clippy::needless_pass_by_ref_mut)]
7064pub fn fold_network_policy_rule_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: NetworkPolicyRuleOptionName) -> NetworkPolicyRuleOptionName
7065where
7066 F: Fold<T, T2, > + ?Sized,
7067{
7068 match node {
7069 NetworkPolicyRuleOptionName::Direction {
7070 } => {
7071 NetworkPolicyRuleOptionName::Direction {
7072 }
7073 }
7074 NetworkPolicyRuleOptionName::Action {
7075 } => {
7076 NetworkPolicyRuleOptionName::Action {
7077 }
7078 }
7079 NetworkPolicyRuleOptionName::Address {
7080 } => {
7081 NetworkPolicyRuleOptionName::Address {
7082 }
7083 }
7084 }
7085}
7086impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for NoticeSeverity {
7087 type Folded = NoticeSeverity;
7088 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7089 folder.fold_notice_severity(self)
7090 }
7091}
7092#[allow(clippy::needless_pass_by_ref_mut)]
7093pub fn fold_notice_severity<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: NoticeSeverity) -> NoticeSeverity
7094where
7095 F: Fold<T, T2, > + ?Sized,
7096{
7097 match node {
7098 NoticeSeverity::Debug {
7099 } => {
7100 NoticeSeverity::Debug {
7101 }
7102 }
7103 NoticeSeverity::Info {
7104 } => {
7105 NoticeSeverity::Info {
7106 }
7107 }
7108 NoticeSeverity::Log {
7109 } => {
7110 NoticeSeverity::Log {
7111 }
7112 }
7113 NoticeSeverity::Notice {
7114 } => {
7115 NoticeSeverity::Notice {
7116 }
7117 }
7118 NoticeSeverity::Warning {
7119 } => {
7120 NoticeSeverity::Warning {
7121 }
7122 }
7123 }
7124}
7125impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ObjectType {
7126 type Folded = ObjectType;
7127 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7128 folder.fold_object_type(self)
7129 }
7130}
7131#[allow(clippy::needless_pass_by_ref_mut)]
7132pub fn fold_object_type<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ObjectType) -> ObjectType
7133where
7134 F: Fold<T, T2, > + ?Sized,
7135{
7136 match node {
7137 ObjectType::Table {
7138 } => {
7139 ObjectType::Table {
7140 }
7141 }
7142 ObjectType::View {
7143 } => {
7144 ObjectType::View {
7145 }
7146 }
7147 ObjectType::MaterializedView {
7148 } => {
7149 ObjectType::MaterializedView {
7150 }
7151 }
7152 ObjectType::Source {
7153 } => {
7154 ObjectType::Source {
7155 }
7156 }
7157 ObjectType::Sink {
7158 } => {
7159 ObjectType::Sink {
7160 }
7161 }
7162 ObjectType::MetricSink {
7163 } => {
7164 ObjectType::MetricSink {
7165 }
7166 }
7167 ObjectType::Index {
7168 } => {
7169 ObjectType::Index {
7170 }
7171 }
7172 ObjectType::Type {
7173 } => {
7174 ObjectType::Type {
7175 }
7176 }
7177 ObjectType::Role {
7178 } => {
7179 ObjectType::Role {
7180 }
7181 }
7182 ObjectType::Cluster {
7183 } => {
7184 ObjectType::Cluster {
7185 }
7186 }
7187 ObjectType::ClusterReplica {
7188 } => {
7189 ObjectType::ClusterReplica {
7190 }
7191 }
7192 ObjectType::Secret {
7193 } => {
7194 ObjectType::Secret {
7195 }
7196 }
7197 ObjectType::Connection {
7198 } => {
7199 ObjectType::Connection {
7200 }
7201 }
7202 ObjectType::Database {
7203 } => {
7204 ObjectType::Database {
7205 }
7206 }
7207 ObjectType::Schema {
7208 } => {
7209 ObjectType::Schema {
7210 }
7211 }
7212 ObjectType::Func {
7213 } => {
7214 ObjectType::Func {
7215 }
7216 }
7217 ObjectType::Subsource {
7218 } => {
7219 ObjectType::Subsource {
7220 }
7221 }
7222 ObjectType::NetworkPolicy {
7223 } => {
7224 ObjectType::NetworkPolicy {
7225 }
7226 }
7227 }
7228}
7229impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for OnHydrationOptionValue {
7230 type Folded = OnHydrationOptionValue;
7231 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7232 folder.fold_on_hydration_option_value(self)
7233 }
7234}
7235#[allow(clippy::needless_pass_by_ref_mut)]
7236pub fn fold_on_hydration_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: OnHydrationOptionValue) -> OnHydrationOptionValue
7237where
7238 F: Fold<T, T2, > + ?Sized,
7239{
7240 OnHydrationOptionValue {
7241 hydration_size: folder.fold_value(node.hydration_size),
7242 linger_duration: node.linger_duration.map(|v| folder.fold_value(v)),
7243 }
7244}
7245impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Op {
7246 type Folded = Op;
7247 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7248 folder.fold_op(self)
7249 }
7250}
7251#[allow(clippy::needless_pass_by_ref_mut)]
7252pub fn fold_op<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Op) -> Op
7253where
7254 F: Fold<T, T2, > + ?Sized,
7255{
7256 Op {
7257 namespace: node.namespace.map(|v| v.into_iter().map(|v| folder.fold_ident(v)).collect()),
7258 op: node.op,
7259 }
7260}
7261impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for OrderByExpr<T> {
7262 type Folded = OrderByExpr<T2>;
7263 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7264 folder.fold_order_by_expr(self)
7265 }
7266}
7267#[allow(clippy::needless_pass_by_ref_mut)]
7268pub fn fold_order_by_expr<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: OrderByExpr<T>) -> OrderByExpr<T2>
7269where
7270 F: Fold<T, T2, > + ?Sized,
7271{
7272 OrderByExpr {
7273 expr: folder.fold_expr(node.expr),
7274 asc: node.asc.map(|v| v),
7275 nulls_last: node.nulls_last.map(|v| v),
7276 }
7277}
7278impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for PgConfigOption<T> {
7279 type Folded = PgConfigOption<T2>;
7280 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7281 folder.fold_pg_config_option(self)
7282 }
7283}
7284#[allow(clippy::needless_pass_by_ref_mut)]
7285pub fn fold_pg_config_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: PgConfigOption<T>) -> PgConfigOption<T2>
7286where
7287 F: Fold<T, T2, > + ?Sized,
7288{
7289 PgConfigOption {
7290 name: folder.fold_pg_config_option_name(node.name),
7291 value: node.value.map(|v| folder.fold_with_option_value(v)),
7292 }
7293}
7294impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for PgConfigOptionName {
7295 type Folded = PgConfigOptionName;
7296 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7297 folder.fold_pg_config_option_name(self)
7298 }
7299}
7300#[allow(clippy::needless_pass_by_ref_mut)]
7301pub fn fold_pg_config_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: PgConfigOptionName) -> PgConfigOptionName
7302where
7303 F: Fold<T, T2, > + ?Sized,
7304{
7305 match node {
7306 PgConfigOptionName::Details {
7307 } => {
7308 PgConfigOptionName::Details {
7309 }
7310 }
7311 PgConfigOptionName::Publication {
7312 } => {
7313 PgConfigOptionName::Publication {
7314 }
7315 }
7316 PgConfigOptionName::Failover {
7317 } => {
7318 PgConfigOptionName::Failover {
7319 }
7320 }
7321 PgConfigOptionName::TextColumns {
7322 } => {
7323 PgConfigOptionName::TextColumns {
7324 }
7325 }
7326 PgConfigOptionName::ExcludeColumns {
7327 } => {
7328 PgConfigOptionName::ExcludeColumns {
7329 }
7330 }
7331 }
7332}
7333impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for PrepareStatement<T> {
7334 type Folded = PrepareStatement<T2>;
7335 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7336 folder.fold_prepare_statement(self)
7337 }
7338}
7339#[allow(clippy::needless_pass_by_ref_mut)]
7340pub fn fold_prepare_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: PrepareStatement<T>) -> PrepareStatement<T2>
7341where
7342 F: Fold<T, T2, > + ?Sized,
7343{
7344 PrepareStatement {
7345 name: folder.fold_ident(node.name),
7346 stmt: Box::new(folder.fold_nested_statement(*node.stmt)),
7347 sql: node.sql,
7348 }
7349}
7350impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Privilege {
7351 type Folded = Privilege;
7352 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7353 folder.fold_privilege(self)
7354 }
7355}
7356#[allow(clippy::needless_pass_by_ref_mut)]
7357pub fn fold_privilege<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Privilege) -> Privilege
7358where
7359 F: Fold<T, T2, > + ?Sized,
7360{
7361 match node {
7362 Privilege::SELECT {
7363 } => {
7364 Privilege::SELECT {
7365 }
7366 }
7367 Privilege::INSERT {
7368 } => {
7369 Privilege::INSERT {
7370 }
7371 }
7372 Privilege::UPDATE {
7373 } => {
7374 Privilege::UPDATE {
7375 }
7376 }
7377 Privilege::DELETE {
7378 } => {
7379 Privilege::DELETE {
7380 }
7381 }
7382 Privilege::USAGE {
7383 } => {
7384 Privilege::USAGE {
7385 }
7386 }
7387 Privilege::CREATE {
7388 } => {
7389 Privilege::CREATE {
7390 }
7391 }
7392 Privilege::CREATEROLE {
7393 } => {
7394 Privilege::CREATEROLE {
7395 }
7396 }
7397 Privilege::CREATEDB {
7398 } => {
7399 Privilege::CREATEDB {
7400 }
7401 }
7402 Privilege::CREATECLUSTER {
7403 } => {
7404 Privilege::CREATECLUSTER {
7405 }
7406 }
7407 Privilege::CREATENETWORKPOLICY {
7408 } => {
7409 Privilege::CREATENETWORKPOLICY {
7410 }
7411 }
7412 }
7413}
7414impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for PrivilegeSpecification {
7415 type Folded = PrivilegeSpecification;
7416 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7417 folder.fold_privilege_specification(self)
7418 }
7419}
7420#[allow(clippy::needless_pass_by_ref_mut)]
7421pub fn fold_privilege_specification<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: PrivilegeSpecification) -> PrivilegeSpecification
7422where
7423 F: Fold<T, T2, > + ?Sized,
7424{
7425 match node {
7426 PrivilegeSpecification::All {
7427 } => {
7428 PrivilegeSpecification::All {
7429 }
7430 }
7431 PrivilegeSpecification::Privileges {
7432 0: binding0,
7433 } => {
7434 PrivilegeSpecification::Privileges {
7435 0: binding0.into_iter().map(|v| folder.fold_privilege(v)).collect(),
7436 }
7437 }
7438 }
7439}
7440impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ProtobufSchema<T> {
7441 type Folded = ProtobufSchema<T2>;
7442 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7443 folder.fold_protobuf_schema(self)
7444 }
7445}
7446#[allow(clippy::needless_pass_by_ref_mut)]
7447pub fn fold_protobuf_schema<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ProtobufSchema<T>) -> ProtobufSchema<T2>
7448where
7449 F: Fold<T, T2, > + ?Sized,
7450{
7451 match node {
7452 ProtobufSchema::Csr {
7453 csr_connection: binding0,
7454 } => {
7455 ProtobufSchema::Csr {
7456 csr_connection: folder.fold_csr_connection_protobuf(binding0),
7457 }
7458 }
7459 ProtobufSchema::InlineSchema {
7460 message_name: binding0,
7461 schema: binding1,
7462 } => {
7463 ProtobufSchema::InlineSchema {
7464 message_name: binding0,
7465 schema: folder.fold_schema(binding1),
7466 }
7467 }
7468 }
7469}
7470impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for QualifiedReplica {
7471 type Folded = QualifiedReplica;
7472 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7473 folder.fold_qualified_replica(self)
7474 }
7475}
7476#[allow(clippy::needless_pass_by_ref_mut)]
7477pub fn fold_qualified_replica<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: QualifiedReplica) -> QualifiedReplica
7478where
7479 F: Fold<T, T2, > + ?Sized,
7480{
7481 QualifiedReplica {
7482 cluster: folder.fold_ident(node.cluster),
7483 replica: folder.fold_ident(node.replica),
7484 }
7485}
7486impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Query<T> {
7487 type Folded = Query<T2>;
7488 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7489 folder.fold_query(self)
7490 }
7491}
7492#[allow(clippy::needless_pass_by_ref_mut)]
7493pub fn fold_query<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Query<T>) -> Query<T2>
7494where
7495 F: Fold<T, T2, > + ?Sized,
7496{
7497 Query {
7498 ctes: folder.fold_cte_block(node.ctes),
7499 body: folder.fold_set_expr(node.body),
7500 order_by: node.order_by.into_iter().map(|v| folder.fold_order_by_expr(v)).collect(),
7501 limit: node.limit.map(|v| folder.fold_limit(v)),
7502 offset: node.offset.map(|v| folder.fold_expr(v)),
7503 }
7504}
7505impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RaiseStatement {
7506 type Folded = RaiseStatement;
7507 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7508 folder.fold_raise_statement(self)
7509 }
7510}
7511#[allow(clippy::needless_pass_by_ref_mut)]
7512pub fn fold_raise_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RaiseStatement) -> RaiseStatement
7513where
7514 F: Fold<T, T2, > + ?Sized,
7515{
7516 RaiseStatement {
7517 severity: folder.fold_notice_severity(node.severity),
7518 }
7519}
7520impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ReaderSchemaSelectionStrategy {
7521 type Folded = ReaderSchemaSelectionStrategy;
7522 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7523 folder.fold_reader_schema_selection_strategy(self)
7524 }
7525}
7526#[allow(clippy::needless_pass_by_ref_mut)]
7527pub fn fold_reader_schema_selection_strategy<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ReaderSchemaSelectionStrategy) -> ReaderSchemaSelectionStrategy
7528where
7529 F: Fold<T, T2, > + ?Sized,
7530{
7531 match node {
7532 ReaderSchemaSelectionStrategy::Latest {
7533 } => {
7534 ReaderSchemaSelectionStrategy::Latest {
7535 }
7536 }
7537 ReaderSchemaSelectionStrategy::Inline {
7538 0: binding0,
7539 } => {
7540 ReaderSchemaSelectionStrategy::Inline {
7541 0: binding0,
7542 }
7543 }
7544 ReaderSchemaSelectionStrategy::ById {
7545 0: binding0,
7546 } => {
7547 ReaderSchemaSelectionStrategy::ById {
7548 0: binding0,
7549 }
7550 }
7551 }
7552}
7553impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ReassignOwnedStatement<T> {
7554 type Folded = ReassignOwnedStatement<T2>;
7555 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7556 folder.fold_reassign_owned_statement(self)
7557 }
7558}
7559#[allow(clippy::needless_pass_by_ref_mut)]
7560pub fn fold_reassign_owned_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ReassignOwnedStatement<T>) -> ReassignOwnedStatement<T2>
7561where
7562 F: Fold<T, T2, > + ?Sized,
7563{
7564 ReassignOwnedStatement {
7565 old_roles: node.old_roles.into_iter().map(|v| folder.fold_role_name(v)).collect(),
7566 new_role: folder.fold_role_name(node.new_role),
7567 }
7568}
7569impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RefreshAtOptionValue<T> {
7570 type Folded = RefreshAtOptionValue<T2>;
7571 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7572 folder.fold_refresh_at_option_value(self)
7573 }
7574}
7575#[allow(clippy::needless_pass_by_ref_mut)]
7576pub fn fold_refresh_at_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RefreshAtOptionValue<T>) -> RefreshAtOptionValue<T2>
7577where
7578 F: Fold<T, T2, > + ?Sized,
7579{
7580 RefreshAtOptionValue {
7581 time: folder.fold_expr(node.time),
7582 }
7583}
7584impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RefreshEveryOptionValue<T> {
7585 type Folded = RefreshEveryOptionValue<T2>;
7586 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7587 folder.fold_refresh_every_option_value(self)
7588 }
7589}
7590#[allow(clippy::needless_pass_by_ref_mut)]
7591pub fn fold_refresh_every_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RefreshEveryOptionValue<T>) -> RefreshEveryOptionValue<T2>
7592where
7593 F: Fold<T, T2, > + ?Sized,
7594{
7595 RefreshEveryOptionValue {
7596 interval: folder.fold_interval_value(node.interval),
7597 aligned_to: node.aligned_to.map(|v| folder.fold_expr(v)),
7598 }
7599}
7600impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RefreshOptionValue<T> {
7601 type Folded = RefreshOptionValue<T2>;
7602 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7603 folder.fold_refresh_option_value(self)
7604 }
7605}
7606#[allow(clippy::needless_pass_by_ref_mut)]
7607pub fn fold_refresh_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RefreshOptionValue<T>) -> RefreshOptionValue<T2>
7608where
7609 F: Fold<T, T2, > + ?Sized,
7610{
7611 match node {
7612 RefreshOptionValue::OnCommit {
7613 } => {
7614 RefreshOptionValue::OnCommit {
7615 }
7616 }
7617 RefreshOptionValue::AtCreation {
7618 } => {
7619 RefreshOptionValue::AtCreation {
7620 }
7621 }
7622 RefreshOptionValue::At {
7623 0: binding0,
7624 } => {
7625 RefreshOptionValue::At {
7626 0: folder.fold_refresh_at_option_value(binding0),
7627 }
7628 }
7629 RefreshOptionValue::Every {
7630 0: binding0,
7631 } => {
7632 RefreshOptionValue::Every {
7633 0: folder.fold_refresh_every_option_value(binding0),
7634 }
7635 }
7636 }
7637}
7638impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ReplicaDefinition<T> {
7639 type Folded = ReplicaDefinition<T2>;
7640 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7641 folder.fold_replica_definition(self)
7642 }
7643}
7644#[allow(clippy::needless_pass_by_ref_mut)]
7645pub fn fold_replica_definition<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ReplicaDefinition<T>) -> ReplicaDefinition<T2>
7646where
7647 F: Fold<T, T2, > + ?Sized,
7648{
7649 ReplicaDefinition {
7650 name: folder.fold_ident(node.name),
7651 options: node.options.into_iter().map(|v| folder.fold_replica_option(v)).collect(),
7652 }
7653}
7654impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ReplicaOption<T> {
7655 type Folded = ReplicaOption<T2>;
7656 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7657 folder.fold_replica_option(self)
7658 }
7659}
7660#[allow(clippy::needless_pass_by_ref_mut)]
7661pub fn fold_replica_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ReplicaOption<T>) -> ReplicaOption<T2>
7662where
7663 F: Fold<T, T2, > + ?Sized,
7664{
7665 ReplicaOption {
7666 name: folder.fold_replica_option_name(node.name),
7667 value: node.value.map(|v| folder.fold_with_option_value(v)),
7668 }
7669}
7670impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ReplicaOptionName {
7671 type Folded = ReplicaOptionName;
7672 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7673 folder.fold_replica_option_name(self)
7674 }
7675}
7676#[allow(clippy::needless_pass_by_ref_mut)]
7677pub fn fold_replica_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ReplicaOptionName) -> ReplicaOptionName
7678where
7679 F: Fold<T, T2, > + ?Sized,
7680{
7681 match node {
7682 ReplicaOptionName::BilledAs {
7683 } => {
7684 ReplicaOptionName::BilledAs {
7685 }
7686 }
7687 ReplicaOptionName::Size {
7688 } => {
7689 ReplicaOptionName::Size {
7690 }
7691 }
7692 ReplicaOptionName::AvailabilityZone {
7693 } => {
7694 ReplicaOptionName::AvailabilityZone {
7695 }
7696 }
7697 ReplicaOptionName::StorageAddresses {
7698 } => {
7699 ReplicaOptionName::StorageAddresses {
7700 }
7701 }
7702 ReplicaOptionName::StoragectlAddresses {
7703 } => {
7704 ReplicaOptionName::StoragectlAddresses {
7705 }
7706 }
7707 ReplicaOptionName::ComputectlAddresses {
7708 } => {
7709 ReplicaOptionName::ComputectlAddresses {
7710 }
7711 }
7712 ReplicaOptionName::ComputeAddresses {
7713 } => {
7714 ReplicaOptionName::ComputeAddresses {
7715 }
7716 }
7717 ReplicaOptionName::Workers {
7718 } => {
7719 ReplicaOptionName::Workers {
7720 }
7721 }
7722 ReplicaOptionName::Internal {
7723 } => {
7724 ReplicaOptionName::Internal {
7725 }
7726 }
7727 ReplicaOptionName::IntrospectionInterval {
7728 } => {
7729 ReplicaOptionName::IntrospectionInterval {
7730 }
7731 }
7732 ReplicaOptionName::IntrospectionDebugging {
7733 } => {
7734 ReplicaOptionName::IntrospectionDebugging {
7735 }
7736 }
7737 ReplicaOptionName::Disk {
7738 } => {
7739 ReplicaOptionName::Disk {
7740 }
7741 }
7742 ReplicaOptionName::ExperimentalArrangementCompression {
7743 } => {
7744 ReplicaOptionName::ExperimentalArrangementCompression {
7745 }
7746 }
7747 }
7748}
7749impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ResetVariableStatement {
7750 type Folded = ResetVariableStatement;
7751 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7752 folder.fold_reset_variable_statement(self)
7753 }
7754}
7755#[allow(clippy::needless_pass_by_ref_mut)]
7756pub fn fold_reset_variable_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ResetVariableStatement) -> ResetVariableStatement
7757where
7758 F: Fold<T, T2, > + ?Sized,
7759{
7760 ResetVariableStatement {
7761 variable: folder.fold_ident(node.variable),
7762 }
7763}
7764impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RevokePrivilegesStatement<T> {
7765 type Folded = RevokePrivilegesStatement<T2>;
7766 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7767 folder.fold_revoke_privileges_statement(self)
7768 }
7769}
7770#[allow(clippy::needless_pass_by_ref_mut)]
7771pub fn fold_revoke_privileges_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RevokePrivilegesStatement<T>) -> RevokePrivilegesStatement<T2>
7772where
7773 F: Fold<T, T2, > + ?Sized,
7774{
7775 RevokePrivilegesStatement {
7776 privileges: folder.fold_privilege_specification(node.privileges),
7777 target: folder.fold_grant_target_specification(node.target),
7778 roles: node.roles.into_iter().map(|v| folder.fold_role_name(v)).collect(),
7779 }
7780}
7781impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RevokeRoleStatement<T> {
7782 type Folded = RevokeRoleStatement<T2>;
7783 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7784 folder.fold_revoke_role_statement(self)
7785 }
7786}
7787#[allow(clippy::needless_pass_by_ref_mut)]
7788pub fn fold_revoke_role_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RevokeRoleStatement<T>) -> RevokeRoleStatement<T2>
7789where
7790 F: Fold<T, T2, > + ?Sized,
7791{
7792 RevokeRoleStatement {
7793 role_names: node.role_names.into_iter().map(|v| folder.fold_role_name(v)).collect(),
7794 member_names: node.member_names.into_iter().map(|v| folder.fold_role_name(v)).collect(),
7795 }
7796}
7797impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RoleAttribute {
7798 type Folded = RoleAttribute;
7799 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7800 folder.fold_role_attribute(self)
7801 }
7802}
7803#[allow(clippy::needless_pass_by_ref_mut)]
7804pub fn fold_role_attribute<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RoleAttribute) -> RoleAttribute
7805where
7806 F: Fold<T, T2, > + ?Sized,
7807{
7808 match node {
7809 RoleAttribute::Inherit {
7810 } => {
7811 RoleAttribute::Inherit {
7812 }
7813 }
7814 RoleAttribute::NoInherit {
7815 } => {
7816 RoleAttribute::NoInherit {
7817 }
7818 }
7819 RoleAttribute::Password {
7820 0: binding0,
7821 } => {
7822 RoleAttribute::Password {
7823 0: binding0.map(|v| v),
7824 }
7825 }
7826 RoleAttribute::Login {
7827 } => {
7828 RoleAttribute::Login {
7829 }
7830 }
7831 RoleAttribute::NoLogin {
7832 } => {
7833 RoleAttribute::NoLogin {
7834 }
7835 }
7836 RoleAttribute::SuperUser {
7837 } => {
7838 RoleAttribute::SuperUser {
7839 }
7840 }
7841 RoleAttribute::NoSuperUser {
7842 } => {
7843 RoleAttribute::NoSuperUser {
7844 }
7845 }
7846 RoleAttribute::CreateCluster {
7847 } => {
7848 RoleAttribute::CreateCluster {
7849 }
7850 }
7851 RoleAttribute::NoCreateCluster {
7852 } => {
7853 RoleAttribute::NoCreateCluster {
7854 }
7855 }
7856 RoleAttribute::CreateDB {
7857 } => {
7858 RoleAttribute::CreateDB {
7859 }
7860 }
7861 RoleAttribute::NoCreateDB {
7862 } => {
7863 RoleAttribute::NoCreateDB {
7864 }
7865 }
7866 RoleAttribute::CreateRole {
7867 } => {
7868 RoleAttribute::CreateRole {
7869 }
7870 }
7871 RoleAttribute::NoCreateRole {
7872 } => {
7873 RoleAttribute::NoCreateRole {
7874 }
7875 }
7876 }
7877}
7878impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for RollbackStatement {
7879 type Folded = RollbackStatement;
7880 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7881 folder.fold_rollback_statement(self)
7882 }
7883}
7884#[allow(clippy::needless_pass_by_ref_mut)]
7885pub fn fold_rollback_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: RollbackStatement) -> RollbackStatement
7886where
7887 F: Fold<T, T2, > + ?Sized,
7888{
7889 RollbackStatement {
7890 chain: node.chain,
7891 }
7892}
7893impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Schema {
7894 type Folded = Schema;
7895 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7896 folder.fold_schema(self)
7897 }
7898}
7899#[allow(clippy::needless_pass_by_ref_mut)]
7900pub fn fold_schema<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Schema) -> Schema
7901where
7902 F: Fold<T, T2, > + ?Sized,
7903{
7904 Schema {
7905 schema: node.schema,
7906 }
7907}
7908impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Select<T> {
7909 type Folded = Select<T2>;
7910 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7911 folder.fold_select(self)
7912 }
7913}
7914#[allow(clippy::needless_pass_by_ref_mut)]
7915pub fn fold_select<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Select<T>) -> Select<T2>
7916where
7917 F: Fold<T, T2, > + ?Sized,
7918{
7919 Select {
7920 distinct: node.distinct.map(|v| folder.fold_distinct(v)),
7921 projection: node.projection.into_iter().map(|v| folder.fold_select_item(v)).collect(),
7922 from: node.from.into_iter().map(|v| folder.fold_table_with_joins(v)).collect(),
7923 selection: node.selection.map(|v| folder.fold_expr(v)),
7924 group_by: node.group_by.into_iter().map(|v| folder.fold_expr(v)).collect(),
7925 having: node.having.map(|v| folder.fold_expr(v)),
7926 qualify: node.qualify.map(|v| folder.fold_expr(v)),
7927 options: node.options.into_iter().map(|v| folder.fold_select_option(v)).collect(),
7928 }
7929}
7930impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SelectItem<T> {
7931 type Folded = SelectItem<T2>;
7932 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7933 folder.fold_select_item(self)
7934 }
7935}
7936#[allow(clippy::needless_pass_by_ref_mut)]
7937pub fn fold_select_item<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SelectItem<T>) -> SelectItem<T2>
7938where
7939 F: Fold<T, T2, > + ?Sized,
7940{
7941 match node {
7942 SelectItem::Expr {
7943 expr: binding0,
7944 alias: binding1,
7945 } => {
7946 SelectItem::Expr {
7947 expr: folder.fold_expr(binding0),
7948 alias: binding1.map(|v| folder.fold_ident(v)),
7949 }
7950 }
7951 SelectItem::Wildcard {
7952 } => {
7953 SelectItem::Wildcard {
7954 }
7955 }
7956 }
7957}
7958impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SelectOption<T> {
7959 type Folded = SelectOption<T2>;
7960 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7961 folder.fold_select_option(self)
7962 }
7963}
7964#[allow(clippy::needless_pass_by_ref_mut)]
7965pub fn fold_select_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SelectOption<T>) -> SelectOption<T2>
7966where
7967 F: Fold<T, T2, > + ?Sized,
7968{
7969 SelectOption {
7970 name: folder.fold_select_option_name(node.name),
7971 value: node.value.map(|v| folder.fold_with_option_value(v)),
7972 }
7973}
7974impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SelectOptionName {
7975 type Folded = SelectOptionName;
7976 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
7977 folder.fold_select_option_name(self)
7978 }
7979}
7980#[allow(clippy::needless_pass_by_ref_mut)]
7981pub fn fold_select_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SelectOptionName) -> SelectOptionName
7982where
7983 F: Fold<T, T2, > + ?Sized,
7984{
7985 match node {
7986 SelectOptionName::ExpectedGroupSize {
7987 } => {
7988 SelectOptionName::ExpectedGroupSize {
7989 }
7990 }
7991 SelectOptionName::AggregateInputGroupSize {
7992 } => {
7993 SelectOptionName::AggregateInputGroupSize {
7994 }
7995 }
7996 SelectOptionName::DistinctOnInputGroupSize {
7997 } => {
7998 SelectOptionName::DistinctOnInputGroupSize {
7999 }
8000 }
8001 SelectOptionName::LimitInputGroupSize {
8002 } => {
8003 SelectOptionName::LimitInputGroupSize {
8004 }
8005 }
8006 }
8007}
8008impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SelectStatement<T> {
8009 type Folded = SelectStatement<T2>;
8010 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8011 folder.fold_select_statement(self)
8012 }
8013}
8014#[allow(clippy::needless_pass_by_ref_mut)]
8015pub fn fold_select_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SelectStatement<T>) -> SelectStatement<T2>
8016where
8017 F: Fold<T, T2, > + ?Sized,
8018{
8019 SelectStatement {
8020 query: folder.fold_query(node.query),
8021 as_of: node.as_of.map(|v| folder.fold_as_of(v)),
8022 }
8023}
8024impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SetExpr<T> {
8025 type Folded = SetExpr<T2>;
8026 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8027 folder.fold_set_expr(self)
8028 }
8029}
8030#[allow(clippy::needless_pass_by_ref_mut)]
8031pub fn fold_set_expr<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SetExpr<T>) -> SetExpr<T2>
8032where
8033 F: Fold<T, T2, > + ?Sized,
8034{
8035 match node {
8036 SetExpr::Select {
8037 0: binding0,
8038 } => {
8039 SetExpr::Select {
8040 0: Box::new(folder.fold_select(*binding0)),
8041 }
8042 }
8043 SetExpr::Query {
8044 0: binding0,
8045 } => {
8046 SetExpr::Query {
8047 0: Box::new(folder.fold_query(*binding0)),
8048 }
8049 }
8050 SetExpr::SetOperation {
8051 op: binding0,
8052 all: binding1,
8053 left: binding2,
8054 right: binding3,
8055 } => {
8056 SetExpr::SetOperation {
8057 op: folder.fold_set_operator(binding0),
8058 all: binding1,
8059 left: Box::new(folder.fold_set_expr(*binding2)),
8060 right: Box::new(folder.fold_set_expr(*binding3)),
8061 }
8062 }
8063 SetExpr::Values {
8064 0: binding0,
8065 } => {
8066 SetExpr::Values {
8067 0: folder.fold_values(binding0),
8068 }
8069 }
8070 SetExpr::Show {
8071 0: binding0,
8072 } => {
8073 SetExpr::Show {
8074 0: folder.fold_show_statement(binding0),
8075 }
8076 }
8077 SetExpr::Table {
8078 0: binding0,
8079 } => {
8080 SetExpr::Table {
8081 0: folder.fold_item_name(binding0),
8082 }
8083 }
8084 }
8085}
8086impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SetOperator {
8087 type Folded = SetOperator;
8088 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8089 folder.fold_set_operator(self)
8090 }
8091}
8092#[allow(clippy::needless_pass_by_ref_mut)]
8093pub fn fold_set_operator<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SetOperator) -> SetOperator
8094where
8095 F: Fold<T, T2, > + ?Sized,
8096{
8097 match node {
8098 SetOperator::Union {
8099 } => {
8100 SetOperator::Union {
8101 }
8102 }
8103 SetOperator::Except {
8104 } => {
8105 SetOperator::Except {
8106 }
8107 }
8108 SetOperator::Intersect {
8109 } => {
8110 SetOperator::Intersect {
8111 }
8112 }
8113 }
8114}
8115impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SetRoleVar {
8116 type Folded = SetRoleVar;
8117 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8118 folder.fold_set_role_var(self)
8119 }
8120}
8121#[allow(clippy::needless_pass_by_ref_mut)]
8122pub fn fold_set_role_var<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SetRoleVar) -> SetRoleVar
8123where
8124 F: Fold<T, T2, > + ?Sized,
8125{
8126 match node {
8127 SetRoleVar::Set {
8128 name: binding0,
8129 value: binding1,
8130 } => {
8131 SetRoleVar::Set {
8132 name: folder.fold_ident(binding0),
8133 value: folder.fold_set_variable_to(binding1),
8134 }
8135 }
8136 SetRoleVar::Reset {
8137 name: binding0,
8138 } => {
8139 SetRoleVar::Reset {
8140 name: folder.fold_ident(binding0),
8141 }
8142 }
8143 }
8144}
8145impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SetTransactionStatement {
8146 type Folded = SetTransactionStatement;
8147 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8148 folder.fold_set_transaction_statement(self)
8149 }
8150}
8151#[allow(clippy::needless_pass_by_ref_mut)]
8152pub fn fold_set_transaction_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SetTransactionStatement) -> SetTransactionStatement
8153where
8154 F: Fold<T, T2, > + ?Sized,
8155{
8156 SetTransactionStatement {
8157 local: node.local,
8158 modes: node.modes.into_iter().map(|v| folder.fold_transaction_mode(v)).collect(),
8159 }
8160}
8161impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SetVariableStatement {
8162 type Folded = SetVariableStatement;
8163 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8164 folder.fold_set_variable_statement(self)
8165 }
8166}
8167#[allow(clippy::needless_pass_by_ref_mut)]
8168pub fn fold_set_variable_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SetVariableStatement) -> SetVariableStatement
8169where
8170 F: Fold<T, T2, > + ?Sized,
8171{
8172 SetVariableStatement {
8173 local: node.local,
8174 variable: folder.fold_ident(node.variable),
8175 to: folder.fold_set_variable_to(node.to),
8176 }
8177}
8178impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SetVariableTo {
8179 type Folded = SetVariableTo;
8180 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8181 folder.fold_set_variable_to(self)
8182 }
8183}
8184#[allow(clippy::needless_pass_by_ref_mut)]
8185pub fn fold_set_variable_to<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SetVariableTo) -> SetVariableTo
8186where
8187 F: Fold<T, T2, > + ?Sized,
8188{
8189 match node {
8190 SetVariableTo::Default {
8191 } => {
8192 SetVariableTo::Default {
8193 }
8194 }
8195 SetVariableTo::Values {
8196 0: binding0,
8197 } => {
8198 SetVariableTo::Values {
8199 0: binding0.into_iter().map(|v| folder.fold_set_variable_value(v)).collect(),
8200 }
8201 }
8202 }
8203}
8204impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SetVariableValue {
8205 type Folded = SetVariableValue;
8206 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8207 folder.fold_set_variable_value(self)
8208 }
8209}
8210#[allow(clippy::needless_pass_by_ref_mut)]
8211pub fn fold_set_variable_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SetVariableValue) -> SetVariableValue
8212where
8213 F: Fold<T, T2, > + ?Sized,
8214{
8215 match node {
8216 SetVariableValue::Ident {
8217 0: binding0,
8218 } => {
8219 SetVariableValue::Ident {
8220 0: folder.fold_ident(binding0),
8221 }
8222 }
8223 SetVariableValue::Literal {
8224 0: binding0,
8225 } => {
8226 SetVariableValue::Literal {
8227 0: folder.fold_value(binding0),
8228 }
8229 }
8230 }
8231}
8232impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowColumnsStatement<T> {
8233 type Folded = ShowColumnsStatement<T2>;
8234 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8235 folder.fold_show_columns_statement(self)
8236 }
8237}
8238#[allow(clippy::needless_pass_by_ref_mut)]
8239pub fn fold_show_columns_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowColumnsStatement<T>) -> ShowColumnsStatement<T2>
8240where
8241 F: Fold<T, T2, > + ?Sized,
8242{
8243 ShowColumnsStatement {
8244 table_name: folder.fold_item_name(node.table_name),
8245 filter: node.filter.map(|v| folder.fold_show_statement_filter(v)),
8246 }
8247}
8248impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateClusterStatement<T> {
8249 type Folded = ShowCreateClusterStatement<T2>;
8250 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8251 folder.fold_show_create_cluster_statement(self)
8252 }
8253}
8254#[allow(clippy::needless_pass_by_ref_mut)]
8255pub fn fold_show_create_cluster_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateClusterStatement<T>) -> ShowCreateClusterStatement<T2>
8256where
8257 F: Fold<T, T2, > + ?Sized,
8258{
8259 ShowCreateClusterStatement {
8260 cluster_name: folder.fold_cluster_name(node.cluster_name),
8261 }
8262}
8263impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateConnectionStatement<T> {
8264 type Folded = ShowCreateConnectionStatement<T2>;
8265 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8266 folder.fold_show_create_connection_statement(self)
8267 }
8268}
8269#[allow(clippy::needless_pass_by_ref_mut)]
8270pub fn fold_show_create_connection_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateConnectionStatement<T>) -> ShowCreateConnectionStatement<T2>
8271where
8272 F: Fold<T, T2, > + ?Sized,
8273{
8274 ShowCreateConnectionStatement {
8275 connection_name: folder.fold_item_name(node.connection_name),
8276 redacted: node.redacted,
8277 }
8278}
8279impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateIndexStatement<T> {
8280 type Folded = ShowCreateIndexStatement<T2>;
8281 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8282 folder.fold_show_create_index_statement(self)
8283 }
8284}
8285#[allow(clippy::needless_pass_by_ref_mut)]
8286pub fn fold_show_create_index_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateIndexStatement<T>) -> ShowCreateIndexStatement<T2>
8287where
8288 F: Fold<T, T2, > + ?Sized,
8289{
8290 ShowCreateIndexStatement {
8291 index_name: folder.fold_item_name(node.index_name),
8292 redacted: node.redacted,
8293 }
8294}
8295impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateMaterializedViewStatement<T> {
8296 type Folded = ShowCreateMaterializedViewStatement<T2>;
8297 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8298 folder.fold_show_create_materialized_view_statement(self)
8299 }
8300}
8301#[allow(clippy::needless_pass_by_ref_mut)]
8302pub fn fold_show_create_materialized_view_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateMaterializedViewStatement<T>) -> ShowCreateMaterializedViewStatement<T2>
8303where
8304 F: Fold<T, T2, > + ?Sized,
8305{
8306 ShowCreateMaterializedViewStatement {
8307 materialized_view_name: folder.fold_item_name(node.materialized_view_name),
8308 redacted: node.redacted,
8309 }
8310}
8311impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateMetricSinkStatement<T> {
8312 type Folded = ShowCreateMetricSinkStatement<T2>;
8313 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8314 folder.fold_show_create_metric_sink_statement(self)
8315 }
8316}
8317#[allow(clippy::needless_pass_by_ref_mut)]
8318pub fn fold_show_create_metric_sink_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateMetricSinkStatement<T>) -> ShowCreateMetricSinkStatement<T2>
8319where
8320 F: Fold<T, T2, > + ?Sized,
8321{
8322 ShowCreateMetricSinkStatement {
8323 metric_sink_name: folder.fold_item_name(node.metric_sink_name),
8324 redacted: node.redacted,
8325 }
8326}
8327impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateSinkStatement<T> {
8328 type Folded = ShowCreateSinkStatement<T2>;
8329 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8330 folder.fold_show_create_sink_statement(self)
8331 }
8332}
8333#[allow(clippy::needless_pass_by_ref_mut)]
8334pub fn fold_show_create_sink_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateSinkStatement<T>) -> ShowCreateSinkStatement<T2>
8335where
8336 F: Fold<T, T2, > + ?Sized,
8337{
8338 ShowCreateSinkStatement {
8339 sink_name: folder.fold_item_name(node.sink_name),
8340 redacted: node.redacted,
8341 }
8342}
8343impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateSourceStatement<T> {
8344 type Folded = ShowCreateSourceStatement<T2>;
8345 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8346 folder.fold_show_create_source_statement(self)
8347 }
8348}
8349#[allow(clippy::needless_pass_by_ref_mut)]
8350pub fn fold_show_create_source_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateSourceStatement<T>) -> ShowCreateSourceStatement<T2>
8351where
8352 F: Fold<T, T2, > + ?Sized,
8353{
8354 ShowCreateSourceStatement {
8355 source_name: folder.fold_item_name(node.source_name),
8356 redacted: node.redacted,
8357 }
8358}
8359impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateTableStatement<T> {
8360 type Folded = ShowCreateTableStatement<T2>;
8361 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8362 folder.fold_show_create_table_statement(self)
8363 }
8364}
8365#[allow(clippy::needless_pass_by_ref_mut)]
8366pub fn fold_show_create_table_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateTableStatement<T>) -> ShowCreateTableStatement<T2>
8367where
8368 F: Fold<T, T2, > + ?Sized,
8369{
8370 ShowCreateTableStatement {
8371 table_name: folder.fold_item_name(node.table_name),
8372 redacted: node.redacted,
8373 }
8374}
8375impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateTypeStatement<T> {
8376 type Folded = ShowCreateTypeStatement<T2>;
8377 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8378 folder.fold_show_create_type_statement(self)
8379 }
8380}
8381#[allow(clippy::needless_pass_by_ref_mut)]
8382pub fn fold_show_create_type_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateTypeStatement<T>) -> ShowCreateTypeStatement<T2>
8383where
8384 F: Fold<T, T2, > + ?Sized,
8385{
8386 ShowCreateTypeStatement {
8387 type_name: folder.fold_data_type(node.type_name),
8388 redacted: node.redacted,
8389 }
8390}
8391impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowCreateViewStatement<T> {
8392 type Folded = ShowCreateViewStatement<T2>;
8393 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8394 folder.fold_show_create_view_statement(self)
8395 }
8396}
8397#[allow(clippy::needless_pass_by_ref_mut)]
8398pub fn fold_show_create_view_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowCreateViewStatement<T>) -> ShowCreateViewStatement<T2>
8399where
8400 F: Fold<T, T2, > + ?Sized,
8401{
8402 ShowCreateViewStatement {
8403 view_name: folder.fold_item_name(node.view_name),
8404 redacted: node.redacted,
8405 }
8406}
8407impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowObjectType<T> {
8408 type Folded = ShowObjectType<T2>;
8409 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8410 folder.fold_show_object_type(self)
8411 }
8412}
8413#[allow(clippy::needless_pass_by_ref_mut)]
8414pub fn fold_show_object_type<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowObjectType<T>) -> ShowObjectType<T2>
8415where
8416 F: Fold<T, T2, > + ?Sized,
8417{
8418 match node {
8419 ShowObjectType::MaterializedView {
8420 in_cluster: binding0,
8421 } => {
8422 ShowObjectType::MaterializedView {
8423 in_cluster: binding0.map(|v| folder.fold_cluster_name(v)),
8424 }
8425 }
8426 ShowObjectType::Index {
8427 in_cluster: binding0,
8428 on_object: binding1,
8429 } => {
8430 ShowObjectType::Index {
8431 in_cluster: binding0.map(|v| folder.fold_cluster_name(v)),
8432 on_object: binding1.map(|v| folder.fold_item_name(v)),
8433 }
8434 }
8435 ShowObjectType::Table {
8436 on_source: binding0,
8437 } => {
8438 ShowObjectType::Table {
8439 on_source: binding0.map(|v| folder.fold_item_name(v)),
8440 }
8441 }
8442 ShowObjectType::View {
8443 } => {
8444 ShowObjectType::View {
8445 }
8446 }
8447 ShowObjectType::Source {
8448 in_cluster: binding0,
8449 } => {
8450 ShowObjectType::Source {
8451 in_cluster: binding0.map(|v| folder.fold_cluster_name(v)),
8452 }
8453 }
8454 ShowObjectType::Sink {
8455 in_cluster: binding0,
8456 } => {
8457 ShowObjectType::Sink {
8458 in_cluster: binding0.map(|v| folder.fold_cluster_name(v)),
8459 }
8460 }
8461 ShowObjectType::MetricSink {
8462 in_cluster: binding0,
8463 } => {
8464 ShowObjectType::MetricSink {
8465 in_cluster: binding0.map(|v| folder.fold_cluster_name(v)),
8466 }
8467 }
8468 ShowObjectType::Type {
8469 } => {
8470 ShowObjectType::Type {
8471 }
8472 }
8473 ShowObjectType::Role {
8474 } => {
8475 ShowObjectType::Role {
8476 }
8477 }
8478 ShowObjectType::Cluster {
8479 } => {
8480 ShowObjectType::Cluster {
8481 }
8482 }
8483 ShowObjectType::ClusterReplica {
8484 } => {
8485 ShowObjectType::ClusterReplica {
8486 }
8487 }
8488 ShowObjectType::Object {
8489 } => {
8490 ShowObjectType::Object {
8491 }
8492 }
8493 ShowObjectType::Secret {
8494 } => {
8495 ShowObjectType::Secret {
8496 }
8497 }
8498 ShowObjectType::Connection {
8499 } => {
8500 ShowObjectType::Connection {
8501 }
8502 }
8503 ShowObjectType::Database {
8504 } => {
8505 ShowObjectType::Database {
8506 }
8507 }
8508 ShowObjectType::Schema {
8509 from: binding0,
8510 } => {
8511 ShowObjectType::Schema {
8512 from: binding0.map(|v| folder.fold_database_name(v)),
8513 }
8514 }
8515 ShowObjectType::Subsource {
8516 on_source: binding0,
8517 } => {
8518 ShowObjectType::Subsource {
8519 on_source: binding0.map(|v| folder.fold_item_name(v)),
8520 }
8521 }
8522 ShowObjectType::Privileges {
8523 object_type: binding0,
8524 role: binding1,
8525 } => {
8526 ShowObjectType::Privileges {
8527 object_type: binding0.map(|v| folder.fold_system_object_type(v)),
8528 role: binding1.map(|v| folder.fold_role_name(v)),
8529 }
8530 }
8531 ShowObjectType::DefaultPrivileges {
8532 object_type: binding0,
8533 role: binding1,
8534 } => {
8535 ShowObjectType::DefaultPrivileges {
8536 object_type: binding0.map(|v| folder.fold_object_type(v)),
8537 role: binding1.map(|v| folder.fold_role_name(v)),
8538 }
8539 }
8540 ShowObjectType::RoleMembership {
8541 role: binding0,
8542 } => {
8543 ShowObjectType::RoleMembership {
8544 role: binding0.map(|v| folder.fold_role_name(v)),
8545 }
8546 }
8547 ShowObjectType::NetworkPolicy {
8548 } => {
8549 ShowObjectType::NetworkPolicy {
8550 }
8551 }
8552 }
8553}
8554impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowObjectsStatement<T> {
8555 type Folded = ShowObjectsStatement<T2>;
8556 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8557 folder.fold_show_objects_statement(self)
8558 }
8559}
8560#[allow(clippy::needless_pass_by_ref_mut)]
8561pub fn fold_show_objects_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowObjectsStatement<T>) -> ShowObjectsStatement<T2>
8562where
8563 F: Fold<T, T2, > + ?Sized,
8564{
8565 ShowObjectsStatement {
8566 object_type: folder.fold_show_object_type(node.object_type),
8567 from: node.from.map(|v| folder.fold_schema_name(v)),
8568 filter: node.filter.map(|v| folder.fold_show_statement_filter(v)),
8569 }
8570}
8571impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowStatement<T> {
8572 type Folded = ShowStatement<T2>;
8573 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8574 folder.fold_show_statement(self)
8575 }
8576}
8577#[allow(clippy::needless_pass_by_ref_mut)]
8578pub fn fold_show_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowStatement<T>) -> ShowStatement<T2>
8579where
8580 F: Fold<T, T2, > + ?Sized,
8581{
8582 match node {
8583 ShowStatement::ShowObjects {
8584 0: binding0,
8585 } => {
8586 ShowStatement::ShowObjects {
8587 0: folder.fold_show_objects_statement(binding0),
8588 }
8589 }
8590 ShowStatement::ShowColumns {
8591 0: binding0,
8592 } => {
8593 ShowStatement::ShowColumns {
8594 0: folder.fold_show_columns_statement(binding0),
8595 }
8596 }
8597 ShowStatement::ShowCreateView {
8598 0: binding0,
8599 } => {
8600 ShowStatement::ShowCreateView {
8601 0: folder.fold_show_create_view_statement(binding0),
8602 }
8603 }
8604 ShowStatement::ShowCreateMaterializedView {
8605 0: binding0,
8606 } => {
8607 ShowStatement::ShowCreateMaterializedView {
8608 0: folder.fold_show_create_materialized_view_statement(binding0),
8609 }
8610 }
8611 ShowStatement::ShowCreateSource {
8612 0: binding0,
8613 } => {
8614 ShowStatement::ShowCreateSource {
8615 0: folder.fold_show_create_source_statement(binding0),
8616 }
8617 }
8618 ShowStatement::ShowCreateTable {
8619 0: binding0,
8620 } => {
8621 ShowStatement::ShowCreateTable {
8622 0: folder.fold_show_create_table_statement(binding0),
8623 }
8624 }
8625 ShowStatement::ShowCreateSink {
8626 0: binding0,
8627 } => {
8628 ShowStatement::ShowCreateSink {
8629 0: folder.fold_show_create_sink_statement(binding0),
8630 }
8631 }
8632 ShowStatement::ShowCreateMetricSink {
8633 0: binding0,
8634 } => {
8635 ShowStatement::ShowCreateMetricSink {
8636 0: folder.fold_show_create_metric_sink_statement(binding0),
8637 }
8638 }
8639 ShowStatement::ShowCreateIndex {
8640 0: binding0,
8641 } => {
8642 ShowStatement::ShowCreateIndex {
8643 0: folder.fold_show_create_index_statement(binding0),
8644 }
8645 }
8646 ShowStatement::ShowCreateConnection {
8647 0: binding0,
8648 } => {
8649 ShowStatement::ShowCreateConnection {
8650 0: folder.fold_show_create_connection_statement(binding0),
8651 }
8652 }
8653 ShowStatement::ShowCreateCluster {
8654 0: binding0,
8655 } => {
8656 ShowStatement::ShowCreateCluster {
8657 0: folder.fold_show_create_cluster_statement(binding0),
8658 }
8659 }
8660 ShowStatement::ShowCreateType {
8661 0: binding0,
8662 } => {
8663 ShowStatement::ShowCreateType {
8664 0: folder.fold_show_create_type_statement(binding0),
8665 }
8666 }
8667 ShowStatement::ShowVariable {
8668 0: binding0,
8669 } => {
8670 ShowStatement::ShowVariable {
8671 0: folder.fold_show_variable_statement(binding0),
8672 }
8673 }
8674 ShowStatement::InspectShard {
8675 0: binding0,
8676 } => {
8677 ShowStatement::InspectShard {
8678 0: folder.fold_inspect_shard_statement(binding0),
8679 }
8680 }
8681 }
8682}
8683impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowStatementFilter<T> {
8684 type Folded = ShowStatementFilter<T2>;
8685 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8686 folder.fold_show_statement_filter(self)
8687 }
8688}
8689#[allow(clippy::needless_pass_by_ref_mut)]
8690pub fn fold_show_statement_filter<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowStatementFilter<T>) -> ShowStatementFilter<T2>
8691where
8692 F: Fold<T, T2, > + ?Sized,
8693{
8694 match node {
8695 ShowStatementFilter::Like {
8696 0: binding0,
8697 } => {
8698 ShowStatementFilter::Like {
8699 0: binding0,
8700 }
8701 }
8702 ShowStatementFilter::Where {
8703 0: binding0,
8704 } => {
8705 ShowStatementFilter::Where {
8706 0: folder.fold_expr(binding0),
8707 }
8708 }
8709 }
8710}
8711impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ShowVariableStatement {
8712 type Folded = ShowVariableStatement;
8713 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8714 folder.fold_show_variable_statement(self)
8715 }
8716}
8717#[allow(clippy::needless_pass_by_ref_mut)]
8718pub fn fold_show_variable_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ShowVariableStatement) -> ShowVariableStatement
8719where
8720 F: Fold<T, T2, > + ?Sized,
8721{
8722 ShowVariableStatement {
8723 variable: folder.fold_ident(node.variable),
8724 }
8725}
8726impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SinkEnvelope {
8727 type Folded = SinkEnvelope;
8728 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8729 folder.fold_sink_envelope(self)
8730 }
8731}
8732#[allow(clippy::needless_pass_by_ref_mut)]
8733pub fn fold_sink_envelope<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SinkEnvelope) -> SinkEnvelope
8734where
8735 F: Fold<T, T2, > + ?Sized,
8736{
8737 match node {
8738 SinkEnvelope::Debezium {
8739 } => {
8740 SinkEnvelope::Debezium {
8741 }
8742 }
8743 SinkEnvelope::Upsert {
8744 } => {
8745 SinkEnvelope::Upsert {
8746 }
8747 }
8748 }
8749}
8750impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SinkKey {
8751 type Folded = SinkKey;
8752 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8753 folder.fold_sink_key(self)
8754 }
8755}
8756#[allow(clippy::needless_pass_by_ref_mut)]
8757pub fn fold_sink_key<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SinkKey) -> SinkKey
8758where
8759 F: Fold<T, T2, > + ?Sized,
8760{
8761 SinkKey {
8762 key_columns: node.key_columns.into_iter().map(|v| folder.fold_ident(v)).collect(),
8763 not_enforced: node.not_enforced,
8764 }
8765}
8766impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SourceEnvelope {
8767 type Folded = SourceEnvelope;
8768 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8769 folder.fold_source_envelope(self)
8770 }
8771}
8772#[allow(clippy::needless_pass_by_ref_mut)]
8773pub fn fold_source_envelope<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SourceEnvelope) -> SourceEnvelope
8774where
8775 F: Fold<T, T2, > + ?Sized,
8776{
8777 match node {
8778 SourceEnvelope::None {
8779 } => {
8780 SourceEnvelope::None {
8781 }
8782 }
8783 SourceEnvelope::Debezium {
8784 } => {
8785 SourceEnvelope::Debezium {
8786 }
8787 }
8788 SourceEnvelope::Upsert {
8789 value_decode_err_policy: binding0,
8790 } => {
8791 SourceEnvelope::Upsert {
8792 value_decode_err_policy: binding0.into_iter().map(|v| folder.fold_source_error_policy(v)).collect(),
8793 }
8794 }
8795 SourceEnvelope::CdcV2 {
8796 } => {
8797 SourceEnvelope::CdcV2 {
8798 }
8799 }
8800 }
8801}
8802impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SourceErrorPolicy {
8803 type Folded = SourceErrorPolicy;
8804 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8805 folder.fold_source_error_policy(self)
8806 }
8807}
8808#[allow(clippy::needless_pass_by_ref_mut)]
8809pub fn fold_source_error_policy<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SourceErrorPolicy) -> SourceErrorPolicy
8810where
8811 F: Fold<T, T2, > + ?Sized,
8812{
8813 match node {
8814 SourceErrorPolicy::Inline {
8815 alias: binding0,
8816 } => {
8817 SourceErrorPolicy::Inline {
8818 alias: binding0.map(|v| folder.fold_ident(v)),
8819 }
8820 }
8821 }
8822}
8823impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SourceIncludeMetadata {
8824 type Folded = SourceIncludeMetadata;
8825 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8826 folder.fold_source_include_metadata(self)
8827 }
8828}
8829#[allow(clippy::needless_pass_by_ref_mut)]
8830pub fn fold_source_include_metadata<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SourceIncludeMetadata) -> SourceIncludeMetadata
8831where
8832 F: Fold<T, T2, > + ?Sized,
8833{
8834 match node {
8835 SourceIncludeMetadata::Key {
8836 alias: binding0,
8837 } => {
8838 SourceIncludeMetadata::Key {
8839 alias: binding0.map(|v| folder.fold_ident(v)),
8840 }
8841 }
8842 SourceIncludeMetadata::Timestamp {
8843 alias: binding0,
8844 } => {
8845 SourceIncludeMetadata::Timestamp {
8846 alias: binding0.map(|v| folder.fold_ident(v)),
8847 }
8848 }
8849 SourceIncludeMetadata::Partition {
8850 alias: binding0,
8851 } => {
8852 SourceIncludeMetadata::Partition {
8853 alias: binding0.map(|v| folder.fold_ident(v)),
8854 }
8855 }
8856 SourceIncludeMetadata::Offset {
8857 alias: binding0,
8858 } => {
8859 SourceIncludeMetadata::Offset {
8860 alias: binding0.map(|v| folder.fold_ident(v)),
8861 }
8862 }
8863 SourceIncludeMetadata::Headers {
8864 alias: binding0,
8865 } => {
8866 SourceIncludeMetadata::Headers {
8867 alias: binding0.map(|v| folder.fold_ident(v)),
8868 }
8869 }
8870 SourceIncludeMetadata::Header {
8871 key: binding0,
8872 alias: binding1,
8873 use_bytes: binding2,
8874 } => {
8875 SourceIncludeMetadata::Header {
8876 key: binding0,
8877 alias: folder.fold_ident(binding1),
8878 use_bytes: binding2,
8879 }
8880 }
8881 }
8882}
8883impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SqlServerConfigOption<T> {
8884 type Folded = SqlServerConfigOption<T2>;
8885 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8886 folder.fold_sql_server_config_option(self)
8887 }
8888}
8889#[allow(clippy::needless_pass_by_ref_mut)]
8890pub fn fold_sql_server_config_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SqlServerConfigOption<T>) -> SqlServerConfigOption<T2>
8891where
8892 F: Fold<T, T2, > + ?Sized,
8893{
8894 SqlServerConfigOption {
8895 name: folder.fold_sql_server_config_option_name(node.name),
8896 value: node.value.map(|v| folder.fold_with_option_value(v)),
8897 }
8898}
8899impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SqlServerConfigOptionName {
8900 type Folded = SqlServerConfigOptionName;
8901 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8902 folder.fold_sql_server_config_option_name(self)
8903 }
8904}
8905#[allow(clippy::needless_pass_by_ref_mut)]
8906pub fn fold_sql_server_config_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SqlServerConfigOptionName) -> SqlServerConfigOptionName
8907where
8908 F: Fold<T, T2, > + ?Sized,
8909{
8910 match node {
8911 SqlServerConfigOptionName::Details {
8912 } => {
8913 SqlServerConfigOptionName::Details {
8914 }
8915 }
8916 SqlServerConfigOptionName::TextColumns {
8917 } => {
8918 SqlServerConfigOptionName::TextColumns {
8919 }
8920 }
8921 SqlServerConfigOptionName::ExcludeColumns {
8922 } => {
8923 SqlServerConfigOptionName::ExcludeColumns {
8924 }
8925 }
8926 }
8927}
8928impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for StartTransactionStatement {
8929 type Folded = StartTransactionStatement;
8930 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8931 folder.fold_start_transaction_statement(self)
8932 }
8933}
8934#[allow(clippy::needless_pass_by_ref_mut)]
8935pub fn fold_start_transaction_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: StartTransactionStatement) -> StartTransactionStatement
8936where
8937 F: Fold<T, T2, > + ?Sized,
8938{
8939 StartTransactionStatement {
8940 modes: node.modes.into_iter().map(|v| folder.fold_transaction_mode(v)).collect(),
8941 }
8942}
8943impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Statement<T> {
8944 type Folded = Statement<T2>;
8945 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
8946 folder.fold_statement(self)
8947 }
8948}
8949#[allow(clippy::needless_pass_by_ref_mut)]
8950pub fn fold_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Statement<T>) -> Statement<T2>
8951where
8952 F: Fold<T, T2, > + ?Sized,
8953{
8954 match node {
8955 Statement::Select {
8956 0: binding0,
8957 } => {
8958 Statement::Select {
8959 0: folder.fold_select_statement(binding0),
8960 }
8961 }
8962 Statement::Insert {
8963 0: binding0,
8964 } => {
8965 Statement::Insert {
8966 0: folder.fold_insert_statement(binding0),
8967 }
8968 }
8969 Statement::Copy {
8970 0: binding0,
8971 } => {
8972 Statement::Copy {
8973 0: folder.fold_copy_statement(binding0),
8974 }
8975 }
8976 Statement::Update {
8977 0: binding0,
8978 } => {
8979 Statement::Update {
8980 0: folder.fold_update_statement(binding0),
8981 }
8982 }
8983 Statement::Delete {
8984 0: binding0,
8985 } => {
8986 Statement::Delete {
8987 0: folder.fold_delete_statement(binding0),
8988 }
8989 }
8990 Statement::CreateConnection {
8991 0: binding0,
8992 } => {
8993 Statement::CreateConnection {
8994 0: folder.fold_create_connection_statement(binding0),
8995 }
8996 }
8997 Statement::CreateDatabase {
8998 0: binding0,
8999 } => {
9000 Statement::CreateDatabase {
9001 0: folder.fold_create_database_statement(binding0),
9002 }
9003 }
9004 Statement::CreateSchema {
9005 0: binding0,
9006 } => {
9007 Statement::CreateSchema {
9008 0: folder.fold_create_schema_statement(binding0),
9009 }
9010 }
9011 Statement::CreateWebhookSource {
9012 0: binding0,
9013 } => {
9014 Statement::CreateWebhookSource {
9015 0: folder.fold_create_webhook_source_statement(binding0),
9016 }
9017 }
9018 Statement::CreateSource {
9019 0: binding0,
9020 } => {
9021 Statement::CreateSource {
9022 0: folder.fold_create_source_statement(binding0),
9023 }
9024 }
9025 Statement::CreateSubsource {
9026 0: binding0,
9027 } => {
9028 Statement::CreateSubsource {
9029 0: folder.fold_create_subsource_statement(binding0),
9030 }
9031 }
9032 Statement::CreateSink {
9033 0: binding0,
9034 } => {
9035 Statement::CreateSink {
9036 0: folder.fold_create_sink_statement(binding0),
9037 }
9038 }
9039 Statement::CreateMetricSink {
9040 0: binding0,
9041 } => {
9042 Statement::CreateMetricSink {
9043 0: folder.fold_create_metric_sink_statement(binding0),
9044 }
9045 }
9046 Statement::CreateView {
9047 0: binding0,
9048 } => {
9049 Statement::CreateView {
9050 0: folder.fold_create_view_statement(binding0),
9051 }
9052 }
9053 Statement::CreateMaterializedView {
9054 0: binding0,
9055 } => {
9056 Statement::CreateMaterializedView {
9057 0: folder.fold_create_materialized_view_statement(binding0),
9058 }
9059 }
9060 Statement::CreateTable {
9061 0: binding0,
9062 } => {
9063 Statement::CreateTable {
9064 0: folder.fold_create_table_statement(binding0),
9065 }
9066 }
9067 Statement::CreateTableFromSource {
9068 0: binding0,
9069 } => {
9070 Statement::CreateTableFromSource {
9071 0: folder.fold_create_table_from_source_statement(binding0),
9072 }
9073 }
9074 Statement::CreateIndex {
9075 0: binding0,
9076 } => {
9077 Statement::CreateIndex {
9078 0: folder.fold_create_index_statement(binding0),
9079 }
9080 }
9081 Statement::CreateType {
9082 0: binding0,
9083 } => {
9084 Statement::CreateType {
9085 0: folder.fold_create_type_statement(binding0),
9086 }
9087 }
9088 Statement::CreateRole {
9089 0: binding0,
9090 } => {
9091 Statement::CreateRole {
9092 0: folder.fold_create_role_statement(binding0),
9093 }
9094 }
9095 Statement::CreateCluster {
9096 0: binding0,
9097 } => {
9098 Statement::CreateCluster {
9099 0: folder.fold_create_cluster_statement(binding0),
9100 }
9101 }
9102 Statement::CreateClusterReplica {
9103 0: binding0,
9104 } => {
9105 Statement::CreateClusterReplica {
9106 0: folder.fold_create_cluster_replica_statement(binding0),
9107 }
9108 }
9109 Statement::CreateSecret {
9110 0: binding0,
9111 } => {
9112 Statement::CreateSecret {
9113 0: folder.fold_create_secret_statement(binding0),
9114 }
9115 }
9116 Statement::CreateNetworkPolicy {
9117 0: binding0,
9118 } => {
9119 Statement::CreateNetworkPolicy {
9120 0: folder.fold_create_network_policy_statement(binding0),
9121 }
9122 }
9123 Statement::AlterCluster {
9124 0: binding0,
9125 } => {
9126 Statement::AlterCluster {
9127 0: folder.fold_alter_cluster_statement(binding0),
9128 }
9129 }
9130 Statement::AlterOwner {
9131 0: binding0,
9132 } => {
9133 Statement::AlterOwner {
9134 0: folder.fold_alter_owner_statement(binding0),
9135 }
9136 }
9137 Statement::AlterObjectRename {
9138 0: binding0,
9139 } => {
9140 Statement::AlterObjectRename {
9141 0: folder.fold_alter_object_rename_statement(binding0),
9142 }
9143 }
9144 Statement::AlterObjectSwap {
9145 0: binding0,
9146 } => {
9147 Statement::AlterObjectSwap {
9148 0: folder.fold_alter_object_swap_statement(binding0),
9149 }
9150 }
9151 Statement::AlterRetainHistory {
9152 0: binding0,
9153 } => {
9154 Statement::AlterRetainHistory {
9155 0: folder.fold_alter_retain_history_statement(binding0),
9156 }
9157 }
9158 Statement::AlterIndex {
9159 0: binding0,
9160 } => {
9161 Statement::AlterIndex {
9162 0: folder.fold_alter_index_statement(binding0),
9163 }
9164 }
9165 Statement::AlterSecret {
9166 0: binding0,
9167 } => {
9168 Statement::AlterSecret {
9169 0: folder.fold_alter_secret_statement(binding0),
9170 }
9171 }
9172 Statement::AlterSetCluster {
9173 0: binding0,
9174 } => {
9175 Statement::AlterSetCluster {
9176 0: folder.fold_alter_set_cluster_statement(binding0),
9177 }
9178 }
9179 Statement::AlterSink {
9180 0: binding0,
9181 } => {
9182 Statement::AlterSink {
9183 0: folder.fold_alter_sink_statement(binding0),
9184 }
9185 }
9186 Statement::AlterSource {
9187 0: binding0,
9188 } => {
9189 Statement::AlterSource {
9190 0: folder.fold_alter_source_statement(binding0),
9191 }
9192 }
9193 Statement::AlterSystemSet {
9194 0: binding0,
9195 } => {
9196 Statement::AlterSystemSet {
9197 0: folder.fold_alter_system_set_statement(binding0),
9198 }
9199 }
9200 Statement::AlterSystemReset {
9201 0: binding0,
9202 } => {
9203 Statement::AlterSystemReset {
9204 0: folder.fold_alter_system_reset_statement(binding0),
9205 }
9206 }
9207 Statement::AlterSystemResetAll {
9208 0: binding0,
9209 } => {
9210 Statement::AlterSystemResetAll {
9211 0: folder.fold_alter_system_reset_all_statement(binding0),
9212 }
9213 }
9214 Statement::AlterConnection {
9215 0: binding0,
9216 } => {
9217 Statement::AlterConnection {
9218 0: folder.fold_alter_connection_statement(binding0),
9219 }
9220 }
9221 Statement::AlterNetworkPolicy {
9222 0: binding0,
9223 } => {
9224 Statement::AlterNetworkPolicy {
9225 0: folder.fold_alter_network_policy_statement(binding0),
9226 }
9227 }
9228 Statement::AlterRole {
9229 0: binding0,
9230 } => {
9231 Statement::AlterRole {
9232 0: folder.fold_alter_role_statement(binding0),
9233 }
9234 }
9235 Statement::AlterTableAddColumn {
9236 0: binding0,
9237 } => {
9238 Statement::AlterTableAddColumn {
9239 0: folder.fold_alter_table_add_column_statement(binding0),
9240 }
9241 }
9242 Statement::AlterMaterializedViewApplyReplacement {
9243 0: binding0,
9244 } => {
9245 Statement::AlterMaterializedViewApplyReplacement {
9246 0: folder.fold_alter_materialized_view_apply_replacement_statement(binding0),
9247 }
9248 }
9249 Statement::Discard {
9250 0: binding0,
9251 } => {
9252 Statement::Discard {
9253 0: folder.fold_discard_statement(binding0),
9254 }
9255 }
9256 Statement::DropObjects {
9257 0: binding0,
9258 } => {
9259 Statement::DropObjects {
9260 0: folder.fold_drop_objects_statement(binding0),
9261 }
9262 }
9263 Statement::DropOwned {
9264 0: binding0,
9265 } => {
9266 Statement::DropOwned {
9267 0: folder.fold_drop_owned_statement(binding0),
9268 }
9269 }
9270 Statement::SetVariable {
9271 0: binding0,
9272 } => {
9273 Statement::SetVariable {
9274 0: folder.fold_set_variable_statement(binding0),
9275 }
9276 }
9277 Statement::ResetVariable {
9278 0: binding0,
9279 } => {
9280 Statement::ResetVariable {
9281 0: folder.fold_reset_variable_statement(binding0),
9282 }
9283 }
9284 Statement::Show {
9285 0: binding0,
9286 } => {
9287 Statement::Show {
9288 0: folder.fold_show_statement(binding0),
9289 }
9290 }
9291 Statement::StartTransaction {
9292 0: binding0,
9293 } => {
9294 Statement::StartTransaction {
9295 0: folder.fold_start_transaction_statement(binding0),
9296 }
9297 }
9298 Statement::SetTransaction {
9299 0: binding0,
9300 } => {
9301 Statement::SetTransaction {
9302 0: folder.fold_set_transaction_statement(binding0),
9303 }
9304 }
9305 Statement::Commit {
9306 0: binding0,
9307 } => {
9308 Statement::Commit {
9309 0: folder.fold_commit_statement(binding0),
9310 }
9311 }
9312 Statement::Rollback {
9313 0: binding0,
9314 } => {
9315 Statement::Rollback {
9316 0: folder.fold_rollback_statement(binding0),
9317 }
9318 }
9319 Statement::Subscribe {
9320 0: binding0,
9321 } => {
9322 Statement::Subscribe {
9323 0: folder.fold_subscribe_statement(binding0),
9324 }
9325 }
9326 Statement::ExplainPlan {
9327 0: binding0,
9328 } => {
9329 Statement::ExplainPlan {
9330 0: folder.fold_explain_plan_statement(binding0),
9331 }
9332 }
9333 Statement::ExplainPushdown {
9334 0: binding0,
9335 } => {
9336 Statement::ExplainPushdown {
9337 0: folder.fold_explain_pushdown_statement(binding0),
9338 }
9339 }
9340 Statement::ExplainTimestamp {
9341 0: binding0,
9342 } => {
9343 Statement::ExplainTimestamp {
9344 0: folder.fold_explain_timestamp_statement(binding0),
9345 }
9346 }
9347 Statement::ExplainSinkSchema {
9348 0: binding0,
9349 } => {
9350 Statement::ExplainSinkSchema {
9351 0: folder.fold_explain_sink_schema_statement(binding0),
9352 }
9353 }
9354 Statement::ExplainAnalyzeObject {
9355 0: binding0,
9356 } => {
9357 Statement::ExplainAnalyzeObject {
9358 0: folder.fold_explain_analyze_object_statement(binding0),
9359 }
9360 }
9361 Statement::ExplainAnalyzeCluster {
9362 0: binding0,
9363 } => {
9364 Statement::ExplainAnalyzeCluster {
9365 0: folder.fold_explain_analyze_cluster_statement(binding0),
9366 }
9367 }
9368 Statement::Declare {
9369 0: binding0,
9370 } => {
9371 Statement::Declare {
9372 0: folder.fold_declare_statement(binding0),
9373 }
9374 }
9375 Statement::Fetch {
9376 0: binding0,
9377 } => {
9378 Statement::Fetch {
9379 0: folder.fold_fetch_statement(binding0),
9380 }
9381 }
9382 Statement::Close {
9383 0: binding0,
9384 } => {
9385 Statement::Close {
9386 0: folder.fold_close_statement(binding0),
9387 }
9388 }
9389 Statement::Prepare {
9390 0: binding0,
9391 } => {
9392 Statement::Prepare {
9393 0: folder.fold_prepare_statement(binding0),
9394 }
9395 }
9396 Statement::Execute {
9397 0: binding0,
9398 } => {
9399 Statement::Execute {
9400 0: folder.fold_execute_statement(binding0),
9401 }
9402 }
9403 Statement::ExecuteUnitTest {
9404 0: binding0,
9405 } => {
9406 Statement::ExecuteUnitTest {
9407 0: folder.fold_execute_unit_test_statement(binding0),
9408 }
9409 }
9410 Statement::Deallocate {
9411 0: binding0,
9412 } => {
9413 Statement::Deallocate {
9414 0: folder.fold_deallocate_statement(binding0),
9415 }
9416 }
9417 Statement::Raise {
9418 0: binding0,
9419 } => {
9420 Statement::Raise {
9421 0: folder.fold_raise_statement(binding0),
9422 }
9423 }
9424 Statement::GrantRole {
9425 0: binding0,
9426 } => {
9427 Statement::GrantRole {
9428 0: folder.fold_grant_role_statement(binding0),
9429 }
9430 }
9431 Statement::RevokeRole {
9432 0: binding0,
9433 } => {
9434 Statement::RevokeRole {
9435 0: folder.fold_revoke_role_statement(binding0),
9436 }
9437 }
9438 Statement::GrantPrivileges {
9439 0: binding0,
9440 } => {
9441 Statement::GrantPrivileges {
9442 0: folder.fold_grant_privileges_statement(binding0),
9443 }
9444 }
9445 Statement::RevokePrivileges {
9446 0: binding0,
9447 } => {
9448 Statement::RevokePrivileges {
9449 0: folder.fold_revoke_privileges_statement(binding0),
9450 }
9451 }
9452 Statement::AlterDefaultPrivileges {
9453 0: binding0,
9454 } => {
9455 Statement::AlterDefaultPrivileges {
9456 0: folder.fold_alter_default_privileges_statement(binding0),
9457 }
9458 }
9459 Statement::ReassignOwned {
9460 0: binding0,
9461 } => {
9462 Statement::ReassignOwned {
9463 0: folder.fold_reassign_owned_statement(binding0),
9464 }
9465 }
9466 Statement::ValidateConnection {
9467 0: binding0,
9468 } => {
9469 Statement::ValidateConnection {
9470 0: folder.fold_validate_connection_statement(binding0),
9471 }
9472 }
9473 Statement::Comment {
9474 0: binding0,
9475 } => {
9476 Statement::Comment {
9477 0: folder.fold_comment_statement(binding0),
9478 }
9479 }
9480 }
9481}
9482impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SubscribeOption<T> {
9483 type Folded = SubscribeOption<T2>;
9484 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9485 folder.fold_subscribe_option(self)
9486 }
9487}
9488#[allow(clippy::needless_pass_by_ref_mut)]
9489pub fn fold_subscribe_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SubscribeOption<T>) -> SubscribeOption<T2>
9490where
9491 F: Fold<T, T2, > + ?Sized,
9492{
9493 SubscribeOption {
9494 name: folder.fold_subscribe_option_name(node.name),
9495 value: node.value.map(|v| folder.fold_with_option_value(v)),
9496 }
9497}
9498impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SubscribeOptionName {
9499 type Folded = SubscribeOptionName;
9500 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9501 folder.fold_subscribe_option_name(self)
9502 }
9503}
9504#[allow(clippy::needless_pass_by_ref_mut)]
9505pub fn fold_subscribe_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SubscribeOptionName) -> SubscribeOptionName
9506where
9507 F: Fold<T, T2, > + ?Sized,
9508{
9509 match node {
9510 SubscribeOptionName::Snapshot {
9511 } => {
9512 SubscribeOptionName::Snapshot {
9513 }
9514 }
9515 SubscribeOptionName::Progress {
9516 } => {
9517 SubscribeOptionName::Progress {
9518 }
9519 }
9520 }
9521}
9522impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SubscribeOutput<T> {
9523 type Folded = SubscribeOutput<T2>;
9524 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9525 folder.fold_subscribe_output(self)
9526 }
9527}
9528#[allow(clippy::needless_pass_by_ref_mut)]
9529pub fn fold_subscribe_output<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SubscribeOutput<T>) -> SubscribeOutput<T2>
9530where
9531 F: Fold<T, T2, > + ?Sized,
9532{
9533 match node {
9534 SubscribeOutput::Diffs {
9535 } => {
9536 SubscribeOutput::Diffs {
9537 }
9538 }
9539 SubscribeOutput::WithinTimestampOrderBy {
9540 order_by: binding0,
9541 } => {
9542 SubscribeOutput::WithinTimestampOrderBy {
9543 order_by: binding0.into_iter().map(|v| folder.fold_order_by_expr(v)).collect(),
9544 }
9545 }
9546 SubscribeOutput::EnvelopeUpsert {
9547 key_columns: binding0,
9548 } => {
9549 SubscribeOutput::EnvelopeUpsert {
9550 key_columns: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
9551 }
9552 }
9553 SubscribeOutput::EnvelopeDebezium {
9554 key_columns: binding0,
9555 } => {
9556 SubscribeOutput::EnvelopeDebezium {
9557 key_columns: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
9558 }
9559 }
9560 }
9561}
9562impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SubscribeRelation<T> {
9563 type Folded = SubscribeRelation<T2>;
9564 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9565 folder.fold_subscribe_relation(self)
9566 }
9567}
9568#[allow(clippy::needless_pass_by_ref_mut)]
9569pub fn fold_subscribe_relation<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SubscribeRelation<T>) -> SubscribeRelation<T2>
9570where
9571 F: Fold<T, T2, > + ?Sized,
9572{
9573 match node {
9574 SubscribeRelation::Name {
9575 0: binding0,
9576 } => {
9577 SubscribeRelation::Name {
9578 0: folder.fold_item_name(binding0),
9579 }
9580 }
9581 SubscribeRelation::Query {
9582 0: binding0,
9583 } => {
9584 SubscribeRelation::Query {
9585 0: folder.fold_query(binding0),
9586 }
9587 }
9588 }
9589}
9590impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SubscribeStatement<T> {
9591 type Folded = SubscribeStatement<T2>;
9592 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9593 folder.fold_subscribe_statement(self)
9594 }
9595}
9596#[allow(clippy::needless_pass_by_ref_mut)]
9597pub fn fold_subscribe_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SubscribeStatement<T>) -> SubscribeStatement<T2>
9598where
9599 F: Fold<T, T2, > + ?Sized,
9600{
9601 SubscribeStatement {
9602 relation: folder.fold_subscribe_relation(node.relation),
9603 options: node.options.into_iter().map(|v| folder.fold_subscribe_option(v)).collect(),
9604 as_of: node.as_of.map(|v| folder.fold_as_of(v)),
9605 up_to: node.up_to.map(|v| folder.fold_expr(v)),
9606 output: folder.fold_subscribe_output(node.output),
9607 }
9608}
9609impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SubscriptPosition<T> {
9610 type Folded = SubscriptPosition<T2>;
9611 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9612 folder.fold_subscript_position(self)
9613 }
9614}
9615#[allow(clippy::needless_pass_by_ref_mut)]
9616pub fn fold_subscript_position<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SubscriptPosition<T>) -> SubscriptPosition<T2>
9617where
9618 F: Fold<T, T2, > + ?Sized,
9619{
9620 SubscriptPosition {
9621 start: node.start.map(|v| folder.fold_expr(v)),
9622 end: node.end.map(|v| folder.fold_expr(v)),
9623 explicit_slice: node.explicit_slice,
9624 }
9625}
9626impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for SystemObjectType {
9627 type Folded = SystemObjectType;
9628 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9629 folder.fold_system_object_type(self)
9630 }
9631}
9632#[allow(clippy::needless_pass_by_ref_mut)]
9633pub fn fold_system_object_type<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: SystemObjectType) -> SystemObjectType
9634where
9635 F: Fold<T, T2, > + ?Sized,
9636{
9637 match node {
9638 SystemObjectType::System {
9639 } => {
9640 SystemObjectType::System {
9641 }
9642 }
9643 SystemObjectType::Object {
9644 0: binding0,
9645 } => {
9646 SystemObjectType::Object {
9647 0: folder.fold_object_type(binding0),
9648 }
9649 }
9650 }
9651}
9652impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableAlias {
9653 type Folded = TableAlias;
9654 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9655 folder.fold_table_alias(self)
9656 }
9657}
9658#[allow(clippy::needless_pass_by_ref_mut)]
9659pub fn fold_table_alias<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableAlias) -> TableAlias
9660where
9661 F: Fold<T, T2, > + ?Sized,
9662{
9663 TableAlias {
9664 name: folder.fold_ident(node.name),
9665 columns: node.columns.into_iter().map(|v| folder.fold_ident(v)).collect(),
9666 strict: node.strict,
9667 }
9668}
9669impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableConstraint<T> {
9670 type Folded = TableConstraint<T2>;
9671 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9672 folder.fold_table_constraint(self)
9673 }
9674}
9675#[allow(clippy::needless_pass_by_ref_mut)]
9676pub fn fold_table_constraint<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableConstraint<T>) -> TableConstraint<T2>
9677where
9678 F: Fold<T, T2, > + ?Sized,
9679{
9680 match node {
9681 TableConstraint::Unique {
9682 name: binding0,
9683 columns: binding1,
9684 is_primary: binding2,
9685 nulls_not_distinct: binding3,
9686 } => {
9687 TableConstraint::Unique {
9688 name: binding0.map(|v| folder.fold_ident(v)),
9689 columns: binding1.into_iter().map(|v| folder.fold_ident(v)).collect(),
9690 is_primary: binding2,
9691 nulls_not_distinct: binding3,
9692 }
9693 }
9694 TableConstraint::ForeignKey {
9695 name: binding0,
9696 columns: binding1,
9697 foreign_table: binding2,
9698 referred_columns: binding3,
9699 } => {
9700 TableConstraint::ForeignKey {
9701 name: binding0.map(|v| folder.fold_ident(v)),
9702 columns: binding1.into_iter().map(|v| folder.fold_ident(v)).collect(),
9703 foreign_table: folder.fold_item_name(binding2),
9704 referred_columns: binding3.into_iter().map(|v| folder.fold_ident(v)).collect(),
9705 }
9706 }
9707 TableConstraint::Check {
9708 name: binding0,
9709 expr: binding1,
9710 } => {
9711 TableConstraint::Check {
9712 name: binding0.map(|v| folder.fold_ident(v)),
9713 expr: Box::new(folder.fold_expr(*binding1)),
9714 }
9715 }
9716 }
9717}
9718impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableFactor<T> {
9719 type Folded = TableFactor<T2>;
9720 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9721 folder.fold_table_factor(self)
9722 }
9723}
9724#[allow(clippy::needless_pass_by_ref_mut)]
9725pub fn fold_table_factor<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableFactor<T>) -> TableFactor<T2>
9726where
9727 F: Fold<T, T2, > + ?Sized,
9728{
9729 match node {
9730 TableFactor::Table {
9731 name: binding0,
9732 alias: binding1,
9733 } => {
9734 TableFactor::Table {
9735 name: folder.fold_item_name(binding0),
9736 alias: binding1.map(|v| folder.fold_table_alias(v)),
9737 }
9738 }
9739 TableFactor::Function {
9740 function: binding0,
9741 alias: binding1,
9742 with_ordinality: binding2,
9743 } => {
9744 TableFactor::Function {
9745 function: folder.fold_function(binding0),
9746 alias: binding1.map(|v| folder.fold_table_alias(v)),
9747 with_ordinality: binding2,
9748 }
9749 }
9750 TableFactor::RowsFrom {
9751 functions: binding0,
9752 alias: binding1,
9753 with_ordinality: binding2,
9754 } => {
9755 TableFactor::RowsFrom {
9756 functions: binding0.into_iter().map(|v| folder.fold_function(v)).collect(),
9757 alias: binding1.map(|v| folder.fold_table_alias(v)),
9758 with_ordinality: binding2,
9759 }
9760 }
9761 TableFactor::Derived {
9762 lateral: binding0,
9763 subquery: binding1,
9764 alias: binding2,
9765 } => {
9766 TableFactor::Derived {
9767 lateral: binding0,
9768 subquery: Box::new(folder.fold_query(*binding1)),
9769 alias: binding2.map(|v| folder.fold_table_alias(v)),
9770 }
9771 }
9772 TableFactor::NestedJoin {
9773 join: binding0,
9774 alias: binding1,
9775 } => {
9776 TableFactor::NestedJoin {
9777 join: Box::new(folder.fold_table_with_joins(*binding0)),
9778 alias: binding1.map(|v| folder.fold_table_alias(v)),
9779 }
9780 }
9781 }
9782}
9783impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableFromSourceColumns<T> {
9784 type Folded = TableFromSourceColumns<T2>;
9785 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9786 folder.fold_table_from_source_columns(self)
9787 }
9788}
9789#[allow(clippy::needless_pass_by_ref_mut)]
9790pub fn fold_table_from_source_columns<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableFromSourceColumns<T>) -> TableFromSourceColumns<T2>
9791where
9792 F: Fold<T, T2, > + ?Sized,
9793{
9794 match node {
9795 TableFromSourceColumns::NotSpecified {
9796 } => {
9797 TableFromSourceColumns::NotSpecified {
9798 }
9799 }
9800 TableFromSourceColumns::Named {
9801 0: binding0,
9802 } => {
9803 TableFromSourceColumns::Named {
9804 0: binding0.into_iter().map(|v| folder.fold_ident(v)).collect(),
9805 }
9806 }
9807 TableFromSourceColumns::Defined {
9808 0: binding0,
9809 } => {
9810 TableFromSourceColumns::Defined {
9811 0: binding0.into_iter().map(|v| folder.fold_column_def(v)).collect(),
9812 }
9813 }
9814 }
9815}
9816impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableFromSourceOption<T> {
9817 type Folded = TableFromSourceOption<T2>;
9818 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9819 folder.fold_table_from_source_option(self)
9820 }
9821}
9822#[allow(clippy::needless_pass_by_ref_mut)]
9823pub fn fold_table_from_source_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableFromSourceOption<T>) -> TableFromSourceOption<T2>
9824where
9825 F: Fold<T, T2, > + ?Sized,
9826{
9827 TableFromSourceOption {
9828 name: folder.fold_table_from_source_option_name(node.name),
9829 value: node.value.map(|v| folder.fold_with_option_value(v)),
9830 }
9831}
9832impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableFromSourceOptionName {
9833 type Folded = TableFromSourceOptionName;
9834 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9835 folder.fold_table_from_source_option_name(self)
9836 }
9837}
9838#[allow(clippy::needless_pass_by_ref_mut)]
9839pub fn fold_table_from_source_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableFromSourceOptionName) -> TableFromSourceOptionName
9840where
9841 F: Fold<T, T2, > + ?Sized,
9842{
9843 match node {
9844 TableFromSourceOptionName::TextColumns {
9845 } => {
9846 TableFromSourceOptionName::TextColumns {
9847 }
9848 }
9849 TableFromSourceOptionName::ExcludeColumns {
9850 } => {
9851 TableFromSourceOptionName::ExcludeColumns {
9852 }
9853 }
9854 TableFromSourceOptionName::ExcludeConstraints {
9855 } => {
9856 TableFromSourceOptionName::ExcludeConstraints {
9857 }
9858 }
9859 TableFromSourceOptionName::ExcludeAllConstraints {
9860 } => {
9861 TableFromSourceOptionName::ExcludeAllConstraints {
9862 }
9863 }
9864 TableFromSourceOptionName::ExcludeAllNotNullConstraints {
9865 } => {
9866 TableFromSourceOptionName::ExcludeAllNotNullConstraints {
9867 }
9868 }
9869 TableFromSourceOptionName::Details {
9870 } => {
9871 TableFromSourceOptionName::Details {
9872 }
9873 }
9874 TableFromSourceOptionName::PartitionBy {
9875 } => {
9876 TableFromSourceOptionName::PartitionBy {
9877 }
9878 }
9879 TableFromSourceOptionName::RetainHistory {
9880 } => {
9881 TableFromSourceOptionName::RetainHistory {
9882 }
9883 }
9884 }
9885}
9886impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableOption<T> {
9887 type Folded = TableOption<T2>;
9888 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9889 folder.fold_table_option(self)
9890 }
9891}
9892#[allow(clippy::needless_pass_by_ref_mut)]
9893pub fn fold_table_option<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableOption<T>) -> TableOption<T2>
9894where
9895 F: Fold<T, T2, > + ?Sized,
9896{
9897 TableOption {
9898 name: folder.fold_table_option_name(node.name),
9899 value: node.value.map(|v| folder.fold_with_option_value(v)),
9900 }
9901}
9902impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableOptionName {
9903 type Folded = TableOptionName;
9904 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9905 folder.fold_table_option_name(self)
9906 }
9907}
9908#[allow(clippy::needless_pass_by_ref_mut)]
9909pub fn fold_table_option_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableOptionName) -> TableOptionName
9910where
9911 F: Fold<T, T2, > + ?Sized,
9912{
9913 match node {
9914 TableOptionName::PartitionBy {
9915 } => {
9916 TableOptionName::PartitionBy {
9917 }
9918 }
9919 TableOptionName::RetainHistory {
9920 } => {
9921 TableOptionName::RetainHistory {
9922 }
9923 }
9924 TableOptionName::RedactedTest {
9925 } => {
9926 TableOptionName::RedactedTest {
9927 }
9928 }
9929 }
9930}
9931impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TableWithJoins<T> {
9932 type Folded = TableWithJoins<T2>;
9933 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9934 folder.fold_table_with_joins(self)
9935 }
9936}
9937#[allow(clippy::needless_pass_by_ref_mut)]
9938pub fn fold_table_with_joins<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TableWithJoins<T>) -> TableWithJoins<T2>
9939where
9940 F: Fold<T, T2, > + ?Sized,
9941{
9942 TableWithJoins {
9943 relation: folder.fold_table_factor(node.relation),
9944 joins: node.joins.into_iter().map(|v| folder.fold_join(v)).collect(),
9945 }
9946}
9947impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TargetRoleSpecification<T> {
9948 type Folded = TargetRoleSpecification<T2>;
9949 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9950 folder.fold_target_role_specification(self)
9951 }
9952}
9953#[allow(clippy::needless_pass_by_ref_mut)]
9954pub fn fold_target_role_specification<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TargetRoleSpecification<T>) -> TargetRoleSpecification<T2>
9955where
9956 F: Fold<T, T2, > + ?Sized,
9957{
9958 match node {
9959 TargetRoleSpecification::Roles {
9960 0: binding0,
9961 } => {
9962 TargetRoleSpecification::Roles {
9963 0: binding0.into_iter().map(|v| folder.fold_role_name(v)).collect(),
9964 }
9965 }
9966 TargetRoleSpecification::AllRoles {
9967 } => {
9968 TargetRoleSpecification::AllRoles {
9969 }
9970 }
9971 }
9972}
9973impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TransactionAccessMode {
9974 type Folded = TransactionAccessMode;
9975 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
9976 folder.fold_transaction_access_mode(self)
9977 }
9978}
9979#[allow(clippy::needless_pass_by_ref_mut)]
9980pub fn fold_transaction_access_mode<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TransactionAccessMode) -> TransactionAccessMode
9981where
9982 F: Fold<T, T2, > + ?Sized,
9983{
9984 match node {
9985 TransactionAccessMode::ReadOnly {
9986 } => {
9987 TransactionAccessMode::ReadOnly {
9988 }
9989 }
9990 TransactionAccessMode::ReadWrite {
9991 } => {
9992 TransactionAccessMode::ReadWrite {
9993 }
9994 }
9995 }
9996}
9997impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TransactionIsolationLevel {
9998 type Folded = TransactionIsolationLevel;
9999 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10000 folder.fold_transaction_isolation_level(self)
10001 }
10002}
10003#[allow(clippy::needless_pass_by_ref_mut)]
10004pub fn fold_transaction_isolation_level<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TransactionIsolationLevel) -> TransactionIsolationLevel
10005where
10006 F: Fold<T, T2, > + ?Sized,
10007{
10008 match node {
10009 TransactionIsolationLevel::ReadUncommitted {
10010 } => {
10011 TransactionIsolationLevel::ReadUncommitted {
10012 }
10013 }
10014 TransactionIsolationLevel::ReadCommitted {
10015 } => {
10016 TransactionIsolationLevel::ReadCommitted {
10017 }
10018 }
10019 TransactionIsolationLevel::RepeatableRead {
10020 } => {
10021 TransactionIsolationLevel::RepeatableRead {
10022 }
10023 }
10024 TransactionIsolationLevel::Serializable {
10025 } => {
10026 TransactionIsolationLevel::Serializable {
10027 }
10028 }
10029 TransactionIsolationLevel::StrongSessionSerializable {
10030 } => {
10031 TransactionIsolationLevel::StrongSessionSerializable {
10032 }
10033 }
10034 TransactionIsolationLevel::StrictSerializable {
10035 } => {
10036 TransactionIsolationLevel::StrictSerializable {
10037 }
10038 }
10039 }
10040}
10041impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for TransactionMode {
10042 type Folded = TransactionMode;
10043 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10044 folder.fold_transaction_mode(self)
10045 }
10046}
10047#[allow(clippy::needless_pass_by_ref_mut)]
10048pub fn fold_transaction_mode<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: TransactionMode) -> TransactionMode
10049where
10050 F: Fold<T, T2, > + ?Sized,
10051{
10052 match node {
10053 TransactionMode::AccessMode {
10054 0: binding0,
10055 } => {
10056 TransactionMode::AccessMode {
10057 0: folder.fold_transaction_access_mode(binding0),
10058 }
10059 }
10060 TransactionMode::IsolationLevel {
10061 0: binding0,
10062 } => {
10063 TransactionMode::IsolationLevel {
10064 0: folder.fold_transaction_isolation_level(binding0),
10065 }
10066 }
10067 }
10068}
10069impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for UnresolvedDatabaseName {
10070 type Folded = UnresolvedDatabaseName;
10071 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10072 folder.fold_unresolved_database_name(self)
10073 }
10074}
10075#[allow(clippy::needless_pass_by_ref_mut)]
10076pub fn fold_unresolved_database_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: UnresolvedDatabaseName) -> UnresolvedDatabaseName
10077where
10078 F: Fold<T, T2, > + ?Sized,
10079{
10080 UnresolvedDatabaseName {
10081 0: folder.fold_ident(node.0),
10082 }
10083}
10084impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for UnresolvedItemName {
10085 type Folded = UnresolvedItemName;
10086 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10087 folder.fold_unresolved_item_name(self)
10088 }
10089}
10090#[allow(clippy::needless_pass_by_ref_mut)]
10091pub fn fold_unresolved_item_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: UnresolvedItemName) -> UnresolvedItemName
10092where
10093 F: Fold<T, T2, > + ?Sized,
10094{
10095 UnresolvedItemName {
10096 0: node.0.into_iter().map(|v| folder.fold_ident(v)).collect(),
10097 }
10098}
10099impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for UnresolvedObjectName {
10100 type Folded = UnresolvedObjectName;
10101 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10102 folder.fold_unresolved_object_name(self)
10103 }
10104}
10105#[allow(clippy::needless_pass_by_ref_mut)]
10106pub fn fold_unresolved_object_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: UnresolvedObjectName) -> UnresolvedObjectName
10107where
10108 F: Fold<T, T2, > + ?Sized,
10109{
10110 match node {
10111 UnresolvedObjectName::Cluster {
10112 0: binding0,
10113 } => {
10114 UnresolvedObjectName::Cluster {
10115 0: folder.fold_ident(binding0),
10116 }
10117 }
10118 UnresolvedObjectName::ClusterReplica {
10119 0: binding0,
10120 } => {
10121 UnresolvedObjectName::ClusterReplica {
10122 0: folder.fold_qualified_replica(binding0),
10123 }
10124 }
10125 UnresolvedObjectName::Database {
10126 0: binding0,
10127 } => {
10128 UnresolvedObjectName::Database {
10129 0: folder.fold_unresolved_database_name(binding0),
10130 }
10131 }
10132 UnresolvedObjectName::Schema {
10133 0: binding0,
10134 } => {
10135 UnresolvedObjectName::Schema {
10136 0: folder.fold_unresolved_schema_name(binding0),
10137 }
10138 }
10139 UnresolvedObjectName::Role {
10140 0: binding0,
10141 } => {
10142 UnresolvedObjectName::Role {
10143 0: folder.fold_ident(binding0),
10144 }
10145 }
10146 UnresolvedObjectName::Item {
10147 0: binding0,
10148 } => {
10149 UnresolvedObjectName::Item {
10150 0: folder.fold_unresolved_item_name(binding0),
10151 }
10152 }
10153 UnresolvedObjectName::NetworkPolicy {
10154 0: binding0,
10155 } => {
10156 UnresolvedObjectName::NetworkPolicy {
10157 0: folder.fold_ident(binding0),
10158 }
10159 }
10160 }
10161}
10162impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for UnresolvedSchemaName {
10163 type Folded = UnresolvedSchemaName;
10164 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10165 folder.fold_unresolved_schema_name(self)
10166 }
10167}
10168#[allow(clippy::needless_pass_by_ref_mut)]
10169pub fn fold_unresolved_schema_name<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: UnresolvedSchemaName) -> UnresolvedSchemaName
10170where
10171 F: Fold<T, T2, > + ?Sized,
10172{
10173 UnresolvedSchemaName {
10174 0: node.0.into_iter().map(|v| folder.fold_ident(v)).collect(),
10175 }
10176}
10177impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for UpdateStatement<T> {
10178 type Folded = UpdateStatement<T2>;
10179 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10180 folder.fold_update_statement(self)
10181 }
10182}
10183#[allow(clippy::needless_pass_by_ref_mut)]
10184pub fn fold_update_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: UpdateStatement<T>) -> UpdateStatement<T2>
10185where
10186 F: Fold<T, T2, > + ?Sized,
10187{
10188 UpdateStatement {
10189 table_name: folder.fold_item_name(node.table_name),
10190 alias: node.alias.map(|v| folder.fold_table_alias(v)),
10191 assignments: node.assignments.into_iter().map(|v| folder.fold_assignment(v)).collect(),
10192 selection: node.selection.map(|v| folder.fold_expr(v)),
10193 }
10194}
10195impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ValidateConnectionStatement<T> {
10196 type Folded = ValidateConnectionStatement<T2>;
10197 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10198 folder.fold_validate_connection_statement(self)
10199 }
10200}
10201#[allow(clippy::needless_pass_by_ref_mut)]
10202pub fn fold_validate_connection_statement<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ValidateConnectionStatement<T>) -> ValidateConnectionStatement<T2>
10203where
10204 F: Fold<T, T2, > + ?Sized,
10205{
10206 ValidateConnectionStatement {
10207 name: folder.fold_item_name(node.name),
10208 }
10209}
10210impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Value {
10211 type Folded = Value;
10212 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10213 folder.fold_value(self)
10214 }
10215}
10216#[allow(clippy::needless_pass_by_ref_mut)]
10217pub fn fold_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Value) -> Value
10218where
10219 F: Fold<T, T2, > + ?Sized,
10220{
10221 match node {
10222 Value::Number {
10223 0: binding0,
10224 } => {
10225 Value::Number {
10226 0: binding0,
10227 }
10228 }
10229 Value::String {
10230 0: binding0,
10231 } => {
10232 Value::String {
10233 0: binding0,
10234 }
10235 }
10236 Value::HexString {
10237 0: binding0,
10238 } => {
10239 Value::HexString {
10240 0: binding0,
10241 }
10242 }
10243 Value::Boolean {
10244 0: binding0,
10245 } => {
10246 Value::Boolean {
10247 0: binding0,
10248 }
10249 }
10250 Value::Interval {
10251 0: binding0,
10252 } => {
10253 Value::Interval {
10254 0: folder.fold_interval_value(binding0),
10255 }
10256 }
10257 Value::Null {
10258 } => {
10259 Value::Null {
10260 }
10261 }
10262 }
10263}
10264impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ValueError {
10265 type Folded = ValueError;
10266 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10267 folder.fold_value_error(self)
10268 }
10269}
10270#[allow(clippy::needless_pass_by_ref_mut)]
10271pub fn fold_value_error<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ValueError) -> ValueError
10272where
10273 F: Fold<T, T2, > + ?Sized,
10274{
10275 ValueError {
10276 0: node.0,
10277 }
10278}
10279impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Values<T> {
10280 type Folded = Values<T2>;
10281 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10282 folder.fold_values(self)
10283 }
10284}
10285#[allow(clippy::needless_pass_by_ref_mut)]
10286pub fn fold_values<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Values<T>) -> Values<T2>
10287where
10288 F: Fold<T, T2, > + ?Sized,
10289{
10290 Values {
10291 0: node.0.into_iter().map(|v| v.into_iter().map(|v| folder.fold_expr(v)).collect()).collect(),
10292 }
10293}
10294impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for Version {
10295 type Folded = Version;
10296 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10297 folder.fold_version(self)
10298 }
10299}
10300#[allow(clippy::needless_pass_by_ref_mut)]
10301pub fn fold_version<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: Version) -> Version
10302where
10303 F: Fold<T, T2, > + ?Sized,
10304{
10305 Version {
10306 0: node.0,
10307 }
10308}
10309impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for ViewDefinition<T> {
10310 type Folded = ViewDefinition<T2>;
10311 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10312 folder.fold_view_definition(self)
10313 }
10314}
10315#[allow(clippy::needless_pass_by_ref_mut)]
10316pub fn fold_view_definition<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: ViewDefinition<T>) -> ViewDefinition<T2>
10317where
10318 F: Fold<T, T2, > + ?Sized,
10319{
10320 ViewDefinition {
10321 name: folder.fold_unresolved_item_name(node.name),
10322 columns: node.columns.into_iter().map(|v| folder.fold_ident(v)).collect(),
10323 query: folder.fold_query(node.query),
10324 }
10325}
10326impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for WindowFrame {
10327 type Folded = WindowFrame;
10328 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10329 folder.fold_window_frame(self)
10330 }
10331}
10332#[allow(clippy::needless_pass_by_ref_mut)]
10333pub fn fold_window_frame<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: WindowFrame) -> WindowFrame
10334where
10335 F: Fold<T, T2, > + ?Sized,
10336{
10337 WindowFrame {
10338 units: folder.fold_window_frame_units(node.units),
10339 start_bound: folder.fold_window_frame_bound(node.start_bound),
10340 end_bound: node.end_bound.map(|v| folder.fold_window_frame_bound(v)),
10341 }
10342}
10343impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for WindowFrameBound {
10344 type Folded = WindowFrameBound;
10345 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10346 folder.fold_window_frame_bound(self)
10347 }
10348}
10349#[allow(clippy::needless_pass_by_ref_mut)]
10350pub fn fold_window_frame_bound<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: WindowFrameBound) -> WindowFrameBound
10351where
10352 F: Fold<T, T2, > + ?Sized,
10353{
10354 match node {
10355 WindowFrameBound::CurrentRow {
10356 } => {
10357 WindowFrameBound::CurrentRow {
10358 }
10359 }
10360 WindowFrameBound::Preceding {
10361 0: binding0,
10362 } => {
10363 WindowFrameBound::Preceding {
10364 0: binding0.map(|v| v),
10365 }
10366 }
10367 WindowFrameBound::Following {
10368 0: binding0,
10369 } => {
10370 WindowFrameBound::Following {
10371 0: binding0.map(|v| v),
10372 }
10373 }
10374 }
10375}
10376impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for WindowFrameUnits {
10377 type Folded = WindowFrameUnits;
10378 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10379 folder.fold_window_frame_units(self)
10380 }
10381}
10382#[allow(clippy::needless_pass_by_ref_mut)]
10383pub fn fold_window_frame_units<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: WindowFrameUnits) -> WindowFrameUnits
10384where
10385 F: Fold<T, T2, > + ?Sized,
10386{
10387 match node {
10388 WindowFrameUnits::Rows {
10389 } => {
10390 WindowFrameUnits::Rows {
10391 }
10392 }
10393 WindowFrameUnits::Range {
10394 } => {
10395 WindowFrameUnits::Range {
10396 }
10397 }
10398 WindowFrameUnits::Groups {
10399 } => {
10400 WindowFrameUnits::Groups {
10401 }
10402 }
10403 }
10404}
10405impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for WindowSpec<T> {
10406 type Folded = WindowSpec<T2>;
10407 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10408 folder.fold_window_spec(self)
10409 }
10410}
10411#[allow(clippy::needless_pass_by_ref_mut)]
10412pub fn fold_window_spec<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: WindowSpec<T>) -> WindowSpec<T2>
10413where
10414 F: Fold<T, T2, > + ?Sized,
10415{
10416 WindowSpec {
10417 partition_by: node.partition_by.into_iter().map(|v| folder.fold_expr(v)).collect(),
10418 order_by: node.order_by.into_iter().map(|v| folder.fold_order_by_expr(v)).collect(),
10419 window_frame: node.window_frame.map(|v| folder.fold_window_frame(v)),
10420 ignore_nulls: node.ignore_nulls,
10421 respect_nulls: node.respect_nulls,
10422 }
10423}
10424impl<T: AstInfo, T2: AstInfo, > FoldNode<T, T2, > for WithOptionValue<T> {
10425 type Folded = WithOptionValue<T2>;
10426 fn fold<F: Fold<T, T2, >>(self, folder: &mut F) -> Self::Folded {
10427 folder.fold_with_option_value(self)
10428 }
10429}
10430#[allow(clippy::needless_pass_by_ref_mut)]
10431pub fn fold_with_option_value<F, T: AstInfo, T2: AstInfo, >(folder: &mut F, node: WithOptionValue<T>) -> WithOptionValue<T2>
10432where
10433 F: Fold<T, T2, > + ?Sized,
10434{
10435 match node {
10436 WithOptionValue::Value {
10437 0: binding0,
10438 } => {
10439 WithOptionValue::Value {
10440 0: folder.fold_value(binding0),
10441 }
10442 }
10443 WithOptionValue::DataType {
10444 0: binding0,
10445 } => {
10446 WithOptionValue::DataType {
10447 0: folder.fold_data_type(binding0),
10448 }
10449 }
10450 WithOptionValue::Secret {
10451 0: binding0,
10452 } => {
10453 WithOptionValue::Secret {
10454 0: folder.fold_item_name(binding0),
10455 }
10456 }
10457 WithOptionValue::Item {
10458 0: binding0,
10459 } => {
10460 WithOptionValue::Item {
10461 0: folder.fold_item_name(binding0),
10462 }
10463 }
10464 WithOptionValue::UnresolvedItemName {
10465 0: binding0,
10466 } => {
10467 WithOptionValue::UnresolvedItemName {
10468 0: folder.fold_unresolved_item_name(binding0),
10469 }
10470 }
10471 WithOptionValue::Ident {
10472 0: binding0,
10473 } => {
10474 WithOptionValue::Ident {
10475 0: folder.fold_ident(binding0),
10476 }
10477 }
10478 WithOptionValue::Sequence {
10479 0: binding0,
10480 } => {
10481 WithOptionValue::Sequence {
10482 0: binding0.into_iter().map(|v| folder.fold_with_option_value(v)).collect(),
10483 }
10484 }
10485 WithOptionValue::Map {
10486 0: binding0,
10487 } => {
10488 WithOptionValue::Map {
10489 0: { std::collections::BTreeMap::from_iter(binding0.into_iter().map(|(k, v)| {(k.to_owned(), folder.fold_with_option_value(v).to_owned()) }) )},
10490 }
10491 }
10492 WithOptionValue::Expr {
10493 0: binding0,
10494 } => {
10495 WithOptionValue::Expr {
10496 0: folder.fold_expr(binding0),
10497 }
10498 }
10499 WithOptionValue::ClusterReplicas {
10500 0: binding0,
10501 } => {
10502 WithOptionValue::ClusterReplicas {
10503 0: binding0.into_iter().map(|v| folder.fold_replica_definition(v)).collect(),
10504 }
10505 }
10506 WithOptionValue::ConnectionKafkaBroker {
10507 0: binding0,
10508 } => {
10509 WithOptionValue::ConnectionKafkaBroker {
10510 0: folder.fold_kafka_broker(binding0),
10511 }
10512 }
10513 WithOptionValue::ConnectionAwsPrivatelink {
10514 0: binding0,
10515 } => {
10516 WithOptionValue::ConnectionAwsPrivatelink {
10517 0: folder.fold_connection_default_aws_privatelink(binding0),
10518 }
10519 }
10520 WithOptionValue::KafkaMatchingBrokerRule {
10521 0: binding0,
10522 } => {
10523 WithOptionValue::KafkaMatchingBrokerRule {
10524 0: folder.fold_kafka_matching_broker_rule(binding0),
10525 }
10526 }
10527 WithOptionValue::RetainHistoryFor {
10528 0: binding0,
10529 } => {
10530 WithOptionValue::RetainHistoryFor {
10531 0: folder.fold_value(binding0),
10532 }
10533 }
10534 WithOptionValue::Refresh {
10535 0: binding0,
10536 } => {
10537 WithOptionValue::Refresh {
10538 0: folder.fold_refresh_option_value(binding0),
10539 }
10540 }
10541 WithOptionValue::ClusterScheduleOptionValue {
10542 0: binding0,
10543 } => {
10544 WithOptionValue::ClusterScheduleOptionValue {
10545 0: folder.fold_cluster_schedule_option_value(binding0),
10546 }
10547 }
10548 WithOptionValue::ClusterAutoScalingStrategyOptionValue {
10549 0: binding0,
10550 } => {
10551 WithOptionValue::ClusterAutoScalingStrategyOptionValue {
10552 0: folder.fold_cluster_auto_scaling_strategy_option_value(binding0),
10553 }
10554 }
10555 WithOptionValue::ClusterAlterStrategy {
10556 0: binding0,
10557 } => {
10558 WithOptionValue::ClusterAlterStrategy {
10559 0: folder.fold_cluster_alter_option_value(binding0),
10560 }
10561 }
10562 WithOptionValue::NetworkPolicyRules {
10563 0: binding0,
10564 } => {
10565 WithOptionValue::NetworkPolicyRules {
10566 0: binding0.into_iter().map(|v| folder.fold_network_policy_rule_definition(v)).collect(),
10567 }
10568 }
10569 }
10570}