LucaCappelletti94 opened a new pull request, #2062:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/2062

   This PR adds support for the [SQL standard `MATCH [FULL | PARTIAL | SIMPLE]` 
syntax](https://www.postgresql.org/docs/current/ddl-constraints.html#DDL-CONSTRAINTS-FK)
 for foreign key constraints.
   
   ### Changes
   
   - Extended keywords to include `PARTIAL` and `SIMPLE`
   - New `MatchKind` enum with `Full`, `Partial`, and `Simple` variants
   - Parser support for `MATCH` syntax in both column-level and table-level 
foreign key constraints
   - Refactored `ColumnOption::ForeignKey` to use `ForeignKeyConstraint` 
struct, eliminating code duplication
   - Added opportune tests
   - Added opportune documentation for newly supported syntax
   
   ### Examples
   ```sql
   -- Column-level constraint
   CREATE TABLE orders (
       id INT REFERENCES customers(id) MATCH FULL ON DELETE CASCADE
   );
   
   -- Table-level constraint  
   CREATE TABLE orders (
       customer_id INT,
       FOREIGN KEY (customer_id) REFERENCES customers(id) MATCH SIMPLE
   );
   ```
   
   Closes issue #2061 and works towards closing issue #2059


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to