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 view_sequence_clause_syntax: Option<ViewSequenceClauseSyntax>,
94 pub create_table_clause_syntax: Option<CreateTableClauseSyntax>,
96 pub column_definition_syntax: Option<ColumnDefinitionSyntax>,
98 pub constraint_syntax: Option<ConstraintSyntax>,
100 pub index_alter_syntax: Option<IndexAlterSyntax>,
102 pub existence_guards: Option<ExistenceGuards>,
104 pub select_syntax: Option<SelectSyntax>,
106 pub query_tail_syntax: Option<QueryTailSyntax>,
108 pub grouping_syntax: Option<GroupingSyntax>,
110 pub utility_syntax: Option<UtilitySyntax>,
112 pub transaction_syntax: Option<TransactionSyntax>,
114 pub show_syntax: Option<ShowSyntax>,
116 pub maintenance_syntax: Option<MaintenanceSyntax>,
118 pub access_control_syntax: Option<AccessControlSyntax>,
120 pub type_name_syntax: Option<TypeNameSyntax>,
122 pub target_spelling: Option<TargetSpelling>,
124}
125impl FeatureDelta {
126 pub const EMPTY: Self = Self {
128 identifier_casing: None,
129 identifier_quotes: None,
130 default_null_ordering: None,
131 reserved_column_name: None,
132 reserved_function_name: None,
133 reserved_type_name: None,
134 reserved_bare_alias: None,
135 reserved_as_label: None,
136 catalog_qualified_names: None,
137 byte_classes: None,
138 binding_powers: None,
139 set_operation_powers: None,
140 string_literals: None,
141 numeric_literals: None,
142 parameters: None,
143 session_variables: None,
144 identifier_syntax: None,
145 table_expressions: None,
146 join_syntax: None,
147 table_factor_syntax: None,
148 expression_syntax: None,
149 operator_syntax: None,
150 call_syntax: None,
151 string_func_forms: None,
152 aggregate_call_syntax: None,
153 predicate_syntax: None,
154 pipe_operator: None,
155 double_ampersand: None,
156 keyword_operators: None,
157 caret_operator: None,
158 hash_bitwise_xor: None,
159 comment_syntax: None,
160 mutation_syntax: None,
161 statement_ddl_gates: None,
162 view_sequence_clause_syntax: None,
163 create_table_clause_syntax: None,
164 column_definition_syntax: None,
165 constraint_syntax: None,
166 index_alter_syntax: None,
167 existence_guards: None,
168 select_syntax: None,
169 query_tail_syntax: None,
170 grouping_syntax: None,
171 utility_syntax: None,
172 transaction_syntax: None,
173 show_syntax: None,
174 maintenance_syntax: None,
175 access_control_syntax: None,
176 type_name_syntax: None,
177 target_spelling: None,
178 };
179 pub const fn identifier_casing(mut self, value: Casing) -> Self {
181 self.identifier_casing = Some(value);
182 self
183 }
184 pub const fn identifier_quotes(mut self, value: &'static [IdentifierQuote]) -> Self {
186 self.identifier_quotes = Some(value);
187 self
188 }
189 pub const fn default_null_ordering(mut self, value: NullOrdering) -> Self {
191 self.default_null_ordering = Some(value);
192 self
193 }
194 pub const fn reserved_column_name(mut self, value: KeywordSet) -> Self {
196 self.reserved_column_name = Some(value);
197 self
198 }
199 pub const fn reserved_function_name(mut self, value: KeywordSet) -> Self {
201 self.reserved_function_name = Some(value);
202 self
203 }
204 pub const fn reserved_type_name(mut self, value: KeywordSet) -> Self {
206 self.reserved_type_name = Some(value);
207 self
208 }
209 pub const fn reserved_bare_alias(mut self, value: KeywordSet) -> Self {
211 self.reserved_bare_alias = Some(value);
212 self
213 }
214 pub const fn reserved_as_label(mut self, value: KeywordSet) -> Self {
216 self.reserved_as_label = Some(value);
217 self
218 }
219 pub const fn catalog_qualified_names(mut self, value: bool) -> Self {
221 self.catalog_qualified_names = Some(value);
222 self
223 }
224 pub const fn byte_classes(mut self, value: ByteClasses) -> Self {
226 self.byte_classes = Some(value);
227 self
228 }
229 pub const fn binding_powers(mut self, value: BindingPowerTable) -> Self {
231 self.binding_powers = Some(value);
232 self
233 }
234 pub const fn set_operation_powers(mut self, value: SetOperationBindingPowerTable) -> Self {
236 self.set_operation_powers = Some(value);
237 self
238 }
239 pub const fn string_literals(mut self, value: StringLiteralSyntax) -> Self {
241 self.string_literals = Some(value);
242 self
243 }
244 pub const fn numeric_literals(mut self, value: NumericLiteralSyntax) -> Self {
246 self.numeric_literals = Some(value);
247 self
248 }
249 pub const fn parameters(mut self, value: ParameterSyntax) -> Self {
251 self.parameters = Some(value);
252 self
253 }
254 pub const fn session_variables(mut self, value: SessionVariableSyntax) -> Self {
256 self.session_variables = Some(value);
257 self
258 }
259 pub const fn identifier_syntax(mut self, value: IdentifierSyntax) -> Self {
261 self.identifier_syntax = Some(value);
262 self
263 }
264 pub const fn table_expressions(mut self, value: TableExpressionSyntax) -> Self {
266 self.table_expressions = Some(value);
267 self
268 }
269 pub const fn join_syntax(mut self, value: JoinSyntax) -> Self {
271 self.join_syntax = Some(value);
272 self
273 }
274 pub const fn table_factor_syntax(mut self, value: TableFactorSyntax) -> Self {
276 self.table_factor_syntax = Some(value);
277 self
278 }
279 pub const fn expression_syntax(mut self, value: ExpressionSyntax) -> Self {
281 self.expression_syntax = Some(value);
282 self
283 }
284 pub const fn operator_syntax(mut self, value: OperatorSyntax) -> Self {
286 self.operator_syntax = Some(value);
287 self
288 }
289 pub const fn call_syntax(mut self, value: CallSyntax) -> Self {
291 self.call_syntax = Some(value);
292 self
293 }
294 pub const fn string_func_forms(mut self, value: StringFuncForms) -> Self {
296 self.string_func_forms = Some(value);
297 self
298 }
299 pub const fn aggregate_call_syntax(mut self, value: AggregateCallSyntax) -> Self {
301 self.aggregate_call_syntax = Some(value);
302 self
303 }
304 pub const fn predicate_syntax(mut self, value: PredicateSyntax) -> Self {
306 self.predicate_syntax = Some(value);
307 self
308 }
309 pub const fn pipe_operator(mut self, value: PipeOperator) -> Self {
311 self.pipe_operator = Some(value);
312 self
313 }
314 pub const fn double_ampersand(mut self, value: DoubleAmpersand) -> Self {
316 self.double_ampersand = Some(value);
317 self
318 }
319 pub const fn keyword_operators(mut self, value: KeywordOperators) -> Self {
321 self.keyword_operators = Some(value);
322 self
323 }
324 pub const fn caret_operator(mut self, value: CaretOperator) -> Self {
326 self.caret_operator = Some(value);
327 self
328 }
329 pub const fn hash_bitwise_xor(mut self, value: bool) -> Self {
331 self.hash_bitwise_xor = Some(value);
332 self
333 }
334 pub const fn comment_syntax(mut self, value: CommentSyntax) -> Self {
336 self.comment_syntax = Some(value);
337 self
338 }
339 pub const fn mutation_syntax(mut self, value: MutationSyntax) -> Self {
341 self.mutation_syntax = Some(value);
342 self
343 }
344 pub const fn statement_ddl_gates(mut self, value: StatementDdlGates) -> Self {
346 self.statement_ddl_gates = Some(value);
347 self
348 }
349 pub const fn view_sequence_clause_syntax(mut self, value: ViewSequenceClauseSyntax) -> Self {
351 self.view_sequence_clause_syntax = Some(value);
352 self
353 }
354 pub const fn create_table_clause_syntax(mut self, value: CreateTableClauseSyntax) -> Self {
356 self.create_table_clause_syntax = Some(value);
357 self
358 }
359 pub const fn column_definition_syntax(mut self, value: ColumnDefinitionSyntax) -> Self {
361 self.column_definition_syntax = Some(value);
362 self
363 }
364 pub const fn constraint_syntax(mut self, value: ConstraintSyntax) -> Self {
366 self.constraint_syntax = Some(value);
367 self
368 }
369 pub const fn index_alter_syntax(mut self, value: IndexAlterSyntax) -> Self {
371 self.index_alter_syntax = Some(value);
372 self
373 }
374 pub const fn existence_guards(mut self, value: ExistenceGuards) -> Self {
376 self.existence_guards = Some(value);
377 self
378 }
379 pub const fn select_syntax(mut self, value: SelectSyntax) -> Self {
381 self.select_syntax = Some(value);
382 self
383 }
384 pub const fn query_tail_syntax(mut self, value: QueryTailSyntax) -> Self {
386 self.query_tail_syntax = Some(value);
387 self
388 }
389 pub const fn grouping_syntax(mut self, value: GroupingSyntax) -> Self {
391 self.grouping_syntax = Some(value);
392 self
393 }
394 pub const fn utility_syntax(mut self, value: UtilitySyntax) -> Self {
396 self.utility_syntax = Some(value);
397 self
398 }
399 pub const fn transaction_syntax(mut self, value: TransactionSyntax) -> Self {
401 self.transaction_syntax = Some(value);
402 self
403 }
404 pub const fn show_syntax(mut self, value: ShowSyntax) -> Self {
406 self.show_syntax = Some(value);
407 self
408 }
409 pub const fn maintenance_syntax(mut self, value: MaintenanceSyntax) -> Self {
411 self.maintenance_syntax = Some(value);
412 self
413 }
414 pub const fn access_control_syntax(mut self, value: AccessControlSyntax) -> Self {
416 self.access_control_syntax = Some(value);
417 self
418 }
419 pub const fn type_name_syntax(mut self, value: TypeNameSyntax) -> Self {
421 self.type_name_syntax = Some(value);
422 self
423 }
424 pub const fn target_spelling(mut self, value: TargetSpelling) -> Self {
426 self.target_spelling = Some(value);
427 self
428 }
429}
430impl Default for FeatureDelta {
431 fn default() -> Self {
432 Self::EMPTY
433 }
434}
435impl FeatureSet {
436 pub const fn with(&self, delta: FeatureDelta) -> Self {
438 Self {
439 identifier_casing: match delta.identifier_casing {
440 Some(value) => value,
441 None => self.identifier_casing,
442 },
443 identifier_quotes: match delta.identifier_quotes {
444 Some(value) => value,
445 None => self.identifier_quotes,
446 },
447 default_null_ordering: match delta.default_null_ordering {
448 Some(value) => value,
449 None => self.default_null_ordering,
450 },
451 reserved_column_name: match delta.reserved_column_name {
452 Some(value) => value,
453 None => self.reserved_column_name,
454 },
455 reserved_function_name: match delta.reserved_function_name {
456 Some(value) => value,
457 None => self.reserved_function_name,
458 },
459 reserved_type_name: match delta.reserved_type_name {
460 Some(value) => value,
461 None => self.reserved_type_name,
462 },
463 reserved_bare_alias: match delta.reserved_bare_alias {
464 Some(value) => value,
465 None => self.reserved_bare_alias,
466 },
467 reserved_as_label: match delta.reserved_as_label {
468 Some(value) => value,
469 None => self.reserved_as_label,
470 },
471 catalog_qualified_names: match delta.catalog_qualified_names {
472 Some(value) => value,
473 None => self.catalog_qualified_names,
474 },
475 byte_classes: match delta.byte_classes {
476 Some(value) => value,
477 None => self.byte_classes,
478 },
479 binding_powers: match delta.binding_powers {
480 Some(value) => value,
481 None => self.binding_powers,
482 },
483 set_operation_powers: match delta.set_operation_powers {
484 Some(value) => value,
485 None => self.set_operation_powers,
486 },
487 string_literals: match delta.string_literals {
488 Some(value) => value,
489 None => self.string_literals,
490 },
491 numeric_literals: match delta.numeric_literals {
492 Some(value) => value,
493 None => self.numeric_literals,
494 },
495 parameters: match delta.parameters {
496 Some(value) => value,
497 None => self.parameters,
498 },
499 session_variables: match delta.session_variables {
500 Some(value) => value,
501 None => self.session_variables,
502 },
503 identifier_syntax: match delta.identifier_syntax {
504 Some(value) => value,
505 None => self.identifier_syntax,
506 },
507 table_expressions: match delta.table_expressions {
508 Some(value) => value,
509 None => self.table_expressions,
510 },
511 join_syntax: match delta.join_syntax {
512 Some(value) => value,
513 None => self.join_syntax,
514 },
515 table_factor_syntax: match delta.table_factor_syntax {
516 Some(value) => value,
517 None => self.table_factor_syntax,
518 },
519 expression_syntax: match delta.expression_syntax {
520 Some(value) => value,
521 None => self.expression_syntax,
522 },
523 operator_syntax: match delta.operator_syntax {
524 Some(value) => value,
525 None => self.operator_syntax,
526 },
527 call_syntax: match delta.call_syntax {
528 Some(value) => value,
529 None => self.call_syntax,
530 },
531 string_func_forms: match delta.string_func_forms {
532 Some(value) => value,
533 None => self.string_func_forms,
534 },
535 aggregate_call_syntax: match delta.aggregate_call_syntax {
536 Some(value) => value,
537 None => self.aggregate_call_syntax,
538 },
539 predicate_syntax: match delta.predicate_syntax {
540 Some(value) => value,
541 None => self.predicate_syntax,
542 },
543 pipe_operator: match delta.pipe_operator {
544 Some(value) => value,
545 None => self.pipe_operator,
546 },
547 double_ampersand: match delta.double_ampersand {
548 Some(value) => value,
549 None => self.double_ampersand,
550 },
551 keyword_operators: match delta.keyword_operators {
552 Some(value) => value,
553 None => self.keyword_operators,
554 },
555 caret_operator: match delta.caret_operator {
556 Some(value) => value,
557 None => self.caret_operator,
558 },
559 hash_bitwise_xor: match delta.hash_bitwise_xor {
560 Some(value) => value,
561 None => self.hash_bitwise_xor,
562 },
563 comment_syntax: match delta.comment_syntax {
564 Some(value) => value,
565 None => self.comment_syntax,
566 },
567 mutation_syntax: match delta.mutation_syntax {
568 Some(value) => value,
569 None => self.mutation_syntax,
570 },
571 statement_ddl_gates: match delta.statement_ddl_gates {
572 Some(value) => value,
573 None => self.statement_ddl_gates,
574 },
575 view_sequence_clause_syntax: match delta.view_sequence_clause_syntax {
576 Some(value) => value,
577 None => self.view_sequence_clause_syntax,
578 },
579 create_table_clause_syntax: match delta.create_table_clause_syntax {
580 Some(value) => value,
581 None => self.create_table_clause_syntax,
582 },
583 column_definition_syntax: match delta.column_definition_syntax {
584 Some(value) => value,
585 None => self.column_definition_syntax,
586 },
587 constraint_syntax: match delta.constraint_syntax {
588 Some(value) => value,
589 None => self.constraint_syntax,
590 },
591 index_alter_syntax: match delta.index_alter_syntax {
592 Some(value) => value,
593 None => self.index_alter_syntax,
594 },
595 existence_guards: match delta.existence_guards {
596 Some(value) => value,
597 None => self.existence_guards,
598 },
599 select_syntax: match delta.select_syntax {
600 Some(value) => value,
601 None => self.select_syntax,
602 },
603 query_tail_syntax: match delta.query_tail_syntax {
604 Some(value) => value,
605 None => self.query_tail_syntax,
606 },
607 grouping_syntax: match delta.grouping_syntax {
608 Some(value) => value,
609 None => self.grouping_syntax,
610 },
611 utility_syntax: match delta.utility_syntax {
612 Some(value) => value,
613 None => self.utility_syntax,
614 },
615 transaction_syntax: match delta.transaction_syntax {
616 Some(value) => value,
617 None => self.transaction_syntax,
618 },
619 show_syntax: match delta.show_syntax {
620 Some(value) => value,
621 None => self.show_syntax,
622 },
623 maintenance_syntax: match delta.maintenance_syntax {
624 Some(value) => value,
625 None => self.maintenance_syntax,
626 },
627 access_control_syntax: match delta.access_control_syntax {
628 Some(value) => value,
629 None => self.access_control_syntax,
630 },
631 type_name_syntax: match delta.type_name_syntax {
632 Some(value) => value,
633 None => self.type_name_syntax,
634 },
635 target_spelling: match delta.target_spelling {
636 Some(value) => value,
637 None => self.target_spelling,
638 },
639 }
640 }
641}
642#[derive(Clone, Copy, Debug, PartialEq, Eq)]
644pub enum Feature {
645 IdentifierCasing,
647 IdentifierQuote,
649 DefaultNullOrdering,
651 ReservedColumnName,
653 ReservedFunctionName,
655 ReservedTypeName,
657 ReservedBareAlias,
659 ReservedAsLabel,
661 CatalogQualifiedNames,
663 ByteClasses,
665 BindingPowers,
667 SetOperationPowers,
669 StringLiterals,
671 NumericLiterals,
673 Parameters,
675 SessionVariables,
677 IdentifierSyntax,
679 TableExpressions,
681 JoinSyntax,
683 TableFactorSyntax,
685 ExpressionSyntax,
687 OperatorSyntax,
689 CallSyntax,
691 StringFuncForms,
693 AggregateCallSyntax,
695 PredicateSyntax,
697 PipeOperator,
699 DoubleAmpersand,
701 KeywordOperators,
703 CaretOperator,
705 HashBitwiseXor,
707 CommentSyntax,
709 MutationSyntax,
711 StatementDdlGates,
713 ViewSequenceClauseSyntax,
715 CreateTableClauseSyntax,
717 ColumnDefinitionSyntax,
719 ConstraintSyntax,
721 IndexAlterSyntax,
723 ExistenceGuards,
725 SelectSyntax,
727 QueryTailSyntax,
729 GroupingSyntax,
731 UtilitySyntax,
733 TransactionSyntax,
735 ShowSyntax,
737 MaintenanceSyntax,
739 AccessControlSyntax,
741 TypeNameSyntax,
743 TargetSpelling,
745}
746impl Feature {
747 pub const ALL: [Self; 50] = [
749 Self::IdentifierCasing,
750 Self::IdentifierQuote,
751 Self::DefaultNullOrdering,
752 Self::ReservedColumnName,
753 Self::ReservedFunctionName,
754 Self::ReservedTypeName,
755 Self::ReservedBareAlias,
756 Self::ReservedAsLabel,
757 Self::CatalogQualifiedNames,
758 Self::ByteClasses,
759 Self::BindingPowers,
760 Self::SetOperationPowers,
761 Self::StringLiterals,
762 Self::NumericLiterals,
763 Self::Parameters,
764 Self::SessionVariables,
765 Self::IdentifierSyntax,
766 Self::TableExpressions,
767 Self::JoinSyntax,
768 Self::TableFactorSyntax,
769 Self::ExpressionSyntax,
770 Self::OperatorSyntax,
771 Self::CallSyntax,
772 Self::StringFuncForms,
773 Self::AggregateCallSyntax,
774 Self::PredicateSyntax,
775 Self::PipeOperator,
776 Self::DoubleAmpersand,
777 Self::KeywordOperators,
778 Self::CaretOperator,
779 Self::HashBitwiseXor,
780 Self::CommentSyntax,
781 Self::MutationSyntax,
782 Self::StatementDdlGates,
783 Self::ViewSequenceClauseSyntax,
784 Self::CreateTableClauseSyntax,
785 Self::ColumnDefinitionSyntax,
786 Self::ConstraintSyntax,
787 Self::IndexAlterSyntax,
788 Self::ExistenceGuards,
789 Self::SelectSyntax,
790 Self::QueryTailSyntax,
791 Self::GroupingSyntax,
792 Self::UtilitySyntax,
793 Self::TransactionSyntax,
794 Self::ShowSyntax,
795 Self::MaintenanceSyntax,
796 Self::AccessControlSyntax,
797 Self::TypeNameSyntax,
798 Self::TargetSpelling,
799 ];
800 pub const fn id(&self) -> &'static str {
802 match self {
803 Self::IdentifierCasing => "identifier_casing",
804 Self::IdentifierQuote => "identifier_quote",
805 Self::DefaultNullOrdering => "default_null_ordering",
806 Self::ReservedColumnName => "reserved_column_name",
807 Self::ReservedFunctionName => "reserved_function_name",
808 Self::ReservedTypeName => "reserved_type_name",
809 Self::ReservedBareAlias => "reserved_bare_alias",
810 Self::ReservedAsLabel => "reserved_as_label",
811 Self::CatalogQualifiedNames => "catalog_qualified_names",
812 Self::ByteClasses => "byte_classes",
813 Self::BindingPowers => "binding_powers",
814 Self::SetOperationPowers => "set_operation_powers",
815 Self::StringLiterals => "string_literals",
816 Self::NumericLiterals => "numeric_literals",
817 Self::Parameters => "parameters",
818 Self::SessionVariables => "session_variables",
819 Self::IdentifierSyntax => "identifier_syntax",
820 Self::TableExpressions => "table_expressions",
821 Self::JoinSyntax => "join_syntax",
822 Self::TableFactorSyntax => "table_factor_syntax",
823 Self::ExpressionSyntax => "expression_syntax",
824 Self::OperatorSyntax => "operator_syntax",
825 Self::CallSyntax => "call_syntax",
826 Self::StringFuncForms => "string_func_forms",
827 Self::AggregateCallSyntax => "aggregate_call_syntax",
828 Self::PredicateSyntax => "predicate_syntax",
829 Self::PipeOperator => "pipe_operator",
830 Self::DoubleAmpersand => "double_ampersand",
831 Self::KeywordOperators => "keyword_operators",
832 Self::CaretOperator => "caret_operator",
833 Self::HashBitwiseXor => "hash_bitwise_xor",
834 Self::CommentSyntax => "comment_syntax",
835 Self::MutationSyntax => "mutation_syntax",
836 Self::StatementDdlGates => "statement_ddl_gates",
837 Self::ViewSequenceClauseSyntax => "view_sequence_clause_syntax",
838 Self::CreateTableClauseSyntax => "create_table_clause_syntax",
839 Self::ColumnDefinitionSyntax => "column_definition_syntax",
840 Self::ConstraintSyntax => "constraint_syntax",
841 Self::IndexAlterSyntax => "index_alter_syntax",
842 Self::ExistenceGuards => "existence_guards",
843 Self::SelectSyntax => "select_syntax",
844 Self::QueryTailSyntax => "query_tail_syntax",
845 Self::GroupingSyntax => "grouping_syntax",
846 Self::UtilitySyntax => "utility_syntax",
847 Self::TransactionSyntax => "transaction_syntax",
848 Self::ShowSyntax => "show_syntax",
849 Self::MaintenanceSyntax => "maintenance_syntax",
850 Self::AccessControlSyntax => "access_control_syntax",
851 Self::TypeNameSyntax => "type_name_syntax",
852 Self::TargetSpelling => "target_spelling",
853 }
854 }
855 pub const fn maturity(&self) -> Maturity {
857 Maturity::Stable
858 }
859 pub const fn ideally_enabled(&self) -> bool {
863 true
864 }
865 pub const fn iso_id(&self) -> Option<&'static str> {
870 match self {
871 Self::IdentifierQuote => Some("E031-01"),
872 Self::PredicateSyntax => Some("E021-08"),
873 Self::PipeOperator => Some("E021-07"),
874 _ => None,
875 }
876 }
877 pub const fn metadata(&self) -> FeatureMetadata {
879 FeatureMetadata {
880 feature: *self,
881 id: self.id(),
882 iso_id: self.iso_id(),
883 ideally_enabled: self.ideally_enabled(),
884 maturity: self.maturity(),
885 }
886 }
887}
888pub const FEATURES: &[Feature] = &Feature::ALL;
890pub const FEATURE_METADATA: &[FeatureMetadata] = &[
892 Feature::IdentifierCasing.metadata(),
893 Feature::IdentifierQuote.metadata(),
894 Feature::DefaultNullOrdering.metadata(),
895 Feature::ReservedColumnName.metadata(),
896 Feature::ReservedFunctionName.metadata(),
897 Feature::ReservedTypeName.metadata(),
898 Feature::ReservedBareAlias.metadata(),
899 Feature::ReservedAsLabel.metadata(),
900 Feature::CatalogQualifiedNames.metadata(),
901 Feature::ByteClasses.metadata(),
902 Feature::BindingPowers.metadata(),
903 Feature::SetOperationPowers.metadata(),
904 Feature::StringLiterals.metadata(),
905 Feature::NumericLiterals.metadata(),
906 Feature::Parameters.metadata(),
907 Feature::SessionVariables.metadata(),
908 Feature::IdentifierSyntax.metadata(),
909 Feature::TableExpressions.metadata(),
910 Feature::JoinSyntax.metadata(),
911 Feature::TableFactorSyntax.metadata(),
912 Feature::ExpressionSyntax.metadata(),
913 Feature::OperatorSyntax.metadata(),
914 Feature::CallSyntax.metadata(),
915 Feature::StringFuncForms.metadata(),
916 Feature::AggregateCallSyntax.metadata(),
917 Feature::PredicateSyntax.metadata(),
918 Feature::PipeOperator.metadata(),
919 Feature::DoubleAmpersand.metadata(),
920 Feature::KeywordOperators.metadata(),
921 Feature::CaretOperator.metadata(),
922 Feature::HashBitwiseXor.metadata(),
923 Feature::CommentSyntax.metadata(),
924 Feature::MutationSyntax.metadata(),
925 Feature::StatementDdlGates.metadata(),
926 Feature::ViewSequenceClauseSyntax.metadata(),
927 Feature::CreateTableClauseSyntax.metadata(),
928 Feature::ColumnDefinitionSyntax.metadata(),
929 Feature::ConstraintSyntax.metadata(),
930 Feature::IndexAlterSyntax.metadata(),
931 Feature::ExistenceGuards.metadata(),
932 Feature::SelectSyntax.metadata(),
933 Feature::QueryTailSyntax.metadata(),
934 Feature::GroupingSyntax.metadata(),
935 Feature::UtilitySyntax.metadata(),
936 Feature::TransactionSyntax.metadata(),
937 Feature::ShowSyntax.metadata(),
938 Feature::MaintenanceSyntax.metadata(),
939 Feature::AccessControlSyntax.metadata(),
940 Feature::TypeNameSyntax.metadata(),
941 Feature::TargetSpelling.metadata(),
942];