ColinLeeo commented on code in PR #13158:
URL: https://github.com/apache/iotdb/pull/13158#discussion_r1900485617


##########
iotdb-core/relational-grammar/src/main/antlr4/org/apache/iotdb/db/relational/grammar/sql/RelationalSql.g4:
##########
@@ -539,8 +552,104 @@ showCurrentTimestampStatement
     ;
 
 
+// ------------------------------------------- Authority Statement 
-----------------------------------------------------
 
+createUserStatement
+    : CREATE USER userName=identifier password=string
+    ;
+
+createRoleStatement
+    : CREATE ROLE roleName=identifier
+    ;
+
+dropUserStatement
+    : DROP USER userName=identifier
+    ;
+
+dropRoleStatement
+    : DROP ROLE roleName=identifier
+    ;
+
+alterUserStatement
+    : ALTER USER userName=identifier SET PASSWORD password=identifier
+    ;
+
+grantUserRoleStatement
+    : GRANT ROLE roleName=identifier TO USER userName=identifier
+    ;
+
+revokeUserRoleStatement
+    : REVOKE ROLE roleName=identifier FROM USER userName=identifier
+    ;
+
+
+grantStatement
+    : GRANT privilegeObjectScope TO holderType holderName=identifier 
(grantOpt)?
+    ;
+
+listUserPrivilegeStatement
+    : LIST PRIVILEGES OF USER userName=identifier
+    ;
+
+listRolePrivilegeStatement
+    : LIST PRIVILEGES OF ROLE roleName=identifier
+    ;
+
+listUserStatement
+    : LIST USER
+    ;
 
+listRoleStatement
+    : LIST ROLE
+    ;
+
+
+revokeStatement
+    : REVOKE (revokeGrantOpt)? privilegeObjectScope FROM holderType 
holderName=identifier
+    ;
+
+privilegeObjectScope
+    : systemPrivilege

Review Comment:
   This pr is to big.. I will create a new pr base this pr to support ALL.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to