Refactored ColumnOption::Unique to reuse UniqueConstraint and PrimaryKeyConstraint (#2064)
Some checks are pending
license / Release Audit Tool (RAT) (push) Waiting to run
Rust / codestyle (push) Waiting to run
Rust / lint (push) Waiting to run
Rust / benchmark-lint (push) Waiting to run
Rust / compile (push) Waiting to run
Rust / docs (push) Waiting to run
Rust / compile-no-std (push) Waiting to run
Rust / test (beta) (push) Waiting to run
Rust / test (nightly) (push) Waiting to run
Rust / test (stable) (push) Waiting to run

This commit is contained in:
Luca Cappelletti 2025-10-21 10:05:02 +02:00 committed by GitHub
parent f861566c8d
commit 9cc9f9ab38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 152 additions and 54 deletions

View file

@ -217,10 +217,14 @@ fn parse_create_table_auto_increment() {
options: vec![
ColumnOptionDef {
name: None,
option: ColumnOption::Unique {
is_primary: true,
characteristics: None
},
option: ColumnOption::PrimaryKey(PrimaryKeyConstraint {
name: None,
index_name: None,
index_type: None,
columns: vec![],
index_options: vec![],
characteristics: None,
}),
},
ColumnOptionDef {
name: None,
@ -245,10 +249,14 @@ fn parse_create_table_primary_key_asc_desc() {
options: vec![
ColumnOptionDef {
name: None,
option: ColumnOption::Unique {
is_primary: true,
option: ColumnOption::PrimaryKey(PrimaryKeyConstraint {
name: None,
index_name: None,
index_type: None,
columns: vec![],
index_options: vec![],
characteristics: None,
},
}),
},
ColumnOptionDef {
name: None,