Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/UserGuide/Operation Manual/SQL Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ Eg: IoTDB > REVOKE ROLE temprole PRIVILEGES 'DELETE_TIMESERIES' ON root.ln;
REVOKE <roleName> FROM <userName>;
roleName:=identifier
userName:=identifier
Eg: IoTDB > REVOKE temproleFROM tempuser;
Eg: IoTDB > REVOKE temprole FROM tempuser;
```

* List Users
Expand All @@ -724,7 +724,7 @@ Eg: IoTDB > LIST ROLE
LIST PRIVILEGES USER <username> ON <path>;
username:=identifier
path=‘root’ (DOT identifier)*
Eg: IoTDB > LIST PRIVIEGES USER sgcc_wirte_user ON root.sgcc;
Eg: IoTDB > LIST PRIVILEGES USER sgcc_wirte_user ON root.sgcc;
```

* List Privileges of Roles(On Specific Path)
Expand All @@ -733,23 +733,23 @@ Eg: IoTDB > LIST PRIVIEGES USER sgcc_wirte_user ON root.sgcc;
LIST PRIVILEGES ROLE <roleName> ON <path>;
roleName:=identifier
path=‘root’ (DOT identifier)*
Eg: IoTDB > LIST PRIVIEGES ROLE wirte_role ON root.sgcc;
Eg: IoTDB > LIST PRIVILEGES ROLE wirte_role ON root.sgcc;
```

* List Privileges of Users

```
LIST USER PRIVILEGES <username> ;
username:=identifier
Eg: IoTDB > LIST USER PRIVIEGES tempuser;
Eg: IoTDB > LIST USER PRIVILEGES tempuser;
```

* List Privileges of Roles

```
LIST ROLE PRIVILEGES <roleName>
roleName:=identifier
Eg: IoTDB > LIST ROLE PRIVIEGES actor;
Eg: IoTDB > LIST ROLE PRIVILEGES actor;
```

* List Roles of Users
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ SQL语句将不会执行,并且相应的错误提示如下:

<center><img style="width:100%; max-width:800px; max-height:600px; margin-left:auto; margin-right:auto; display:block;" src="https://user-images.githubusercontent.com/13203019/51577867-577b5780-1ef6-11e9-978c-e02c1294bcc5.jpg"></center>

#### Row and Column Control over Query Results
#### 控制查询结果的行和列

除了对查询结果进行行或列控制之外,IoTDB还允许用户控制查询结果的行和列。 这是同时包含LIMIT子句和SLIMIT子句的完整示例。

Expand Down
12 changes: 6 additions & 6 deletions docs/zh/UserGuide/Operation Manual/SQL Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ Eg: IoTDB > REVOKE ROLE temprole PRIVILEGES 'DELETE_TIMESERIES' ON root.ln;
REVOKE <roleName> FROM <userName>;
roleName:=identifier
userName:=identifier
Eg: IoTDB > REVOKE temproleFROM tempuser;
Eg: IoTDB > REVOKE temprole FROM tempuser;
```

* 列出用户
Expand All @@ -713,7 +713,7 @@ Eg: IoTDB > LIST ROLE
LIST PRIVILEGES USER <username> ON <path>;
username:=identifier
path=‘root’ (DOT identifier)*
Eg: IoTDB > LIST PRIVIEGES USER sgcc_wirte_user ON root.sgcc;
Eg: IoTDB > LIST PRIVILEGES USER sgcc_wirte_user ON root.sgcc;
```

* 列出角色权限
Expand All @@ -722,23 +722,23 @@ Eg: IoTDB > LIST PRIVIEGES USER sgcc_wirte_user ON root.sgcc;
LIST PRIVILEGES ROLE <roleName> ON <path>;
roleName:=identifier
path=‘root’ (DOT identifier)*
Eg: IoTDB > LIST PRIVIEGES ROLE wirte_role ON root.sgcc;
Eg: IoTDB > LIST PRIVILEGES ROLE wirte_role ON root.sgcc;
```

* 列出用户权限

```
LIST USER PRIVILEGES <username> ;
username:=identifier
Eg: IoTDB > LIST USER PRIVIEGES tempuser;
Eg: IoTDB > LIST USER PRIVILEGES tempuser;
```

* 列出角色权限

```
LIST ROLE PRIVILEGES <roleName>
roleName:=identifier
Eg: IoTDB > LIST ROLE PRIVIEGES actor;
Eg: IoTDB > LIST ROLE PRIVILEGES actor;
```

* 列出用户角色
Expand All @@ -763,7 +763,7 @@ Eg: IoTDB > LIST ALL USER OF ROLE roleuser;
ALTER USER <username> SET PASSWORD <password>;
roleName:=identifier
password:=string
Eg: IoTDB > ALTER USER tempuser SET PASSWORD newpwd;
Eg: IoTDB > ALTER USER tempuser SET PASSWORD 'newpwd';
```

## 功能
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ statement
| REVOKE WATERMARK_EMBEDDING FROM rootOrId (COMMA rootOrId)* #revokeWatermarkEmbedding
| LIST USER #listUser
| LIST ROLE #listRole
| LIST PRIVILEGES USER username=ID ON prefixPath #listPrivilegesUser
| LIST PRIVILEGES USER username=rootOrId ON prefixPath #listPrivilegesUser
| LIST PRIVILEGES ROLE roleName=ID ON prefixPath #listPrivilegesRole
| LIST USER PRIVILEGES username = ID #listUserPrivileges
| LIST USER PRIVILEGES username = rootOrId #listUserPrivileges
| LIST ROLE PRIVILEGES roleName = ID #listRolePrivileges
| LIST ALL ROLE OF USER username = ID #listAllRoleOfUser
| LIST ALL ROLE OF USER username = rootOrId #listAllRoleOfUser
| LIST ALL USER OF ROLE roleName = ID #listAllUserOfRole
| SET TTL TO path=prefixPath time=INT #setTTLStatement
| UNSET TTL TO path=prefixPath #unsetTTLStatement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ public void enterListPrivilegesUser(ListPrivilegesUserContext ctx) {
super.enterListPrivilegesUser(ctx);
AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST,
AuthorOperator.AuthorType.LIST_USER_PRIVILEGE);
operator.setUserName(ctx.ID().getText());
operator.setUserName(ctx.rootOrId().getText());
operator.setNodeNameList(parsePrefixPath(ctx.prefixPath()));
initializedOperator = operator;
operatorType = SQLConstant.TOK_LIST;
Expand All @@ -631,7 +631,7 @@ public void enterListUserPrivileges(ListUserPrivilegesContext ctx) {
super.enterListUserPrivileges(ctx);
AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST,
AuthorOperator.AuthorType.LIST_USER_PRIVILEGE);
operator.setUserName(ctx.ID().getText());
operator.setUserName(ctx.rootOrId().getText());
initializedOperator = operator;
operatorType = SQLConstant.TOK_LIST;
}
Expand All @@ -652,7 +652,7 @@ public void enterListAllRoleOfUser(ListAllRoleOfUserContext ctx) {
AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST,
AuthorOperator.AuthorType.LIST_USER_ROLES);
initializedOperator = operator;
operator.setUserName(ctx.ID().getText());
operator.setUserName(ctx.rootOrId().getText());
operatorType = SQLConstant.TOK_LIST;
}

Expand Down