You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/06/27 00:19:36 UTC

[GitHub] [shardingsphere] wgy8283335 commented on a change in pull request #11027: Add Oracle SQL - Insert statement

wgy8283335 commented on a change in pull request #11027:
URL: https://github.com/apache/shardingsphere/pull/11027#discussion_r659241437



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DMLStatement.g4
##########
@@ -48,11 +48,45 @@ conditionalInsertElsePart
     ;
 
 insertIntoClause
-    : INTO tableName (AS? alias)?
+    : INTO dmlTableExprClause alias? columnNames?
     ;
 
 insertValuesClause
-    : columnNames? VALUES assignmentValues (COMMA_ assignmentValues)*
+    : VALUES assignmentValues
+    ;
+
+returningClause
+    : (RETURN | RETURNING) exprs INTO dataItem (COMMA_ dataItem)*
+    ;
+
+dmlTableExprClause
+    : dmlTableClause | dmlSubqueryClause | tableCollectionExpr
+    ;
+
+dmlTableClause
+    : tableName (partitionExtClause | AT_ dbLink)?
+    | (viewName | materializedViewName) (AT_ dbLink)?
+    ;
+
+partitionExtClause
+    : PARTITION (LP_ partitionName RP_ | FOR LP_ partitionKeyValue (COMMA_ partitionKeyValue) RP_)
+    | SUBPARTITION (LP_ subpartitionName RP_ | FOR LP_ subpartitionKeyValue (COMMA_ subpartitionKeyValue) RP_)
+    ;
+
+dmlSubqueryClause
+    : LP_ selectSubquery subqueryRestrictionClause? RP_
+    ;
+
+subqueryRestrictionClause
+    : WITH (READ ONLY | CHECK OPTION) (CONSTRAINT constraintName)?
+    ;
+
+tableCollectionExpr
+    : TABLE LP_ collectionExpr RP_ (LP_ PLUS_ RP_)?

Review comment:
       Where is the definition of collection expression in ORALCE site?




-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org