1#![allow(clippy::all)]
14
15use crate::dialect::*;
16use crate::precedence::{BindingPowerTable, SetOperationBindingPowerTable};
17#[derive(Clone, Copy, Debug, PartialEq, Eq)]
23pub struct FeatureDelta {
24 pub identifier_casing: Option<Casing>,
26 pub identifier_quotes: Option<&'static [IdentifierQuote]>,
28 pub default_null_ordering: Option<NullOrdering>,
30 pub reserved_column_name: Option<KeywordSet>,
32 pub reserved_function_name: Option<KeywordSet>,
34 pub reserved_type_name: Option<KeywordSet>,
36 pub reserved_bare_alias: Option<KeywordSet>,
38 pub reserved_as_label: Option<KeywordSet>,
40 pub catalog_qualified_names: Option<bool>,
42 pub byte_classes: Option<ByteClasses>,
44 pub binding_powers: Option<BindingPowerTable>,
46 pub set_operation_powers: Option<SetOperationBindingPowerTable>,
48 pub string_literals: Option<StringLiteralSyntax>,
50 pub numeric_literals: Option<NumericLiteralSyntax>,
52 pub parameters: Option<ParameterSyntax>,
54 pub session_variables: Option<SessionVariableSyntax>,
56 pub identifier_syntax: Option<IdentifierSyntax>,
58 pub table_expressions: Option<TableExpressionSyntax>,
60 pub join_syntax: Option<JoinSyntax>,
62 pub table_factor_syntax: Option<TableFactorSyntax>,
64 pub expression_syntax: Option<ExpressionSyntax>,
66 pub operator_syntax: Option<OperatorSyntax>,
68 pub call_syntax: Option<CallSyntax>,
70 pub string_func_forms: Option<StringFuncForms>,
72 pub aggregate_call_syntax: Option<AggregateCallSyntax>,
74 pub predicate_syntax: Option<PredicateSyntax>,
76 pub pipe_operator: Option<PipeOperator>,
78 pub double_ampersand: Option<DoubleAmpersand>,
80 pub keyword_operators: Option<KeywordOperators>,
82 pub caret_operator: Option<CaretOperator>,
84 pub hash_bitwise_xor: Option<bool>,
86 pub comment_syntax: Option<CommentSyntax>,
88 pub mutation_syntax: Option<MutationSyntax>,
90 pub statement_ddl_gates: Option<StatementDdlGates>,
92 pub create_table_clause_syntax: Option<CreateTableClauseSyntax>,
94 pub column_definition_syntax: Option<ColumnDefinitionSyntax>,
96 pub constraint_syntax: Option<ConstraintSyntax>,
98 pub index_alter_syntax: Option<IndexAlterSyntax>,
100 pub existence_guards: Option<ExistenceGuards>,
102 pub select_syntax: Option<SelectSyntax>,
104 pub query_tail_syntax: Option<QueryTailSyntax>,
106 pub grouping_syntax: Option<GroupingSyntax>,
108 pub utility_syntax: Option<UtilitySyntax>,
110 pub show_syntax: Option<ShowSyntax>,
112 pub maintenance_syntax: Option<MaintenanceSyntax>,
114 pub access_control_syntax: Option<AccessControlSyntax>,
116 pub type_name_syntax: Option<TypeNameSyntax>,
118 pub target_spelling: Option<TargetSpelling>,
120}
121impl FeatureDelta {
122 pub const EMPTY: Self = Self {
124 identifier_casing: None,
125 identifier_quotes: None,
126 default_null_ordering: None,
127 reserved_column_name: None,
128 reserved_function_name: None,
129 reserved_type_name: None,
130 reserved_bare_alias: None,
131 reserved_as_label: None,
132 catalog_qualified_names: None,
133 byte_classes: None,
134 binding_powers: None,
135 set_operation_powers: None,
136 string_literals: None,
137 numeric_literals: None,
138 parameters: None,
139 session_variables: None,
140 identifier_syntax: None,
141 table_expressions: None,
142 join_syntax: None,
143 table_factor_syntax: None,
144 expression_syntax: None,
145 operator_syntax: None,
146 call_syntax: None,
147 string_func_forms: None,
148 aggregate_call_syntax: None,
149 predicate_syntax: None,
150 pipe_operator: None,
151 double_ampersand: None,
152 keyword_operators: None,
153 caret_operator: None,
154 hash_bitwise_xor: None,
155 comment_syntax: None,
156 mutation_syntax: None,
157 statement_ddl_gates: None,
158 create_table_clause_syntax: None,
159 column_definition_syntax: None,
160 constraint_syntax: None,
161 index_alter_syntax: None,
162 existence_guards: None,
163 select_syntax: None,
164 query_tail_syntax: None,
165 grouping_syntax: None,
166 utility_syntax: None,
167 show_syntax: None,
168 maintenance_syntax: None,
169 access_control_syntax: None,
170 type_name_syntax: None,
171 target_spelling: None,
172 };
173 pub const fn identifier_casing(mut self, value: Casing) -> Self {
175 self.identifier_casing = Some(value);
176 self
177 }
178 pub const fn identifier_quotes(mut self, value: &'static [IdentifierQuote]) -> Self {
180 self.identifier_quotes = Some(value);
181 self
182 }
183 pub const fn default_null_ordering(mut self, value: NullOrdering) -> Self {
185 self.default_null_ordering = Some(value);
186 self
187 }
188 pub const fn reserved_column_name(mut self, value: KeywordSet) -> Self {
190 self.reserved_column_name = Some(value);
191 self
192 }
193 pub const fn reserved_function_name(mut self, value: KeywordSet) -> Self {
195 self.reserved_function_name = Some(value);
196 self
197 }
198 pub const fn reserved_type_name(mut self, value: KeywordSet) -> Self {
200 self.reserved_type_name = Some(value);
201 self
202 }
203 pub const fn reserved_bare_alias(mut self, value: KeywordSet) -> Self {
205 self.reserved_bare_alias = Some(value);
206 self
207 }
208 pub const fn reserved_as_label(mut self, value: KeywordSet) -> Self {
210 self.reserved_as_label = Some(value);
211 self
212 }
213 pub const fn catalog_qualified_names(mut self, value: bool) -> Self {
215 self.catalog_qualified_names = Some(value);
216 self
217 }
218 pub const fn byte_classes(mut self, value: ByteClasses) -> Self {
220 self.byte_classes = Some(value);
221 self
222 }
223 pub const fn binding_powers(mut self, value: BindingPowerTable) -> Self {
225 self.binding_powers = Some(value);
226 self
227 }
228 pub const fn set_operation_powers(mut self, value: SetOperationBindingPowerTable) -> Self {
230 self.set_operation_powers = Some(value);
231 self
232 }
233 pub const fn string_literals(mut self, value: StringLiteralSyntax) -> Self {
235 self.string_literals = Some(value);
236 self
237 }
238 pub const fn numeric_literals(mut self, value: NumericLiteralSyntax) -> Self {
240 self.numeric_literals = Some(value);
241 self
242 }
243 pub const fn parameters(mut self, value: ParameterSyntax) -> Self {
245 self.parameters = Some(value);
246 self
247 }
248 pub const fn session_variables(mut self, value: SessionVariableSyntax) -> Self {
250 self.session_variables = Some(value);
251 self
252 }
253 pub const fn identifier_syntax(mut self, value: IdentifierSyntax) -> Self {
255 self.identifier_syntax = Some(value);
256 self
257 }
258 pub const fn table_expressions(mut self, value: TableExpressionSyntax) -> Self {
260 self.table_expressions = Some(value);
261 self
262 }
263 pub const fn join_syntax(mut self, value: JoinSyntax) -> Self {
265 self.join_syntax = Some(value);
266 self
267 }
268 pub const fn table_factor_syntax(mut self, value: TableFactorSyntax) -> Self {
270 self.table_factor_syntax = Some(value);
271 self
272 }
273 pub const fn expression_syntax(mut self, value: ExpressionSyntax) -> Self {
275 self.expression_syntax = Some(value);
276 self
277 }
278 pub const fn operator_syntax(mut self, value: OperatorSyntax) -> Self {
280 self.operator_syntax = Some(value);
281 self
282 }
283 pub const fn call_syntax(mut self, value: CallSyntax) -> Self {
285 self.call_syntax = Some(value);
286 self
287 }
288 pub const fn string_func_forms(mut self, value: StringFuncForms) -> Self {
290 self.string_func_forms = Some(value);
291 self
292 }
293 pub const fn aggregate_call_syntax(mut self, value: AggregateCallSyntax) -> Self {
295 self.aggregate_call_syntax = Some(value);
296 self
297 }
298 pub const fn predicate_syntax(mut self, value: PredicateSyntax) -> Self {
300 self.predicate_syntax = Some(value);
301 self
302 }
303 pub const fn pipe_operator(mut self, value: PipeOperator) -> Self {
305 self.pipe_operator = Some(value);
306 self
307 }
308 pub const fn double_ampersand(mut self, value: DoubleAmpersand) -> Self {
310 self.double_ampersand = Some(value);
311 self
312 }
313 pub const fn keyword_operators(mut self, value: KeywordOperators) -> Self {
315 self.keyword_operators = Some(value);
316 self
317 }
318 pub const fn caret_operator(mut self, value: CaretOperator) -> Self {
320 self.caret_operator = Some(value);
321 self
322 }
323 pub const fn hash_bitwise_xor(mut self, value: bool) -> Self {
325 self.hash_bitwise_xor = Some(value);
326 self
327 }
328 pub const fn comment_syntax(mut self, value: CommentSyntax) -> Self {
330 self.comment_syntax = Some(value);
331 self
332 }
333 pub const fn mutation_syntax(mut self, value: MutationSyntax) -> Self {
335 self.mutation_syntax = Some(value);
336 self
337 }
338 pub const fn statement_ddl_gates(mut self, value: StatementDdlGates) -> Self {
340 self.statement_ddl_gates = Some(value);
341 self
342 }
343 pub const fn create_table_clause_syntax(mut self, value: CreateTableClauseSyntax) -> Self {
345 self.create_table_clause_syntax = Some(value);
346 self
347 }
348 pub const fn column_definition_syntax(mut self, value: ColumnDefinitionSyntax) -> Self {
350 self.column_definition_syntax = Some(value);
351 self
352 }
353 pub const fn constraint_syntax(mut self, value: ConstraintSyntax) -> Self {
355 self.constraint_syntax = Some(value);
356 self
357 }
358 pub const fn index_alter_syntax(mut self, value: IndexAlterSyntax) -> Self {
360 self.index_alter_syntax = Some(value);
361 self
362 }
363 pub const fn existence_guards(mut self, value: ExistenceGuards) -> Self {
365 self.existence_guards = Some(value);
366 self
367 }
368 pub const fn select_syntax(mut self, value: SelectSyntax) -> Self {
370 self.select_syntax = Some(value);
371 self
372 }
373 pub const fn query_tail_syntax(mut self, value: QueryTailSyntax) -> Self {
375 self.query_tail_syntax = Some(value);
376 self
377 }
378 pub const fn grouping_syntax(mut self, value: GroupingSyntax) -> Self {
380 self.grouping_syntax = Some(value);
381 self
382 }
383 pub const fn utility_syntax(mut self, value: UtilitySyntax) -> Self {
385 self.utility_syntax = Some(value);
386 self
387 }
388 pub const fn show_syntax(mut self, value: ShowSyntax) -> Self {
390 self.show_syntax = Some(value);
391 self
392 }
393 pub const fn maintenance_syntax(mut self, value: MaintenanceSyntax) -> Self {
395 self.maintenance_syntax = Some(value);
396 self
397 }
398 pub const fn access_control_syntax(mut self, value: AccessControlSyntax) -> Self {
400 self.access_control_syntax = Some(value);
401 self
402 }
403 pub const fn type_name_syntax(mut self, value: TypeNameSyntax) -> Self {
405 self.type_name_syntax = Some(value);
406 self
407 }
408 pub const fn target_spelling(mut self, value: TargetSpelling) -> Self {
410 self.target_spelling = Some(value);
411 self
412 }
413}
414impl Default for FeatureDelta {
415 fn default() -> Self {
416 Self::EMPTY
417 }
418}
419impl FeatureSet {
420 pub const fn with(&self, delta: FeatureDelta) -> Self {
422 Self {
423 identifier_casing: match delta.identifier_casing {
424 Some(value) => value,
425 None => self.identifier_casing,
426 },
427 identifier_quotes: match delta.identifier_quotes {
428 Some(value) => value,
429 None => self.identifier_quotes,
430 },
431 default_null_ordering: match delta.default_null_ordering {
432 Some(value) => value,
433 None => self.default_null_ordering,
434 },
435 reserved_column_name: match delta.reserved_column_name {
436 Some(value) => value,
437 None => self.reserved_column_name,
438 },
439 reserved_function_name: match delta.reserved_function_name {
440 Some(value) => value,
441 None => self.reserved_function_name,
442 },
443 reserved_type_name: match delta.reserved_type_name {
444 Some(value) => value,
445 None => self.reserved_type_name,
446 },
447 reserved_bare_alias: match delta.reserved_bare_alias {
448 Some(value) => value,
449 None => self.reserved_bare_alias,
450 },
451 reserved_as_label: match delta.reserved_as_label {
452 Some(value) => value,
453 None => self.reserved_as_label,
454 },
455 catalog_qualified_names: match delta.catalog_qualified_names {
456 Some(value) => value,
457 None => self.catalog_qualified_names,
458 },
459 byte_classes: match delta.byte_classes {
460 Some(value) => value,
461 None => self.byte_classes,
462 },
463 binding_powers: match delta.binding_powers {
464 Some(value) => value,
465 None => self.binding_powers,
466 },
467 set_operation_powers: match delta.set_operation_powers {
468 Some(value) => value,
469 None => self.set_operation_powers,
470 },
471 string_literals: match delta.string_literals {
472 Some(value) => value,
473 None => self.string_literals,
474 },
475 numeric_literals: match delta.numeric_literals {
476 Some(value) => value,
477 None => self.numeric_literals,
478 },
479 parameters: match delta.parameters {
480 Some(value) => value,
481 None => self.parameters,
482 },
483 session_variables: match delta.session_variables {
484 Some(value) => value,
485 None => self.session_variables,
486 },
487 identifier_syntax: match delta.identifier_syntax {
488 Some(value) => value,
489 None => self.identifier_syntax,
490 },
491 table_expressions: match delta.table_expressions {
492 Some(value) => value,
493 None => self.table_expressions,
494 },
495 join_syntax: match delta.join_syntax {
496 Some(value) => value,
497 None => self.join_syntax,
498 },
499 table_factor_syntax: match delta.table_factor_syntax {
500 Some(value) => value,
501 None => self.table_factor_syntax,
502 },
503 expression_syntax: match delta.expression_syntax {
504 Some(value) => value,
505 None => self.expression_syntax,
506 },
507 operator_syntax: match delta.operator_syntax {
508 Some(value) => value,
509 None => self.operator_syntax,
510 },
511 call_syntax: match delta.call_syntax {
512 Some(value) => value,
513 None => self.call_syntax,
514 },
515 string_func_forms: match delta.string_func_forms {
516 Some(value) => value,
517 None => self.string_func_forms,
518 },
519 aggregate_call_syntax: match delta.aggregate_call_syntax {
520 Some(value) => value,
521 None => self.aggregate_call_syntax,
522 },
523 predicate_syntax: match delta.predicate_syntax {
524 Some(value) => value,
525 None => self.predicate_syntax,
526 },
527 pipe_operator: match delta.pipe_operator {
528 Some(value) => value,
529 None => self.pipe_operator,
530 },
531 double_ampersand: match delta.double_ampersand {
532 Some(value) => value,
533 None => self.double_ampersand,
534 },
535 keyword_operators: match delta.keyword_operators {
536 Some(value) => value,
537 None => self.keyword_operators,
538 },
539 caret_operator: match delta.caret_operator {
540 Some(value) => value,
541 None => self.caret_operator,
542 },
543 hash_bitwise_xor: match delta.hash_bitwise_xor {
544 Some(value) => value,
545 None => self.hash_bitwise_xor,
546 },
547 comment_syntax: match delta.comment_syntax {
548 Some(value) => value,
549 None => self.comment_syntax,
550 },
551 mutation_syntax: match delta.mutation_syntax {
552 Some(value) => value,
553 None => self.mutation_syntax,
554 },
555 statement_ddl_gates: match delta.statement_ddl_gates {
556 Some(value) => value,
557 None => self.statement_ddl_gates,
558 },
559 create_table_clause_syntax: match delta.create_table_clause_syntax {
560 Some(value) => value,
561 None => self.create_table_clause_syntax,
562 },
563 column_definition_syntax: match delta.column_definition_syntax {
564 Some(value) => value,
565 None => self.column_definition_syntax,
566 },
567 constraint_syntax: match delta.constraint_syntax {
568 Some(value) => value,
569 None => self.constraint_syntax,
570 },
571 index_alter_syntax: match delta.index_alter_syntax {
572 Some(value) => value,
573 None => self.index_alter_syntax,
574 },
575 existence_guards: match delta.existence_guards {
576 Some(value) => value,
577 None => self.existence_guards,
578 },
579 select_syntax: match delta.select_syntax {
580 Some(value) => value,
581 None => self.select_syntax,
582 },
583 query_tail_syntax: match delta.query_tail_syntax {
584 Some(value) => value,
585 None => self.query_tail_syntax,
586 },
587 grouping_syntax: match delta.grouping_syntax {
588 Some(value) => value,
589 None => self.grouping_syntax,
590 },
591 utility_syntax: match delta.utility_syntax {
592 Some(value) => value,
593 None => self.utility_syntax,
594 },
595 show_syntax: match delta.show_syntax {
596 Some(value) => value,
597 None => self.show_syntax,
598 },
599 maintenance_syntax: match delta.maintenance_syntax {
600 Some(value) => value,
601 None => self.maintenance_syntax,
602 },
603 access_control_syntax: match delta.access_control_syntax {
604 Some(value) => value,
605 None => self.access_control_syntax,
606 },
607 type_name_syntax: match delta.type_name_syntax {
608 Some(value) => value,
609 None => self.type_name_syntax,
610 },
611 target_spelling: match delta.target_spelling {
612 Some(value) => value,
613 None => self.target_spelling,
614 },
615 }
616 }
617}
618#[derive(Clone, Copy, Debug, PartialEq, Eq)]
620pub enum Feature {
621 IdentifierCasing,
623 IdentifierQuote,
625 DefaultNullOrdering,
627 ReservedColumnName,
629 ReservedFunctionName,
631 ReservedTypeName,
633 ReservedBareAlias,
635 ReservedAsLabel,
637 CatalogQualifiedNames,
639 ByteClasses,
641 BindingPowers,
643 SetOperationPowers,
645 StringLiterals,
647 NumericLiterals,
649 Parameters,
651 SessionVariables,
653 IdentifierSyntax,
655 TableExpressions,
657 JoinSyntax,
659 TableFactorSyntax,
661 ExpressionSyntax,
663 OperatorSyntax,
665 CallSyntax,
667 StringFuncForms,
669 AggregateCallSyntax,
671 PredicateSyntax,
673 PipeOperator,
675 DoubleAmpersand,
677 KeywordOperators,
679 CaretOperator,
681 HashBitwiseXor,
683 CommentSyntax,
685 MutationSyntax,
687 StatementDdlGates,
689 CreateTableClauseSyntax,
691 ColumnDefinitionSyntax,
693 ConstraintSyntax,
695 IndexAlterSyntax,
697 ExistenceGuards,
699 SelectSyntax,
701 QueryTailSyntax,
703 GroupingSyntax,
705 UtilitySyntax,
707 ShowSyntax,
709 MaintenanceSyntax,
711 AccessControlSyntax,
713 TypeNameSyntax,
715 TargetSpelling,
717}
718impl Feature {
719 pub const ALL: [Self; 48] = [
721 Self::IdentifierCasing,
722 Self::IdentifierQuote,
723 Self::DefaultNullOrdering,
724 Self::ReservedColumnName,
725 Self::ReservedFunctionName,
726 Self::ReservedTypeName,
727 Self::ReservedBareAlias,
728 Self::ReservedAsLabel,
729 Self::CatalogQualifiedNames,
730 Self::ByteClasses,
731 Self::BindingPowers,
732 Self::SetOperationPowers,
733 Self::StringLiterals,
734 Self::NumericLiterals,
735 Self::Parameters,
736 Self::SessionVariables,
737 Self::IdentifierSyntax,
738 Self::TableExpressions,
739 Self::JoinSyntax,
740 Self::TableFactorSyntax,
741 Self::ExpressionSyntax,
742 Self::OperatorSyntax,
743 Self::CallSyntax,
744 Self::StringFuncForms,
745 Self::AggregateCallSyntax,
746 Self::PredicateSyntax,
747 Self::PipeOperator,
748 Self::DoubleAmpersand,
749 Self::KeywordOperators,
750 Self::CaretOperator,
751 Self::HashBitwiseXor,
752 Self::CommentSyntax,
753 Self::MutationSyntax,
754 Self::StatementDdlGates,
755 Self::CreateTableClauseSyntax,
756 Self::ColumnDefinitionSyntax,
757 Self::ConstraintSyntax,
758 Self::IndexAlterSyntax,
759 Self::ExistenceGuards,
760 Self::SelectSyntax,
761 Self::QueryTailSyntax,
762 Self::GroupingSyntax,
763 Self::UtilitySyntax,
764 Self::ShowSyntax,
765 Self::MaintenanceSyntax,
766 Self::AccessControlSyntax,
767 Self::TypeNameSyntax,
768 Self::TargetSpelling,
769 ];
770 pub const fn id(&self) -> &'static str {
772 match self {
773 Self::IdentifierCasing => "identifier_casing",
774 Self::IdentifierQuote => "identifier_quote",
775 Self::DefaultNullOrdering => "default_null_ordering",
776 Self::ReservedColumnName => "reserved_column_name",
777 Self::ReservedFunctionName => "reserved_function_name",
778 Self::ReservedTypeName => "reserved_type_name",
779 Self::ReservedBareAlias => "reserved_bare_alias",
780 Self::ReservedAsLabel => "reserved_as_label",
781 Self::CatalogQualifiedNames => "catalog_qualified_names",
782 Self::ByteClasses => "byte_classes",
783 Self::BindingPowers => "binding_powers",
784 Self::SetOperationPowers => "set_operation_powers",
785 Self::StringLiterals => "string_literals",
786 Self::NumericLiterals => "numeric_literals",
787 Self::Parameters => "parameters",
788 Self::SessionVariables => "session_variables",
789 Self::IdentifierSyntax => "identifier_syntax",
790 Self::TableExpressions => "table_expressions",
791 Self::JoinSyntax => "join_syntax",
792 Self::TableFactorSyntax => "table_factor_syntax",
793 Self::ExpressionSyntax => "expression_syntax",
794 Self::OperatorSyntax => "operator_syntax",
795 Self::CallSyntax => "call_syntax",
796 Self::StringFuncForms => "string_func_forms",
797 Self::AggregateCallSyntax => "aggregate_call_syntax",
798 Self::PredicateSyntax => "predicate_syntax",
799 Self::PipeOperator => "pipe_operator",
800 Self::DoubleAmpersand => "double_ampersand",
801 Self::KeywordOperators => "keyword_operators",
802 Self::CaretOperator => "caret_operator",
803 Self::HashBitwiseXor => "hash_bitwise_xor",
804 Self::CommentSyntax => "comment_syntax",
805 Self::MutationSyntax => "mutation_syntax",
806 Self::StatementDdlGates => "statement_ddl_gates",
807 Self::CreateTableClauseSyntax => "create_table_clause_syntax",
808 Self::ColumnDefinitionSyntax => "column_definition_syntax",
809 Self::ConstraintSyntax => "constraint_syntax",
810 Self::IndexAlterSyntax => "index_alter_syntax",
811 Self::ExistenceGuards => "existence_guards",
812 Self::SelectSyntax => "select_syntax",
813 Self::QueryTailSyntax => "query_tail_syntax",
814 Self::GroupingSyntax => "grouping_syntax",
815 Self::UtilitySyntax => "utility_syntax",
816 Self::ShowSyntax => "show_syntax",
817 Self::MaintenanceSyntax => "maintenance_syntax",
818 Self::AccessControlSyntax => "access_control_syntax",
819 Self::TypeNameSyntax => "type_name_syntax",
820 Self::TargetSpelling => "target_spelling",
821 }
822 }
823 pub const fn maturity(&self) -> Maturity {
825 Maturity::Stable
826 }
827 pub const fn ideally_enabled(&self) -> bool {
831 true
832 }
833 pub const fn iso_id(&self) -> Option<&'static str> {
838 match self {
839 Self::IdentifierQuote => Some("E031-01"),
840 Self::PredicateSyntax => Some("E021-08"),
841 Self::PipeOperator => Some("E021-07"),
842 _ => None,
843 }
844 }
845 pub const fn metadata(&self) -> FeatureMetadata {
847 FeatureMetadata {
848 feature: *self,
849 id: self.id(),
850 iso_id: self.iso_id(),
851 ideally_enabled: self.ideally_enabled(),
852 maturity: self.maturity(),
853 }
854 }
855}
856pub const FEATURES: &[Feature] = &Feature::ALL;
858pub const FEATURE_METADATA: &[FeatureMetadata] = &[
860 Feature::IdentifierCasing.metadata(),
861 Feature::IdentifierQuote.metadata(),
862 Feature::DefaultNullOrdering.metadata(),
863 Feature::ReservedColumnName.metadata(),
864 Feature::ReservedFunctionName.metadata(),
865 Feature::ReservedTypeName.metadata(),
866 Feature::ReservedBareAlias.metadata(),
867 Feature::ReservedAsLabel.metadata(),
868 Feature::CatalogQualifiedNames.metadata(),
869 Feature::ByteClasses.metadata(),
870 Feature::BindingPowers.metadata(),
871 Feature::SetOperationPowers.metadata(),
872 Feature::StringLiterals.metadata(),
873 Feature::NumericLiterals.metadata(),
874 Feature::Parameters.metadata(),
875 Feature::SessionVariables.metadata(),
876 Feature::IdentifierSyntax.metadata(),
877 Feature::TableExpressions.metadata(),
878 Feature::JoinSyntax.metadata(),
879 Feature::TableFactorSyntax.metadata(),
880 Feature::ExpressionSyntax.metadata(),
881 Feature::OperatorSyntax.metadata(),
882 Feature::CallSyntax.metadata(),
883 Feature::StringFuncForms.metadata(),
884 Feature::AggregateCallSyntax.metadata(),
885 Feature::PredicateSyntax.metadata(),
886 Feature::PipeOperator.metadata(),
887 Feature::DoubleAmpersand.metadata(),
888 Feature::KeywordOperators.metadata(),
889 Feature::CaretOperator.metadata(),
890 Feature::HashBitwiseXor.metadata(),
891 Feature::CommentSyntax.metadata(),
892 Feature::MutationSyntax.metadata(),
893 Feature::StatementDdlGates.metadata(),
894 Feature::CreateTableClauseSyntax.metadata(),
895 Feature::ColumnDefinitionSyntax.metadata(),
896 Feature::ConstraintSyntax.metadata(),
897 Feature::IndexAlterSyntax.metadata(),
898 Feature::ExistenceGuards.metadata(),
899 Feature::SelectSyntax.metadata(),
900 Feature::QueryTailSyntax.metadata(),
901 Feature::GroupingSyntax.metadata(),
902 Feature::UtilitySyntax.metadata(),
903 Feature::ShowSyntax.metadata(),
904 Feature::MaintenanceSyntax.metadata(),
905 Feature::AccessControlSyntax.metadata(),
906 Feature::TypeNameSyntax.metadata(),
907 Feature::TargetSpelling.metadata(),
908];