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