Icesource commented on a change in pull request #10383:
URL: https://github.com/apache/shardingsphere/pull/10383#discussion_r636615131
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -91,6 +91,18 @@ columnConstraint
: (CONSTRAINT ignoredIdentifier)? (primaryKeyConstraint |
columnForeignKeyConstraint | checkConstraint)
;
+computedColumnConstraint
+ : (CONSTRAINT ignoredIdentifier)? (primaryKeyConstraint |
computedColumnForeignKeyConstraint | checkConstraint)
+ ;
+
+computedColumnForeignKeyConstraint
+ : (FOREIGN KEY)? tableName (LP_ columnName RP_)?
computedColumnForeignKeyOnAction*
+ ;
+
+computedColumnForeignKeyOnAction
+ : ON DELETE (NO ACTION | CASCADE) | ON UPDATE NO ACTION | NOT FOR
REPLICATION
+ ;
+
Review comment:
@jingshanglu Of course, I try to extract the redundant code into a
syntax ```commonColumnConstraint``` in the new commit. Do you think this change
is reasonable?
Besides, I add the syntax ```constraintName``` after ```indexName``` in
baseRule.g4 because [ CONSTRAINT constraint_name ] appeared many times.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]