JSqlParser icon indicating copy to clipboard operation
JSqlParser copied to clipboard

[BUG] 5.0 : NamedConstraint.getType() incorrectly returns "UNIQUE KEY" for UNIQUE still exists

Open rasa-app opened this issue 5 months ago • 0 comments

Failing SQL Feature:

This is related to #1164 and happens when UNIQUE is after FOREIGN KEY

SQL Example:

  • Simplified Query Example, focusing on the failing feature
    CREATE TABLE employees (
    employee_number    int         NOT NULL
    , employee_name    char (50)   NOT NULL
    , department_id    int
    , salary           int
    , PRIMARY KEY (employee_number)
    , FOREIGN KEY (department_id) REFERENCES departments(id)
    , UNIQUE (employee_name));
    

Software Information:

  • JSqlParser version : 5.0
  • Database (e. g. Oracle, MS SQL Server, H2, PostgreSQL, IBM DB2 )

rasa-app avatar Sep 27 '24 10:09 rasa-app