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/08/13 01:57:30 UTC
[GitHub] [shardingsphere] jingshanglu commented on a change in pull request #11705: add SQLServer grammar Create Function
jingshanglu commented on a change in pull request #11705:
URL: https://github.com/apache/shardingsphere/pull/11705#discussion_r688191126
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/BaseRule.g4
##########
@@ -422,3 +427,7 @@ ignoredIdentifiers
matchNone
: 'Default does not match anything'
;
+
+variableName
+ : AT_ identifier
+ ;
Review comment:
@Icesource There should be a empty line at the end of the file.
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/SQLServerKeyword.g4
##########
@@ -1070,3 +1070,59 @@ FILTER_COLUMN
RETENTION_PERIOD
: R E T E N T I O N UL_ P E R I O D
;
+
+FORWARD_ONLY
+ : F O R W A R D UL_ O N L Y
+ ;
+
+SCROLL
+ : S C R O L L
+ ;
+
+STATIC
+ : S T A T I C
+ ;
+
+KEYSET
+ : K E Y S E T
+ ;
+
+DYNAMIC
+ : D Y N A M I C
+ ;
+
+FAST_FORWARD
+ : F A S T UL_ F O R W A R D
+ ;
+
+READ_ONLY
+ : R E A D UL_ O N L Y
+ ;
+
+SCROLL_LOCKS
+ : S C R O L L UL_ L O C K S
+ ;
+
+OPTIMISTIC
+ : O P T I M I S T I C
+ ;
+
+TYPE_WARNING
+ : T Y P E UL_ W A R N I N G
+ ;
+
+SCHEMABINDING
+ : S C H E M A B I N D I N G
+ ;
+
+CALLER
+ : C A L L E R
+ ;
+
+INPUT
+ : I N P U T
+ ;
+
+CALLED
+ : C A L L E D
+ ;
Review comment:
@Icesource There should be a empty line at the end of the file.
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/SQLServerKeyword.g4
##########
@@ -1070,3 +1070,59 @@ FILTER_COLUMN
RETENTION_PERIOD
: R E T E N T I O N UL_ P E R I O D
;
+
+FORWARD_ONLY
+ : F O R W A R D UL_ O N L Y
+ ;
+
+SCROLL
+ : S C R O L L
+ ;
+
+STATIC
+ : S T A T I C
+ ;
+
+KEYSET
+ : K E Y S E T
+ ;
+
+DYNAMIC
+ : D Y N A M I C
+ ;
+
+FAST_FORWARD
+ : F A S T UL_ F O R W A R D
+ ;
+
+READ_ONLY
+ : R E A D UL_ O N L Y
+ ;
+
+SCROLL_LOCKS
+ : S C R O L L UL_ L O C K S
+ ;
+
+OPTIMISTIC
+ : O P T I M I S T I C
+ ;
+
+TYPE_WARNING
+ : T Y P E UL_ W A R N I N G
+ ;
+
+SCHEMABINDING
+ : S C H E M A B I N D I N G
+ ;
+
+CALLER
+ : C A L L E R
+ ;
+
+INPUT
+ : I N P U T
+ ;
+
+CALLED
+ : C A L L E D
+ ;
Review comment:
@Icesource If these tokens are not unreserved keyword, maybe these should be contained in `unreservedWord`(BaseRule.g4). Plz check it refer to https://docs.microsoft.com/en-us/sql/t-sql/language-elements/reserved-keywords-transact-sql?view=sql-server-ver15.
##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/Keyword.g4
##########
@@ -639,3 +639,31 @@ FORCED
HINT
: H I N T
;
+
+DECLARE
+ : D E C L A R E
+ ;
+
+CURSOR
+ : C U R S O R
+ ;
+
+OF
+ : O F
+ ;
+
+RETURNS
+ : R E T U R N S
+ ;
+
+DATEPART
+ : D A T E P A R T
+ ;
+
+RETURN
+ : R E T U R N
+ ;
+
+READONLY
+ : R E A D O N L Y
+ ;
Review comment:
@Icesource There should be a empty line at the end of the file.
--
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