-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doc] Fix database related documentation #1927
base: master
Are you sure you want to change the base?
Conversation
@@ -27,79 +27,70 @@ under the License. | |||
|
|||
## Description | |||
|
|||
This statement is used to set properties of the specified database. (administrator only) | |||
This statement is used to set the properties of the specified database. (For administrators only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement is used to set the properties of the specified database. (For administrators only) | |
This statement is used to set the properties of the specified database. |
|
||
```sql | ||
ALTER DATABASE db_name SET DATA QUOTA quota; | ||
ALTER DATABASE <db_name> RENAME|SET DATA QUOTA|REPLICA QUOT <new_db_name>|<quota> [PROPERTIES ("<key>"="<value>", ...)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这语法不太对。其实是三个语法
- rename
- set quota
- set properties
现在这个语法和实际的对不上
ALTER DATABASE <db_name> RENAME|SET DATA QUOTA|REPLICA QUOT <new_db_name>|<quota> [PROPERTIES ("<key>"="<value>", ...)] | |
ALTER DATABASE <db_name> RENAME <new_name> | |
ALTER DATABASE <db_name> SET { DATA | REPLICA | TRANSACTION } QUOTA <quota> | |
ALTER DATABASE <db_name> SET PROPERTIES ("<key>" = "<value>" [, ...]) |
@@ -27,79 +27,70 @@ under the License. | |||
|
|||
## Description | |||
|
|||
This statement is used to set properties of the specified database. (administrator only) | |||
This statement is used to set the properties of the specified database. (For administrators only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
描述和语义不符。alter database 不止可以设置属性,还能改动 db 名字,以及设定 db 的多种 quota。需要在描述中,把上面的内容都涉及到
CREATE DATABASE [IF NOT EXISTS] db_name | ||
[PROPERTIES ("key"="value", ...)]; | ||
CREATE DATABASE [IF NOT EXISTS] <db_name> | ||
[PROPERTIES ("<key>"="<value>", ...)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[PROPERTIES ("<key>"="<value>", ...)]; | |
[PROPERTIES ("<key>"="<value>" [ , ... ])]; |
|
||
```sql | ||
DROP DATABASE [IF EXISTS] db_name [FORCE]; | ||
DROP DATABASE [IF EXISTS] <db_name> [<FORCE>]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不是参数的部分,不用加尖括号
DROP DATABASE [IF EXISTS] <db_name> [<FORCE>]; | |
DROP DATABASE [IF EXISTS] <db_name> [FORCE]; |
## Example | ||
## Optional parameters | ||
|
||
** 1. `<FORCE>`** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
** 1. `<FORCE>`** | |
** 1. `FORCE`** |
|
||
```sql | ||
SHOW CREATE DATABASE db_name; | ||
SHOW CREATE DATABASE [<catalog>].<db_name>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHOW CREATE DATABASE [<catalog>].<db_name>; | |
SHOW CREATE DATABASE [<catalog_name>.]<db_name>; |
| Database | Create Database | | ||
|:---------|:-----------| | ||
| Database Name | Corresponding database creation statement | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Database | Create Database | | |
|:---------|:-----------| | |
| Database Name | Corresponding database creation statement | | |
| Column | Description | | |
|:---------|:-----------| | |
| Database | Database name | | |
| Create Database | Corresponding database creation statement | |
| DbName | | ||
|:---------| | ||
| Database Name | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
和上一个文件一样的问题
| Database | | ||
|:-------| | ||
| Database Name | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
Versions
Languages
Docs Checklist