You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2021/04/14 06:38:33 UTC
[shardingsphere] branch master updated: feat: add object table
related rule. (#10083)
This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 157b8ac feat: add object table related rule. (#10083)
157b8ac is described below
commit 157b8ac3b2b76143e63f7e98c0be4d10cc82fc39
Author: coco <co...@gmail.com>
AuthorDate: Wed Apr 14 14:38:08 2021 +0800
feat: add object table related rule. (#10083)
---
.../src/main/antlr4/imports/oracle/BaseRule.g4 | 4 ++++
.../src/main/antlr4/imports/oracle/DDLStatement.g4 | 25 ++++++++++++++++------
2 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
index 5ce985b..6d67dae 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/BaseRule.g4
@@ -239,6 +239,10 @@ password
: identifier
;
+logGroupName
+ : identifier
+ ;
+
columnNames
: LP_? columnName (COMMA_ columnName)* RP_?
;
diff --git a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4 b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
index a74f4fc..89cdb53 100644
--- a/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
+++ b/shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
@@ -122,7 +122,9 @@ createParentClause
;
createObjectTableClause
- : OF objectName objectTableSubstitution? (LP_ objectProperties RP_)? (ON COMMIT (DELETE | PRESERVE) ROWS)?
+ : OF objectName objectTableSubstitution?
+ (LP_ objectProperties RP_)? (ON COMMIT (DELETE | PRESERVE) ROWS)?
+ oidClause? oidIndexClause? physicalProperties? tableProperties?
;
relationalProperties
@@ -401,11 +403,10 @@ alterExternalTable
;
objectProperties
- : objectProperty (COMMA_ objectProperty)*
- ;
-
-objectProperty
- : (columnName | attributeName) (DEFAULT expr)? (inlineConstraint* | inlineRefConstraint?) | outOfLineConstraint | outOfLineRefConstraint
+ : ((columnName | attributeName) (DEFAULT expr)? (inlineConstraint* | inlineRefConstraint)?)
+ | outOfLineConstraint
+ | outOfLineRefConstraint
+ | supplementalLoggingProps
;
alterIndexInformationClause
@@ -985,3 +986,15 @@ dropTablePartition
partitionExtendedNames
: (PARTITION | PARTITIONS) partition
;
+
+supplementalLoggingProps
+ : SUPPLEMENTAL LOG supplementalLogGrpClause|supplementalIdKeyClause
+ ;
+
+supplementalLogGrpClause
+ : GROUP logGroupName LP_ columnName (NO LOG)? (COMMA columnName (NO LOG)?)* RP_ ALWAYS?
+ ;
+
+supplementalIdKeyClause
+ : DATA LP_ (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY) (COMMA (ALL | PRIMARY KEY | UNIQUE | FOREIGN KEY))* RP_ COLUMNS
+ ;