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 16:30:50 UTC

[GitHub] [shardingsphere] Icesource commented on a change in pull request #11708: add SQLServer grammar create database

Icesource commented on a change in pull request #11708:
URL: https://github.com/apache/shardingsphere/pull/11708#discussion_r688639610



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-sqlserver/src/main/antlr4/imports/sqlserver/DDLStatement.g4
##########
@@ -450,3 +454,50 @@ onHistoryTableClause
 ifExist
     : IF EXISTS
     ;
+
+createDatabaseClause
+    : (CONTAINMENT EQ_ (NONE | PARTIAL))? fileDefinitionClause? (COLLATE ignoredIdentifier)? (WITH databaseOption (COMMA_ databaseOption)*)?
+    ;
+
+fileDefinitionClause
+    : ON PRIMARY? fileSpec (COMMA_ fileSpec)* (COMMA_ databaseFileGroup)* databaseLogOns
+    ;
+
+databaseOption
+    : FILESTREAM fileStreamOption (COMMA_ fileStreamOption)*
+    | DEFAULT_FULLTEXT_LANGUAGE = ignoredIdentifier
+    | DEFAULT_LANGUAGE = ignoredIdentifier
+    | NESTED_TRIGGERS = ( OFF | ON )
+    | TRANSFORM_NOISE_WORDS = ( OFF | ON )
+    | TWO_DIGIT_YEAR_CUTOFF = ignoredIdentifier
+    | DB_CHAINING ( OFF | ON )
+    | TRUSTWORTHY ( OFF | ON )
+    | PERSISTENT_LOG_BUFFER=ON ( DIRECTORY_NAME=ignoredIdentifier )
+    ;
+
+fileStreamOption
+    : NON_TRANSACTED_ACCESS EQ_ ( OFF | READ_ONLY | FULL )
+    | DIRECTORY_NAME = ignoredIdentifier
+    ;
+
+fileSpec
+    : LP_ NAME EQ_ ignoredIdentifier COMMA_ FILENAME EQ_ STRING_ databaseFileSpecOption RP_
+    ;
+
+databaseFileSpecOption
+    : (COMMA_ SIZE EQ_ numberLiterals (KB | MB | GB | TB)?)?
+    (COMMA_ MAXSIZE EQ_ (numberLiterals (KB | MB | GB | TB)? | UNLIMITED))?
+    (COMMA_ FILEGROWTH EQ_ numberLiterals (KB | MB | GB | TB | MOD_)?)?
+    ;
+
+databaseFileGroup
+    : FILEGROUP ignoredIdentifier databaseFileGroupContains? fileSpec (COMMA_ fileSpec)*
+    ;
+
+databaseFileGroupContains
+    : (CONTAINS FILESTREAM)? DEFAULT? | CONTAINS MEMORY_OPTIMIZED_DATA
+    ;
+
+databaseLogOns
+    : (LOG ON fileSpec (COMMA_ fileSpec)*)?
+    ;

Review comment:
       done




-- 
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