mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-07-07 17:04:59 +00:00
Add dialect flags for NOT VALID and VALIDATE CONSTRAINT
This commit is contained in:
parent
abd80f9ecb
commit
aa97b73074
2 changed files with 22 additions and 0 deletions
|
@ -1060,6 +1060,20 @@ pub trait Dialect: Debug + Any {
|
|||
fn supports_space_separated_column_options(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Returns true if the dialect supports `ADD <table_constraint> [NOT VALID]` in `ALTER TABLE` statements.
|
||||
///
|
||||
/// -[PostgreSQL](https://www.postgresql.org/docs/17/sql-altertable.html)
|
||||
fn supports_constraint_not_validation(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
/// Returns true if the dialect supports `VALIDATE CONSTRAINT <constraint_name>` in `ALTER TABLE` statements.
|
||||
///
|
||||
/// -[PostgreSQL](https://www.postgresql.org/docs/17/sql-altertable.html)
|
||||
fn supports_validate_constraint(&self) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
/// This represents the operators for which precedence must be defined
|
||||
|
|
|
@ -258,4 +258,12 @@ impl Dialect for PostgreSqlDialect {
|
|||
fn supports_set_names(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn supports_constraint_not_validation(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn supports_validate_constraint(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue