morrySnow commented on code in PR #1927: URL: https://github.com/apache/doris-website/pull/1927#discussion_r1928051431
########## docs/sql-manual/sql-statements/database/ALTER-DATABASE.md: ########## @@ -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) -1) Set the database data quota, the unit is B/K/KB/M/MB/G/GB/T/TB/P/PB +## Syntax ```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>", ...)] Review Comment: 这语法不太对。其实是三个语法 - rename - set quota - set properties 现在这个语法和实际的对不上 ```suggestion 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>" [, ...]) ``` ########## docs/sql-manual/sql-statements/database/ALTER-DATABASE.md: ########## @@ -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) Review Comment: ```suggestion This statement is used to set the properties of the specified database. ``` ########## docs/sql-manual/sql-statements/database/CREATE-DATABASE.md: ########## @@ -27,18 +27,37 @@ under the License. ## Description -This statement is used to create a new database (database) +This statement is used to create a new database -grammar: +## Syntax ```sql -CREATE DATABASE [IF NOT EXISTS] db_name - [PROPERTIES ("key"="value", ...)]; +CREATE DATABASE [IF NOT EXISTS] <db_name> + [PROPERTIES ("<key>"="<value>", ...)]; Review Comment: ```suggestion [PROPERTIES ("<key>"="<value>" [ , ... ])]; ``` ########## docs/sql-manual/sql-statements/database/SHOW-CREATE-DATABASE.md: ########## @@ -27,47 +27,64 @@ under the License. ## Description -This statement checks the creation of the doris database, support database from both internal catalog and hms catalog +This statement checks the creation information of the doris built-in database or catalog database. -grammar: +## Syntax ```sql -SHOW CREATE DATABASE db_name; +SHOW CREATE DATABASE [<catalog>].<db_name>; ``` -illustrate: +## Required parameters -- `db_name`: The name of the database -- if specific a database from hms catalog, will return same with this stmt in hive +** 1. `<db_name>`** +> Database Name + +## Optional parameters + +** 1. `<catalog>`** +> Indicates whether the table is internal or external + +## Return Value + +| Database | Create Database | +|:---------|:-----------| +| Database Name | Corresponding database creation statement | Review Comment: ```suggestion | Column | Description | |:---------|:-----------| | Database | Database name | | Create Database | Corresponding database creation statement | ``` ########## docs/sql-manual/sql-statements/database/ALTER-DATABASE.md: ########## @@ -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) Review Comment: 描述和语义不符。alter database 不止可以设置属性,还能改动 db 名字,以及设定 db 的多种 quota。需要在描述中,把上面的内容都涉及到 ########## docs/sql-manual/sql-statements/database/DROP-DATABASE.md: ########## @@ -27,28 +27,41 @@ under the License. ## Description -This statement is used to delete the database (database) -grammar: +This statement is used to delete a database. + +## Syntax ```sql -DROP DATABASE [IF EXISTS] db_name [FORCE]; +DROP DATABASE [IF EXISTS] <db_name> [<FORCE>]; Review Comment: 不是参数的部分,不用加尖括号 ```suggestion DROP DATABASE [IF EXISTS] <db_name> [FORCE]; ``` ########## docs/sql-manual/sql-statements/database/DROP-DATABASE.md: ########## @@ -27,28 +27,41 @@ under the License. ## Description -This statement is used to delete the database (database) -grammar: +This statement is used to delete a database. + +## Syntax ```sql -DROP DATABASE [IF EXISTS] db_name [FORCE]; +DROP DATABASE [IF EXISTS] <db_name> [<FORCE>]; ``` -illustrate: +## Required parameters -- During the execution of DROP DATABASE, the deleted database can be recovered through the RECOVER statement. See the [RECOVER](../../Database-Administration-Statements/RECOVER.md) statement for details -- If you execute DROP DATABASE FORCE, the system will not check the database for unfinished transactions, the database will be deleted directly and cannot be recovered, this operation is generally not recommended +** 1. `<db_name>`** +> Database Name -## Example +## Optional parameters + +** 1. `<FORCE>`** Review Comment: ```suggestion ** 1. `FORCE`** ``` ########## docs/sql-manual/sql-statements/database/SHOW-DATABASES.md: ########## @@ -27,68 +27,78 @@ under the License. ## Description -This statement is used to display the currently visible db +This statement is used to display the currently visible database. -grammar: +## Syntax ```sql -SHOW DATABASES [FROM catalog] [filter expr]; +SHOW DATABASES [FROM <catalog>] [<filter_expr>]; ``` -illustrate: -1. `SHOW DATABASES` will get all database names from current catalog. -2. `SHOW DATABASES FROM catalog` will all database names from the catalog named 'catalog'. -3. `SHOW DATABASES filter_expr` will get filtered database names from current catalog. -4. `SHOW DATABASES FROM catalog filter_expr` is not support yet. +## Optional parameters -## Example -1. Display all the database names from current catalog. +** 1. `<catalog>`** +> Corresponding catalog + +** 2. `<filter_expr>`** +> Filter by specified conditions + +## Return Value + +| Database | +|:-------| +| Database Name | Review Comment: 同上 ########## docs/sql-manual/sql-statements/database/SHOW-DATABASE-ID.md: ########## @@ -25,26 +25,47 @@ under the License. --> -## Description +### Description -This statement is used to find the corresponding database name according to the database id (only for administrators) +This statement is used to find the corresponding database name based on the database id (only used by administrators) -grammar: +## Syntax ```sql -SHOW DATABASE [database_id] +SHOW DATABASE <database_id> ``` -## Example +## Required parameters -1. Find the corresponding database name according to the database id +** 1. `<database_id>`** +> Database corresponding id number - ```sql - SHOW DATABASE 1001; - ``` +## Return Value -## Keywords +| DbName | +|:---------| +| Database Name | Review Comment: 和上一个文件一样的问题 ########## docs/sql-manual/sql-statements/database/SHOW-CREATE-DATABASE.md: ########## @@ -27,47 +27,64 @@ under the License. ## Description -This statement checks the creation of the doris database, support database from both internal catalog and hms catalog +This statement checks the creation information of the doris built-in database or catalog database. -grammar: +## Syntax ```sql -SHOW CREATE DATABASE db_name; +SHOW CREATE DATABASE [<catalog>].<db_name>; Review Comment: ```suggestion SHOW CREATE DATABASE [<catalog_name>.]<db_name>; ``` -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org