Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xyfsjq
Copy link
Contributor

@xyfsjq xyfsjq commented Jan 23, 2025

Versions

  • dev
  • 3.0
  • 2.1
  • 2.0

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>", ...)]
Copy link
Contributor

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
    现在这个语法和实际的对不上
Suggested change
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)
Copy link
Contributor

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>", ...)];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[PROPERTIES ("<key>"="<value>", ...)];
[PROPERTIES ("<key>"="<value>" [ , ... ])];


```sql
DROP DATABASE [IF EXISTS] db_name [FORCE];
DROP DATABASE [IF EXISTS] <db_name> [<FORCE>];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是参数的部分,不用加尖括号

Suggested change
DROP DATABASE [IF EXISTS] <db_name> [<FORCE>];
DROP DATABASE [IF EXISTS] <db_name> [FORCE];

## Example
## Optional parameters

** 1. `<FORCE>`**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
** 1. `<FORCE>`**
** 1. `FORCE`**


```sql
SHOW CREATE DATABASE db_name;
SHOW CREATE DATABASE [<catalog>].<db_name>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SHOW CREATE DATABASE [<catalog>].<db_name>;
SHOW CREATE DATABASE [<catalog_name>.]<db_name>;

Comment on lines +50 to +52
| Database | Create Database |
|:---------|:-----------|
| Database Name | Corresponding database creation statement |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Database | Create Database |
|:---------|:-----------|
| Database Name | Corresponding database creation statement |
| Column | Description |
|:---------|:-----------|
| Database | Database name |
| Create Database | Corresponding database creation statement |

Comment on lines +45 to +47
| DbName |
|:---------|
| Database Name |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和上一个文件一样的问题

Comment on lines +48 to +50
| Database |
|:-------|
| Database Name |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants