Skip to content

Commit dd61527

Browse files
Merged conflict
1 parent 67be33d commit dd61527

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

src/ast/table_constraints.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
//! SQL Abstract Syntax Tree (AST) types for table constraints
1919
2020
use crate::ast::{
21-
display_comma_separated, display_separated, ConstraintCharacteristics, Expr, Ident,
22-
IndexColumn, IndexOption, IndexType, KeyOrIndexDisplay, ConstraintReferenceMatchKind, NullsDistinctOption,
23-
ObjectName, ReferentialAction,
21+
display_comma_separated, display_separated, ConstraintCharacteristics,
22+
ConstraintReferenceMatchKind, Expr, Ident, IndexColumn, IndexOption, IndexType,
23+
KeyOrIndexDisplay, NullsDistinctOption, ObjectName, ReferentialAction,
2424
};
2525
use crate::tokenizer::Span;
2626
use core::fmt;

tests/sqlparser_postgres.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6663,7 +6663,10 @@ fn parse_foreign_key_match_full() {
66636663
match &columns[0].options[1].option {
66646664
ColumnOption::ForeignKey(constraint) => {
66656665
assert_eq!(constraint.foreign_table.to_string(), "another_table");
6666-
assert_eq!(constraint.match_kind, Some(ConstraintReferenceMatchKind::Full));
6666+
assert_eq!(
6667+
constraint.match_kind,
6668+
Some(ConstraintReferenceMatchKind::Full)
6669+
);
66676670
}
66686671
_ => panic!("Expected ColumnOption::ForeignKey"),
66696672
}
@@ -6672,7 +6675,10 @@ fn parse_foreign_key_match_full() {
66726675
match &constraints[0] {
66736676
TableConstraint::ForeignKey(constraint) => {
66746677
assert_eq!(constraint.foreign_table.to_string(), "customers");
6675-
assert_eq!(constraint.match_kind, Some(ConstraintReferenceMatchKind::Full));
6678+
assert_eq!(
6679+
constraint.match_kind,
6680+
Some(ConstraintReferenceMatchKind::Full)
6681+
);
66766682
}
66776683
_ => panic!("Expected TableConstraint::ForeignKey"),
66786684
}
@@ -6696,7 +6702,10 @@ fn parse_foreign_key_match_simple() {
66966702
match &columns[0].options[1].option {
66976703
ColumnOption::ForeignKey(constraint) => {
66986704
assert_eq!(constraint.foreign_table.to_string(), "another_table");
6699-
assert_eq!(constraint.match_kind, Some(ConstraintReferenceMatchKind::Simple));
6705+
assert_eq!(
6706+
constraint.match_kind,
6707+
Some(ConstraintReferenceMatchKind::Simple)
6708+
);
67006709
}
67016710
_ => panic!("Expected ColumnOption::ForeignKey"),
67026711
}
@@ -6705,7 +6714,10 @@ fn parse_foreign_key_match_simple() {
67056714
match &constraints[0] {
67066715
TableConstraint::ForeignKey(constraint) => {
67076716
assert_eq!(constraint.foreign_table.to_string(), "customers");
6708-
assert_eq!(constraint.match_kind, Some(ConstraintReferenceMatchKind::Simple));
6717+
assert_eq!(
6718+
constraint.match_kind,
6719+
Some(ConstraintReferenceMatchKind::Simple)
6720+
);
67096721
}
67106722
_ => panic!("Expected TableConstraint::ForeignKey"),
67116723
}
@@ -6728,15 +6740,21 @@ fn parse_foreign_key_match_partial() {
67286740
match &columns[0].options[1].option {
67296741
ColumnOption::ForeignKey(constraint) => {
67306742
assert_eq!(constraint.foreign_table.to_string(), "another_table");
6731-
assert_eq!(constraint.match_kind, Some(ConstraintReferenceMatchKind::Partial));
6743+
assert_eq!(
6744+
constraint.match_kind,
6745+
Some(ConstraintReferenceMatchKind::Partial)
6746+
);
67326747
}
67336748
_ => panic!("Expected ColumnOption::ForeignKey"),
67346749
}
67356750

67366751
match &constraints[0] {
67376752
TableConstraint::ForeignKey(constraint) => {
67386753
assert_eq!(constraint.foreign_table.to_string(), "customers");
6739-
assert_eq!(constraint.match_kind, Some(ConstraintReferenceMatchKind::Partial));
6754+
assert_eq!(
6755+
constraint.match_kind,
6756+
Some(ConstraintReferenceMatchKind::Partial)
6757+
);
67406758
}
67416759
_ => panic!("Expected TableConstraint::ForeignKey"),
67426760
}

0 commit comments

Comments
 (0)