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

Commit 86ab30f

Browse files
fixed errors && removed useless examples
1 parent 17af21d commit 86ab30f

File tree

2 files changed

+5
-51
lines changed

2 files changed

+5
-51
lines changed

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

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ Edge knows1 = marko.addEdge("knows", vadas, "city", "Beijing");
456456

457457
**注意:当 frequency 为 multiple 时必须要设置 sortKeys 对应属性类型的值。**
458458

459-
### 4 图空间(GraphSpace)
459+
### 4 图管理
460460
client支持一个物理部署中多个 GraphSpace,每个 GraphSpace 下可以含多个图(graph)。
461461
- 兼容:不指定 GraphSpace 时,默认使用 "DEFAULT" 空间
462462

@@ -479,39 +479,15 @@ spaceManager.createGraphSpace(graphSpace);
479479

480480
| category | interface | description |
481481
|----------|------------------------|------------------------------------------|
482-
| 查询 | listGraphSpaces() | 获取所有 GraphSpace 列表 |
482+
| 查询 | listGraphSpace() | 获取所有 GraphSpace 列表 |
483483
| | getGraphSpace(String name) | 获取指定 GraphSpace |
484484
| | space.getName() | 获取 GraphSpace 名称 |
485-
| | space.getDescription() | 获取 GraphSpace 描述信息 |
486-
| | space.getGraphNumber() | 获取 GraphSpace 下图的数量 |
487-
| | getGraphSpace(String name) | 获取指定 GraphSpace |
488485
| 更新 | space.setDescription(String description) | 修改 GraphSpace 描述信息 |
489486
| | space.setMaxGraphNumber(int maxNumber) | 设置 GraphSpace 最大图数量 |
487+
| | space.setMaxRoleNumber(int maxRoleNumber) | 设置 GraphSpace 最大图数量 |
490488
| | updateGraphSpace(String name, GraphSpace space) | 更新 GraphSpace 配置 |
491489
| 删除 | removeGraphSpace(String name) | 删除指定 GraphSpace |
492-
| | removeGraphSpace(String name, boolean force) | 强制删除 GraphSpace(包含所有图数据) |
493490

494-
#### 4.3 GraphSpace 中的图管理
495-
496-
在 GraphSpace 中,可以管理多个图:
497-
498-
```java
499-
// 在指定的 GraphSpace 中创建图
500-
GraphsManager graphsManager = hugeClient.graphs();
501-
Graph graph = new Graph();
502-
graph.setName("businessGraph");
503-
graph.setDescription("Business relationship graph");
504-
graphsManager.createGraph("myGraphSpace", graph);
505-
506-
// 获取 GraphSpace 中的所有图
507-
List<Graph> graphs = graphsManager.listGraphs("myGraphSpace");
508-
509-
// 获取指定图
510-
Graph businessGraph = graphsManager.getGraph("myGraphSpace", "businessGraph");
511-
512-
// 删除图
513-
graphsManager.removeGraph("myGraphSpace", "businessGraph");
514-
```
515491

516492
### 5 简单示例
517493

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

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -468,40 +468,18 @@ spaceManager.createGraphSpace(graphSpace);
468468

469469
| Category | Interface | Description |
470470
|----------|-----------|-------------|
471-
| Query | listGraphSpaces() | Get all GraphSpace lists |
471+
| Query | listGraphSpace() | Get all GraphSpace lists |
472472
| | getGraphSpace(String name) | Get the specified GraphSpace |
473473
| | space.getName() | Get GraphSpace name |
474474
| | space.getDescription() | Get GraphSpace description |
475475
| | space.getGraphNumber() | Get the number of graphs under GraphSpace |
476-
| | getGraphSpace(String name) | Get the specified GraphSpace |
477476
| Update| space.setDescription(String description) | Modify GraphSpace description |
478477
| | space.setMaxGraphNumber(int maxNumber) | Set maximum number of graphs in GraphSpace |
478+
| | space.setMaxRoleNumber(int maxRoleNumber) | Set maximum role number in GraphSpace |
479479
| | updateGraphSpace(String name, GraphSpace space) | Update GraphSpace configuration |
480480
| Delete | removeGraphSpace(String name) | Delete the specified GraphSpace |
481481
| | removeGraphSpace(String name, boolean force) | Force delete GraphSpace (including all graph data) |
482482

483-
#### 4.3 Graph Management in GraphSpace
484-
485-
You can manage multiple graphs in a GraphSpace:
486-
487-
```java
488-
// Create a graph in the specified GraphSpace
489-
GraphsManager graphsManager = hugeClient.graphs();
490-
Graph graph = new Graph();
491-
graph.setName("businessGraph");
492-
graph.setDescription("Business relationship graph");
493-
graphsManager.createGraph("myGraphSpace", graph);
494-
495-
// Get all graphs in GraphSpace
496-
List<Graph> graphs = graphsManager.listGraphs("myGraphSpace");
497-
498-
// Get the specified graph
499-
Graph businessGraph = graphsManager.getGraph("myGraphSpace", "businessGraph");
500-
501-
// Delete graph
502-
graphsManager.removeGraph("myGraphSpace", "businessGraph");
503-
```
504-
505483
### 5 Simple Example
506484

507485
Simple examples can reference [HugeGraph-Client](/docs/quickstart/client/hugegraph-client)

0 commit comments

Comments
 (0)