Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
liyubin117 committed Mar 14, 2024
1 parent e12822e commit 44f9144
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/content.zh/docs/dev/table/sql/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,38 @@ SHOW CURRENT CATALOG

显示当前正在使用的 catalog。

## SHOW CREATE CATALOG

```sql
SHOW CREATE CATALOG catalog_name
```

展示指定 catalog 的创建语句。

该语句的输出内容包括包括 catalog 名称和相关配置,使您可以轻松地重用已创建好的 catalog。

假设 `cat2` 是按如下方式创建的:
```sql
create catalog cat2 WITH (
'type'='generic_in_memory',
'default-database'='db'
);
```
展示 catalog 创建语句。
```sql
show create catalog cat2;
+---------------------------------------------------------------------------------------------+
| result |
+---------------------------------------------------------------------------------------------+
| CREATE CATALOG `cat2` WITH (
'default-database' = 'db',
'type' = 'generic_in_memory'
)
|
+---------------------------------------------------------------------------------------------+
1 row in set
```

## SHOW DATABASES

```sql
Expand Down
32 changes: 32 additions & 0 deletions docs/content/docs/dev/table/sql/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,38 @@ SHOW CURRENT CATALOG

Show current catalog.

## SHOW CREATE CATALOG

```sql
SHOW CREATE CATALOG catalog_name
```

Show creation statement for the specified catalog.

The output includes the catalog name and relevant configurations, which allows you to easily reuse the created catalogs.

Assumes that the catalog `cat2` is created as follows:
```sql
create catalog cat2 WITH (
'type'='generic_in_memory',
'default-database'='db'
);
```
Shows the creation statement.
```sql
show create catalog cat2;
+---------------------------------------------------------------------------------------------+
| result |
+---------------------------------------------------------------------------------------------+
| CREATE CATALOG `cat2` WITH (
'default-database' = 'db',
'type' = 'generic_in_memory'
)
|
+---------------------------------------------------------------------------------------------+
1 row in set
```

## SHOW DATABASES

```sql
Expand Down

0 comments on commit 44f9144

Please sign in to comment.