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