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

Correct IMPORT DATABASE CONFIGURATION syntax document #29056

Merged
merged 1 commit into from
Nov 17, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ weight = 12
{{% tab name="语法" %}}
```sql
ExportDatabaseConfiguration ::=
'IMPORT' 'DATABASE' 'CONFIGURATION' 'FROM' 'FILE' filePath ('TO' databaseName)?

databaseName ::=
identifier
'IMPORT' 'DATABASE' 'CONFIGURATION' 'FROM' 'FILE' filePath

filePath ::=
string
Expand All @@ -38,7 +35,7 @@ filePath ::=
- 将 `YAML` 中的配置导入到指定逻辑库中

```sql
IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml" TO sharding_db;
IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml";
```

- 将 `YAML` 中的配置导入到当前逻辑库中
Expand All @@ -49,8 +46,8 @@ IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml";

### 保留字

`IMPORT`、`DATABASE`、`CONFIGURATION`、`FROM`、`FILE`、`TO`
`IMPORT`、`DATABASE`、`CONFIGURATION`、`FROM`、`FILE`

### 相关链接

- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ The `IMPORT DATABASE CONFIGURATION` syntax is used to import `YAML` configuratio
{{% tab name="Grammar" %}}
```sql
ExportDatabaseConfiguration ::=
'IMPORT' 'DATABASE' 'CONFIGURATION' 'FROM' 'FILE' filePath ('TO' databaseName)?

databaseName ::=
identifier
'IMPORT' 'DATABASE' 'CONFIGURATION' 'FROM' 'FILE' filePath

filePath ::=
string
Expand All @@ -38,7 +35,7 @@ filePath ::=
- Import the configuration in `YAML` into the specified database

```sql
IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml" TO sharding_db;
IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml";
```

- Import the configuration in `YAML` into the current database
Expand All @@ -49,7 +46,7 @@ IMPORT DATABASE CONFIGURATION FROM FILE "/xxx/config_sharding_db.yaml";

### Reserved word

`IMPORT`, `DATABASE`, `CONFIGURATION`, `FROM`, `FILE`, `TO`
`IMPORT`, `DATABASE`, `CONFIGURATION`, `FROM`, `FILE`

### Related links

Expand Down