Skip to content
This repository was archived by the owner on Dec 28, 2025. It is now read-only.

Commit 0fc05c9

Browse files
fixed formats problems
1 parent d412916 commit 0fc05c9

File tree

4 files changed

+27
-30
lines changed

4 files changed

+27
-30
lines changed

content/cn/docs/clients/hugegraph-client.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ weight: 2
1313

1414
HugeGraph-Client 是操作 graph 的总入口,用户必须先创建出 HugeGraph-Client 对象,与 HugeGraph-Server 建立连接(伪连接)后,才能获取到 schema、graph 以及 gremlin 的操作入口对象。
1515

16-
目前 HugeGraph-Client 只允许连接服务端已存在的图,无法自定义图进行创建。其创建方法如下:
16+
目前 HugeGraph-Client 只允许连接服务端已存在的图,无法自定义图进行创建。同时,需注意1.7.0后,构建 HugeGraph-Client 必须指定 GraphSpace (如默认 "DEFAULT")。其创建方法如下:
1717

1818
```java
1919
// HugeGraphServer 地址:"http://localhost:8080"
2020
// 图的名称:"hugegraph"
21-
HugeClient hugeClient = HugeClient.builder("http://localhost:8080",
22-
"DEFAULT", "hugegraph")
21+
HugeClient hugeClient = HugeClient.builder("http://localhost:8080", "DEFAULT", "hugegraph")
2322
.configTimeout(20) // 默认 20s 超时
2423
.configUser("**", "**") // 默认未开启用户权限
2524
.build();
@@ -477,19 +476,17 @@ spaceManager.createGraphSpace(graphSpace);
477476
```
478477
#### 4.2 GraphSpace 接口汇总
479478

480-
| category | interface | description |
481-
|----------|------------------------|------------------------------------------|
482-
| 查询 | listGraphSpace() | 获取所有 GraphSpace 列表 |
483-
| | getGraphSpace(String name) | 获取指定 GraphSpace |
484-
| | space.getName() | 获取 GraphSpace 名称 |
485-
| | space.getDescription() | 获取 GraphSpace 描述 |
486-
| | space.getGraphNumber() | 获取 GraphSpace 下图数量 |
487-
| 更新 | space.setDescription(String description) | 修改 GraphSpace 描述信息 |
488-
| | space.setMaxGraphNumber(int maxNumber) | 设置 GraphSpace 最大图数量 |
489-
| | space.setMaxRoleNumber(int maxRoleNumber) | 设置 GraphSpace 最大角色数量 |
490-
| | updateGraphSpace(String name, GraphSpace space) | 更新 GraphSpace 配置 |
491-
| 删除 | removeGraphSpace(String name) | 删除指定 GraphSpace |
492-
| | removeGraphSpace(String name, boolean force) | 强制删除 GraphSpace (包括所有图数据) |
479+
| 类别 | 接口 | 描述 |
480+
|------|------|------|
481+
| Manager - 查询 | listGraphSpace() | 获取所有 GraphSpace 列表 |
482+
| | getGraphSpace(String name) | 获取指定 GraphSpace |
483+
| Manager - 创建/更新 | createGraphSpace(GraphSpace) | 创建 GraphSpace |
484+
| | updateGraphSpace(String, GraphSpace) | 更新配置 |
485+
| Manager - 删除 | removeGraphSpace(String) | 删除指定 GraphSpace |
486+
| GraphSpace - 属性 | getName() / getDescription() | 获取名称/描述 |
487+
| | getGraphNumber() | 获取图数量 |
488+
| GraphSpace - 配置 | setDescription(String) | 设置描述 |
489+
| | setMaxGraphNumber(int) | 设置最大图数量 |
493490

494491

495492
### 5 简单示例

content/cn/docs/quickstart/client/hugegraph-client.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ public class SingleExample {
8181
HugeClient hugeClient = HugeClient.builder("http://localhost:8080",
8282
"DEFAULT",
8383
"hugegraph")
84-
.configUser("admin", "admin")
84+
.configUser("username", "password")
85+
# 这是示例,生产环境需要使用安全的凭证
8586
.build();
8687

8788
SchemaManager schema = hugeClient.schema();

content/en/docs/clients/hugegraph-client.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The `gremlin(groovy)` written by the user in `HugeGraph-Studio` can refer to the
1212

1313
HugeGraph-Client is the general entry for operating graph. Users must first create a HugeGraph-Client object and establish a connection (pseudo connection) with HugeGraph-Server before they can obtain the operation entry objects of schema, graph and gremlin.
1414

15-
Currently, HugeGraph-Client only allows connections to existing graphs on the server, and cannot create custom graphs. Its creation method is as follows:
15+
Currently, HugeGraph-Client only allows connections to existing graphs on the server, and cannot create custom graphs. Meanwhile, it should be noted that starting from version 1.7.0, building the HugeGraph-Client must specify a GraphSpace (e.g., the default "DEFAULT"). Its creation method is as follows:
1616

1717
```java
1818
// HugeGraphServer address: "http://localhost:8080"
@@ -468,17 +468,15 @@ spaceManager.createGraphSpace(graphSpace);
468468

469469
| Category | Interface | Description |
470470
|----------|-----------|-------------|
471-
| Query | listGraphSpace() | Get all GraphSpace lists |
472-
| | getGraphSpace(String name) | Get the specified GraphSpace |
473-
| | space.getName() | Get GraphSpace name |
474-
| | space.getDescription() | Get GraphSpace description |
475-
| | space.getGraphNumber() | Get the number of graphs under GraphSpace |
476-
| Update| space.setDescription(String description) | Modify GraphSpace description |
477-
| | space.setMaxGraphNumber(int maxNumber) | Set maximum number of graphs in GraphSpace |
478-
| | space.setMaxRoleNumber(int maxRoleNumber) | Set maximum role number in GraphSpace |
479-
| | updateGraphSpace(String name, GraphSpace space) | Update GraphSpace configuration |
480-
| Delete | removeGraphSpace(String name) | Delete the specified GraphSpace |
481-
| | removeGraphSpace(String name, boolean force) | Force delete GraphSpace (including all graph data) |
471+
| Manager - Query | listGraphSpace() | Get the list of all GraphSpaces |
472+
| | getGraphSpace(String name) | Get the specified GraphSpace |
473+
| Manager - Create/Update | createGraphSpace(GraphSpace) | Create a GraphSpace |
474+
| | updateGraphSpace(String, GraphSpace) | Update configuration |
475+
| Manager - Delete | removeGraphSpace(String) | Delete the specified GraphSpace |
476+
| GraphSpace - Properties | getName() / getDescription() | Get name / description |
477+
| | getGraphNumber() | Get the number of graphs |
478+
| GraphSpace - Configuration | setDescription(String) | Set description |
479+
| | setMaxGraphNumber(int) | Set the maximum number of graphs |
482480

483481
### 5 Simple Example
484482

content/en/docs/quickstart/client/hugegraph-client.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public class SingleExample {
7777
HugeClient hugeClient = HugeClient.builder("http://localhost:8080",
7878
"DEFAULT",
7979
"hugegraph")
80-
.configUser("admin", "admin")
80+
.configUser("username", "password")
81+
# This is an example. In a production environment, secure credentials should be used.
8182
.build();
8283

8384
SchemaManager schema = hugeClient.schema();

0 commit comments

Comments
 (0)