mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
add test for VALIDATE CONSTRAINT
This commit is contained in:
parent
7947c6a72e
commit
6b1bc3716a
1 changed files with 13 additions and 0 deletions
|
@ -6259,3 +6259,16 @@ fn parse_alter_table_constraint_not_valid() {
|
|||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parse_alter_table_validate_constraint() {
|
||||
match pg().verified_stmt("ALTER TABLE foo VALIDATE CONSTRAINT bar") {
|
||||
Statement::AlterTable { operations, .. } => {
|
||||
assert_eq!(
|
||||
operations,
|
||||
vec![AlterTableOperation::ValidateConstraint { name: "bar".into() }]
|
||||
);
|
||||
}
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue